Newbie here. I suffered a power outtage and now my shares don’t show any data.
Problem is similar to this topic: Data loss after power outage? .
Doing
ls -l /mnt2/nfs_video/
show all the files.
Doing
ls -l /export
doesn’t show the nfs_video export
The Rockstor GUI under the “Shares” screen shows all the shares, including nfs_video.
The Rockstor GUI under “File sharing” → NFS shows the nfs_video nfs share.
Tyring to remove the nfs_video share results in a an error like below, seems related to creating a snapshot of the other share in the system (nfs_music).
A lower level error occurred while refreshing NFS exports: (Error running a command. cmd = /bin/mkdir -p /export/nfs_music/.Snapshot_Weekly_NFS_Music_201804270442. rc = 1. stdout = [‘’]. stderr = [‘/bin/mkdir: cannot create directory \xe2\x80\x98/export/nfs_music/.Snapshot_Weekly_NFS_Music_201804270442\xe2\x80\x99: Operation not permitted’, ‘’]).
Any suggestions on solving this (besided reinstall or use another NAS os)?
I’ve started and stopped NFS but didn’t have any effect.
Thanks in advance.
Straight off the bat, it appears that your export directories aren’t mounted.
Let’s see if we can solve the immediate problem first, then try and locate the source and underlying issue once we’ve got access to your files again.
First, is the mountpoint active?
mount | grep export
For the below, I’m assuming no, if otherwise, please report.
We’ll try mounting the filesystem. I’m unsure what the device mapping for your BTRFS pool(s) are, so I’m going use my own as an example, /dev/sdd
NOTE that the subvol definition is case sensitive, if what I’ve shown here does not match your config, you must adjust it accordingly!
mkdir -p /export/nfs_video
mount -o rw,relatime,space_cache,subvol=/mnt2/nfs_video -t btrfs /dev/sdd
mkdir -p /export/nfs_music
mount -o rw,relatime,space_cache,subvol=/mnt2/nfs_music -t btrfs /dev/sdd
Once this is done, try hitting your shares again and see your files are visible again.
Hopefully this gets you out of hot water for the moment so that we can spend time under less dire circumstances investigating what happened.
Thanks for the quick response!
Running “mount | grep export” found nothing as you expected.
I created the export directory with “mkdir -p /export/nfs_video”.
Doing “mount | grep video” returns:
/dev/sda on /mnt2/nfs_video type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/nfs_video)
/dev/sda on /mnt2/nfs_video/.Snapshot_Weekly_NFS_Video_201804270342 type btrfs (rw,relatime,space_cache,subvolid=2187,subvol=/.snapshots/nfs_video/Snapshot_Weekly_NFS_Video_2
So I assumed the btrfs device for the mount command is “/dev/sda”? When I try running the “mount -o rw,relatime,space_cache,subvol=/mnt2/nfs_video -t btrfs /dev/sda” it returns:
mount: mount(2) failed: No such file or directory
Mounting the shares as samba exports worked fine, only the nfs stuff is not working.
@palmito,
Whoops, missed part of the mount command ;o)
Also screwed up the subvol definition in my command, does not need the preceding mountpoint.
mount -i rw,relatime,space_cache,subvol=/nfs_video -t btrfs /dev/sda /export/nfs_video
If it works, perform the:
mount | grep export
again, you should see something like this (my own config shown first, then what I expect yours will look like)
/dev/sdd on /export/media type btrfs (rw,relatime,space_cache,subvolid=310,subvol=/media)
/dev/sda on /export/media type btrfs (rw,relatime,space_cache,subvol=/nfs_video
If that still doesn’t work, please paste the output of the following:
file /dev/sda
file /mnt2/nfs_video
file /export/nfs_video
btrfs subvol list -o /mnt2/<<POOLNAME>>
Replacing <> with (you guessed it!) the name of the pool containing your share.
Hope this helps!
You solved it!
This worked:
mount -t btrfs -o subvol=nfs_video /dev/sda /export/nfs_video
Showed up in mounts and I was able to mount it.
Very happy so far with Rockstor, moved from Freenas. For a small home media nas Rockstar is much easier to deal with.
I think I will be hooking it up to a ups though…
Thank you so much for your quick assistance!
@palmito,
You’re more than welcome, please note however that while we have re-enabled access to the share, there may be an underlying issue that may arise next time the system boots.
I advise you keep the previous instructions handy, and if the problem recurs, bring it to the forum’s attention if the problem occurs again.
I have personally had no issues with unscheduled power loss or reboot on my Rockstor system.