I’ve got a new MyCloud version 2.11.140
I can enable NFS from the GUI, however it has all_root_squash by default.
I need no_root_squash for rsync.
I can change /etc/exports but I dont know how to restart the NFS service on mycloud or how to get anything to persist. Over time, my edits it will get changed back on their own too.
I found a guide about editing /usr/local/config/config.xml and putting in a boot script. I tried this putting in something to change /etc/exports but that doesnt seem to work either.
Hi, unfortunately I am not an SSH expert, and I wouldn’t know how to change it, lets see if another user is able to provide some guidance.
Google easily finds
Which would suggest
service nfs restart
to be consistent with other MyCloud service controls (
status, stop, start, restart)
Mycloud Gen2 is not running redhat. That command does not work
The command syntax to control services are pretty similar across all variants of Linux; that Redhat page is just a handy example of good documentation.
Those commands (
service [servicename] [start|stop|status|restart]) work on Gen 1 v3/v4 MyClouds.
The Gen2/v2 isn’t really running a ‘proper Linux’, which may be why those commands don’t work. Sorry; I don’t have a Gen2/v2 MyCloud so can’t advise further.
Yes exactly, that is the issue I a having.
OK, I figured it out.
I tried editing exports but I didn’t know how to restart nfs and apply the setting. Also, exports gets overwritten eventually anyways. I then tried CHROOT, but in I couldnt get nfs and rpc to work right. In debugging that, I discovered the “exportfs” command which allows you to reapply exports. Then all I had to do was replace the exports file. Once I realized that, everything fell into place.
I disabled NFS in the gui hoping it would avoid issues with periodic replacing of files.
I used the bootscript workaround that was posted elsewhere on the forum to be able to run my commands on boot.
I noticed I can’t replace the exports file too early so I wait til the system creates an exports file, then I copy my own in and then run exportfs -r
I basically just used the following commands at bootup:
while [ ! -f /etc/exports ]; do sleep 1; done
cp -f exports /etc/exports
I havent done too much testing to see if my exports file eventually gets overwritten and even if that happens, if the new exports file is reapplied. Hopefully not.