Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NFS Mounts Break on Shared Folder Path Change #118
Linux NAS 4.9.0-0.bpo.6-amd64 #1 SMP Debian 4.9.88-1+deb9u1~bpo8+1 (2018-05-13) x86_64 GNU/Linux
I had a shared folder that was on a single disk that was referenced as an NFS share.
I copied the contents of the folder to a different drive with the same path on that device.
I went to the 'Shared Folders' area and modified the associated share to change it from the old device to the new one with the same folder path on that new device as the old one.
I tested the matching SMB share and it was now working and pointed to the new device.
I checked the NFS share and in the dialogue it showed it was also pointed to the new device.
I tested the NFS mount and it was still pointing to the old drive, I restarted the NFS service, still pointing to the old drive, restarted the entire NAS, still pointing to the old drive, unmounted the file system of the old drive, wouldn't let me because although its not 'referenced' its in use, restarted the NAS again with the mount disabled, the system booted and showed everything was fine, it was not.
The NFS mount no longer worked but still showed it was pointing to the new drive, trying to delete the NFS share caused issues because removing the associated mount point from the "/export" area failed since it got a "Device or Resource busy" error when attempting to do so... because even with the old drive's filesystem not mounted, it was still mounting that specific folder from the old drive to that "/export" location to facilitate the NFS share all while the system thought the share was pointing to the new drive and that the old drive wasn't even mounted.
I had to manually unmount the "/export" location since any change I made on the system was broken without doing so.
The bug seems to be that if you edit the location of a 'Shared Folder", the NFS share assocaited thinks its pointing to the new location since the name is the same, but its not and it never will, there's also no way to edit an NFS share's path which is more than a mild annoyance.
That;s a known issue, it was reported on the old bugtracker. The answer by that time was no fix,i cannot recall why. The problem is the fstab mount bind used for nfs is not unmounted, and remounted with the new source force.