I’m still having trouble with this, but have had a chance to do a little more investigating.
Whilst I thought that the NFS mounts were empty, it turns out they are mounting my read-only snapshots, which all start with .xyz and thus appear hidden. Over SMB, there is no such issue. Showing hidden files in a file manager reveals the directory structure:
It takes a few levels to reach “Camera”, “Pictures” etc. And those directories remain unwriteable.
I have read through some related threads NFS is mounting empty - #2 by Hooverdan and A lower level error occurred while refreshing NFS exports: (Error running a command. cmd - #7 by phillxnet so have some other output to share.
less /opt/rockstor/var/log/rockstor.log
Gives:
ERROR [storageadmin.views.command:182] **Exception while bootstrapping NFS:** (["A lower level error occurred while refreshing NFS exports: (Error running a command. cmd = /usr/bin/mkdir -p /export/iron-photos/.photos-weekly_202001091515. rc = 1. stdout = ['']. stderr = ['/usr/bin/mkdir: cannot create directory \\xe2\\x80\\x98/export/iron-photos/.photos-weekly_202001091515\\xe2\\x80\\x99: Operation not permitted', '']).", 'Traceback (most recent call last):\n File "/opt/rockstor/src/rockstor/storageadmin/views/nfs_exports.py", line 139, in refresh_wrapper\n refresh_nfs_exports(exports)\n File "/opt/rockstor/src/rockstor/system/osi.py", line 598, in refresh_nfs_exports\n bind_mount(exports[e][0][\'mnt_pt\'], e)\n File "/opt/rockstor/src/rockstor/system/osi.py", line 568, in bind_mount\n run_command([MKDIR, \'-p\', export_pt])\n File "/opt/rockstor/src/rockstor/system/osi.py", line 120, in run_command\n raise CommandException(cmd, out, err, rc)\nCommandException: Error running a command. cmd = /usr/bin/mkdir -p /export/iron-photos/.photos-weekly_202001091515. rc = 1. stdout = [\'\']. stderr = [\'/usr/bin/mkdir: cannot create directory \\xe2\\x80\\x98/export/iron-photos/.photos-weekly_202001091515\\xe2\\x80\\x99: Operation not permitted\', \'\']\n']).
So you can see it’s not trying to mount the top level directory as defined in the NFS export on the Rockstor web-UI, but instead a read-only subvolume. This creates an error trying to create a directory.
[root@rockstor ~]# mount | grep ‘iron-photos’
… trimmed for readability
/dev/sde on /mnt2/iron-photos/.photos-weekly_202001310815 type btrfs (rw,relatime,space_cache,subvolid=470,subvol=/.snapshots/iron-photos/photos-weekly_202001310815)
/dev/sde on /export/iron-photos/.photos-weekly_202001091515 type btrfs (rw,relatime,space_cache,subvolid=446,subvol=/.snapshots/iron-photos/photos-weekly_202001091515)
/dev/sde on /export/iron-photos/.photos-monthly_202001042105 type btrfs (rw,relatime,space_cache,subvolid=439,subvol=/.snapshots/iron-photos/photos-monthly_202001042105)
A series of snapshots mounted as expected, then mounts to /exports are created from snapshots that are read only.
I also can’t find a way to:
a) remove the NFS mount definition from the web-UI due to permission errors
b) remove existing snapshots to at least go back to normal use until the NFS issue can be worked out
The issues seem to have created a bit of a loop.
Any help appreciated.