NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Axionkt's avatar
Axionkt
Aspirant
Jul 24, 2017

ReadyNAS Pro devices btrfs restore

Hi,

 

I am running into an issue with my btrfs filesystem where, according to the btrfs people, my metadata has been corrupted.

Since I can't mount or repair the filesystem I was currently backing up the data with the btrfs restore command.

 

It ran without any issue for md125 however it seems that md126 and md127 want to restore the same data.

 

I believe the data was at around 12TB and btrfs restore /dev/md125 restored a bit less than 9TB.

 

Here is a btrfs fi show:

 btrfs fi show
Label: '33ea0fb7:root'  uuid: fcb46084-edad-4ad1-98a1-0d29960c96c2
        Total devices 1 FS bytes used 2.92GiB
        devid    1 size 4.00GiB used 4.00GiB path /dev/md0

Label: '33ea0fb7:data'  uuid: fc91a3f1-38da-4d8a-ac16-7e0f43c680cf
        Total devices 3 FS bytes used 12.09TiB
        devid    1 size 9.07TiB used 8.81TiB path /dev/md125
        devid    2 size 3.64TiB used 3.02TiB path /dev/md127
        devid    3 size 3.64TiB used 2.87TiB path /dev/md126

And my raid:

cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md1 : active raid10 sdf2[4] sde2[3] sdd2[2] sdb2[1] sda2[0]
      1308160 blocks super 1.2 512K chunks 2 near-copies [5/5] [UUUUU]

md125 : active raid5 sdg3[8] sda3[9] sdf3[5] sde3[7] sdd3[6] sdb3[10]
      9743313920 blocks super 1.2 level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]

md126 : active raid5 sdg5[5] sdd5[0] sdb5[4] sda5[3] sde5[1]
      3906483712 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]

md127 : active raid5 sdg4[7] sdb4[6] sda4[5] sde4[3] sdd4[2]
      3906491648 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]

md0 : active raid1 sdg1[8] sda1[9] sdf1[5] sde1[7] sdd1[6] sdb1[10]
      4190208 blocks super 1.2 [6/6] [UUUUUU]

unused devices: <none>

From what I understand it is normal that backing up md125 gave me about 9TB of data, what I don't understand is why would I get the same amount of data from restoring md126 or md127, any idea why this would be happening or how to avoid the problem and continue with the restoration without having duplicates?

 

Thanks.

 

1 Reply

Replies have been turned off for this discussion
  • StephenB's avatar
    StephenB
    Guru - Experienced User

    md125, md126, and md127 comprise a raid group, and the file system spans all three devices.

     

    Normally you'd do a btrfs device scan and then mount the /data volume.

     

    Unfortunately I don't know enough about btrfs restore to understand how it handles this.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More