Hi, I have a samba share exported from a RAID-1 pool. I noticed today that although my root files are intact, I am missing a whole bunch of files in subfolders. The subfolders exist, but no files within. I checked from my mountpoint via SSH and the CLI shows the same thing.
I do not notice any errors in either dmesg or /var/log/messages (at least not the repeating type to indicate disk or other hardware failure).
I have not restarted yet for fear of making something worse. How do I go about troubleshooting the root cause of this?
Thanks for the reply. I had last run a scrub October 1st. I just completed another one, but where do I get the results of the scrub?
I ran this, if that helps:
btrfs scrub status -d /dev/sda
scrub status for 6e11674c-2a41-40e7-a3eb-6f70d60065a4
scrub device /dev/sda (id 1) history
scrub started at Sun Nov 19 10:18:23 2017 and finished after 01:16:50
total bytes scrubbed: 551.80GiB with 0 errors
Are you sure that /dev/sda is the disk you’re missing files from? You can run the following to show all btrfs filesystems:
btrfs fi show
And then show the last scrub for the given mountpoint (as opposed to the physical device) by:
btrfs scrub status /mnt2/<mountpoint>
Also, that scrub is 20 days old. It’s up to you how frequently you run them, but I typically run mine weekly on Monday mornings at 12:30am
As for other ways to view the scrub status, Rockstor UI -> Storage -> Pools -> [ Select the pool ] -> Scrubs tab @top -> Click latest, it shows a nice table of information.
At this point though, assuming you’re showing a scrub on the right filesystem, I’m not sure I can help you further. Something may be wrong with the metadata / btrfs extent table.
Do you have any snapshot schedules setup for the device in question? You might be able to try switching to an earlier snapshot.
Beyond that, you might try the BTRFS wiki, IRC channel, or mailing list for further information.