Data loss after power outage?

Hi, hoping someone can point me in the right direction here. I have a 12-disk Rockstor NAS running RAID 1/0 with a share that has about 9TB of data on it. I had a power outage today, and when I restarted the server this afternoon and mounted the share via NFS there were no files on it.

I logged into the GUI and it shows 186GB used:

But if I click into the share details it shows 9.33TB used:

Have I lost the content there? IS there anything I should try to see if the data is still accessible? It’s not the end of the world if it’s gone and most of it is backed up on my old NAS, but my Rockstor has been running so stable for so long I was beginning to trust it with data.

Thanks,
Craig

So I finally thought to check the share on the NAS itself, and when I log in and ls the local dir on the server for that share, all the files appear to be there. So I am cautiously hopeful that the data is all intact, and there is instead something wrong with the NFS configuration or some other component that makes the files not appear to the client or to the summary stores page in the GUI.

Hi @shpxnvz,
did you try a stop/restart for nfs service?

Mirko

Hi
what is the output of
mount
Are your FS rw or ro ?

I did restart NFS, no change to behavior.

It was mounted RW but I now switched to RO to hopefully minimize the chance of something getting more screwed up.

The output of the mount command for that mount is:

192.168.0.11:/export/media  on  /nas/media                       type  nfs4             (ro,nosuid,nodev,noexec,noatime,vers=4.0,rsize=32768,wsize=32768,namlen=255,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800,soft,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.209,local_lock=none,addr=192.168.0.11,user)

A long directory listing on the mounted dir shows some old dot directories. Not sure what created these:

$ ls /nas/media/ -lah
total 0
drwxr-xr-x 1 root        root        204 Dec  2 17:36 .
drwxr-xr-x 1 root        root         74 Aug  3  2016 ..
drwxr-xr-x 1 root        root          0 Aug 16 19:40 .Media1
drwxr-xr-x 1 root        root          0 Oct  8 21:05 .media_201610050000
drwxr-xr-x 1 username    username     74 Oct  5 00:00 .media_201610112300
drwxr-xr-x 1 root        root          0 Dec  2 17:36 .media_201610182300
drwxr-xr-x 1 root        root          0 Dec  2 17:36 .media_201610252300
drwxr-xr-x 1 root        root          0 Dec  2 17:36 .media_201611152300

Just another bit of information, in case it helps.

If I log into the NAS and list the directory within the share (/mnt2/media), I get the complete listing that I would expect, and verified that the contents all appear to be there:

# ls -lah /mnt2/media/
total 0
drwxr-xr-x 1 username    username    644 Feb  8 00:00 .
drwxr-xr-x 1 root        root        198 Aug  4  2016 ..
drwxr-xr-x 1 username    username     22 Aug  3  2016 .Media1
drwxr-xr-x 1 username    username     36 Aug  8  2016 .media_201610050000
drwxr-xr-x 1 username    username     74 Oct  5 00:00 .media_201610112300
drwxr-xr-x 1 username    username    112 Oct 12 00:00 .media_201610182300
drwxr-xr-x 1 username    username    150 Oct 19 00:00 .media_201610252300
drwxr-xr-x 1 username    username    188 Oct 26 00:00 .media_201611012300
drwxr-xr-x 1 username    username    226 Nov  2 00:00 .media_201611082300
drwxr-xr-x 1 username    username    264 Nov  9 00:00 .media_201611152300
drwxr-xr-x 1 username    username    302 Nov 16 00:00 .media_201612132300
drwxr-xr-x 1 username    username    340 Dec 14 00:00 .media_201612202300
drwxr-xr-x 1 username    username    378 Dec 21 00:00 .media_201612272300
drwxr-xr-x 1 username    username    416 Dec 28 00:00 .media_201701032300
drwxr-xr-x 1 username    username    454 Jan  4 00:00 .media_201701102300
drwxr-xr-x 1 username    username    492 Jan 11 00:00 .media_201701172300
drwxr-xr-x 1 username    username    530 Jan 18 00:00 .media_201701242300
drwxr-xr-x 1 username    username    568 Jan 25 00:00 .media_201701312300
drwxr-xr-x 1 username    username    606 Feb  1 00:00 .media_201702072300
drwxr-xr-x 1 username    users       574 Jan  2 15:22 movies
drwxr-xr-x 1 username    users       152 Feb  7 09:53 music

But if I list it from /export/media I get the listing that shows in NFS:

# ls -lah /export/media/
total 0
drwxr-xr-x 1 root        root        204 Dec  2 17:36 .
drwxr-xr-x 1 root        root         50 Aug  3  2016 ..
drwxr-xr-x 1 root        root          0 Aug 16 19:40 .Media1
drwxr-xr-x 1 root        root          0 Oct  8 21:05 .media_201610050000
drwxr-xr-x 1 username    username     74 Oct  5 00:00 .media_201610112300
drwxr-xr-x 1 root        root          0 Dec  2 17:36 .media_201610182300
drwxr-xr-x 1 root        root          0 Dec  2 17:36 .media_201610252300
drwxr-xr-x 1 root        root          0 Dec  2 17:36 .media_201611152300

I do have automatic snapshots running weekly on this share and figured out that the dot directories are related to the snapshots. I’m not sure if this helps explain the behavior I’m seeing, but (maybe fortunately?) an automatic snapshot had run the morning that I lost power and after the last writes I did to that share.

You should try a btrfs restore on another disk / computer to backup your data then do a
btrfs check
If you get segfault on btrfs check you must update btfrs tools

Thanks for the ideas. I decided to backup everything and reinstall with another NAS OS for now. Unfortunately I just don’t have enough extra time right now to dedicate to debugging and tweaking this.

Before I do, though, I wanted to ask if it would be beneficial to open a bug report with this info in case someone wants to look at it later? If not, I’ll just leave the thread as is for future reference.