After adding new disks and converting RAID 5 to RAID 1, data went missing

The Rockstor Dashboard shows 600GB of data (test data) on the disk, but my SMB shares don’t contain anything after I added two disks and converted from RAID 5 to RAID 1. They were visible before the conversion. Clearly they still exist somewhere because the dashboard is reporting them as used space. Can anyone help me figure out how to get my data to reappear in my SMB share?

Thanks!

Changing the RAID configuration will destroy the pool and the data. You can expand an existing RAID configuration, but not change it, as the layout on disk is completely different. Data is lost.

Did the conversion succeed? Did the balance job finish?

Most of the time when you don’t see data in the SMB share, it means the Share is not mounted. Perhaps the mount is failing for some reason. Are you able to manually mount the Pool?

I dont know about going from RAID 5 to RAID 1, but I have converted my RAID 6 to RAID 5 and back, without loosing data.

But I did once experience the data not being accessible, because my share did not mount, and therefore SMB couldnt share any data.

Suman helped me out that time.

I had similiar samba folders empty after power outtake, Then listing the pools directory /mnt2/pooll/“directoryName” showd that rockstor has created “replicas” of my dirs in /mn2/“directoryName” and I think samba used those empty dirs instead proper directorys. I just edited one of my samba share, click the pen and then save button to save it. And then files appeared back to shares.

original dir tree / subvolumes
/mnt2/poolname/dir1
/mnt2/poolname/dir2
/mnt2/poolname/dir3

Dir tree now after rockstor made subvolumes(“directories”) itself (I have snapshots turned off)
/mnt2/poolname/dir1
/mnt2/poolname/dir2
/mnt2/poolname/dir3
/mnt2/dir1 <- It’s just empty sublvol, doesn’t have any files from "real “directory”
/mnt2/dir2 <- It’s just empty sublvol, doesn’t have any files from "real “directory”
/mnt2/dir3 <- It’s just empty sublvol, doesn’t have any files from "real “directory”

Are these snapshot directories? I had this happen once before few months back also with old rockstor install running on usb stick, but that stick died.

Check the dir from the terminal locally or with ssh.

This is enlightening to me. I would not have thought the this would be possible.
Does it re lay the data in an optimal format?

I also assume that the amount of data that exists must be less than the convereted RAID1 capacity for this to work?

Everything cleared up in due time. I’m not sure if it was because the balance/conversion was in progress, or because my share failed to mount. The next day I hit edit and then resaved the share as mentioned above. Then when I tried to access it via SMB, everything was intact after the conversion. However, the balance was also reporting 100% complete, so either may have been the solution. The most important part to me is that everything carried through successfully. Very impressive.

Thank you all for your help and advice. This software just keeps getting better and better with every update. Looking forward to the future!

1 Like

The ability to add / remove disks and change the RAID level of the pool without having to backup and restore the data (a good idea anyway, but more for data security reasons) is supposed to be one of the strong points with BTRFS.

BTRFS is very flexible in this regard.

The conversion between RAID levels of course demands that the data in the pool, is less than the size after the conversion.
I think BTRFS checks for this?

A crash / power outage during a conversion could be bad, so this is something to consider (backup critical data before conversion).

I have used the conversion a few times and the add / remove function several times, and it has worked well.
I had a crash once during a removal of a disk, and BTRFS recovered completely, I ended up loosing one file.

1 Like

I have atleast twice ended up with “empty dirs”, and there was no balance running. So somehow it creates copys of the subpools in the root.