NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
scottonaharley
Dec 19, 2016Aspirant
ReadyNAS 4220 NFS configuration
I'm trying to use some NFS shares for a virtual machine environment. It requires the following configuration: Change the ownership of the export directory, replacing directory_name with the name...
mdgm-ntgr
Dec 19, 2016NETGEAR Employee Retired
Which hypervisor and version are you using?
Are you wanting to use the NAS as a datastore over NFS for the VMs or as a network share over NFS for putting ordinary files on?
Which firmware are you running on the NAS?
It should be completely unnecessary to use the shell to get it working and using the shell to do so isn't supported.
Welcome to the community!
scottonaharley
Dec 21, 2016Aspirant
We are running 6.6.0 Firmware on the NAS
We want to use the NFS mount as a datastore over NFS as opposed to using ISCSI so we have the ability to snapshot the datastore and rsync the snapshots to a remote site as well as replicate the datastore to a local backup NAS.
We are using Ovirt (Open Virtualization manager version 3.5.3.1-1.el6
The manager requires the following options to be set: anonuid=36, anongid=36 and all_squash
We are aware that command line editing is not supported but there does not seem to be a way to set the above through the graphic interface (specifically the anonuid and anongid) and Ovirt doesn't seem to have any flexibility regarding these settings.
For testing purposes we did manually edit the exports file with the required settings and were able to successfully connect the VM Manager to the datastore via NFS. We are also able to connect using ISCSI but that severely limits the backup options available to us.
- SkywalkerDec 22, 2016NETGEAR Expert
You'd have to play some games with the systemd unit. Something like this should do the trick:
# sed '/EnvironmentFile=/ a ExecStartPre=/bin/sed -i s/99/36/g /etc/exports' /lib/systemd/system/nfs-kernel-server.service > /etc/systemd/system/nfs-kernel-server.service # systemctl daemon-reload # systemctl restart nfs-kernel-server
- ian-edgelpJan 25, 2017AspirantAfter a little tinkering, I got this working reliably. I made this more specific since I don't want all of my shares having these parameters. Here's what I ended up with:sed "/EnvironmentFile=/ a ExecStartPre=/bin/sed -i '/vm_storage/ s/anongid=99,anonuid=99/anongid=36,anonuid=36/g' /etc/exports" /lib/systemd/system/nfs-kernel-server.service > /etc/systemd/system/nfs-kernel-server.servicesed -i "/ExecStartPre=\/bin\/sed/ a ExecStartPre=/bin/sed -i '/vm_storage/ s/insecure_locks/insecure_locks,all_squash/g' /etc/exports" /etc/systemd/system/nfs-kernel-server.serviceI'm still a bit squirrelly about this as changes in the GUI still overwrite the /etc/exports - I'm just assuming that nothing calls exportfs -a in between nfs service restarts. But my tests were successful, I could move or create a VM without having to refresh permissions.
- scottonaharleyJan 26, 2017Aspirant
I'm going to keep that solution in my pocket as a last resort. You're right to be concerned about the possibility of exportfs -a getting called after the exports file has been overwritten by the GUI. It's entirely possible that changes to another NFS share being used for non-virtualized connections could trigger that event. That's my concern as well. I'm pretty sure that Netgear is going to address this as RHEV represents a significant market segment to not support. It's really a matter of adding the configuration functionality to the GUI as the underlying O.S. supports the required settings. Hopefully there won't be a long wait for this.
- ian-edgelpDec 27, 2016Aspirant
Did you ever find a way to get this working reliably? I'm running into the same issue with RHEV 3.6 and a readyNAS 4312 running 6.6.
- FramerVJan 01, 2017NETGEAR Employee Retired
Hi ian-edgelp,
Would you be able to provide some details on what is happening as I may need to have this case checked out.
Regards,
- ian-edgelpJan 03, 2017Aspirant
Hi FramerV,
It's the same issue that is listed at the top of the thread. RHEV requires the NFS export directory to be owned by 36:36 and have*(rw,anonuid=36,anongid=36,all_squash) options enabled on the export. The readyNAS will not create a UID of 36, so the upshot is that you have to hit the 'Reset Permissions' button every time you add anything to the share. This works but is not really a viable long-term solution.
Is there any supported way to allow the export to be configured with 36:36 and all_squash as per the following documents?
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html/Administration_Guide/sect-Preparing_and_Adding_NFS_Storage.html
http://www.ovirt.org/documentation/how-to/troubleshooting/troubleshooting-nfs-storage-issues/Thanks!
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!