How does btrfs RAID work in degraded mode?
        Posted  
        
            by 
                turbo
            
        on Ask Ubuntu
        
        See other posts from Ask Ubuntu
        
            or by turbo
        
        
        
        Published on 2011-06-21T17:06:18Z
        Indexed on 
            2011/06/22
            0:32 UTC
        
        
        Read the original article
        Hit count: 406
        
My idea was that (using loopback devices) it works like this
- Create the raid array 
sudo mkfs.btrfs -m raid1 -d raid1 /dev/loop1 /dev/loop2 - You mount them 
sudo mount /dev/loop1 /mntand mark themtouch goodcondition - You unmount and simulate disk failure (remove disk or delete loopback device 
loop2in my case) - You mount degraded 
-o degradedand mark againtouch degraded - You add the bad disk again 
sudo btrfs dev add /dev/loop2 - You rebalance 
sudo btrfs fi ba /mnt 
And Raid 1 should work again. But that's not the case. sudo btrfs fi show:
Total devices 3 FS bytes used 28.00KB
devid    3 size 4.00GB used 264.00MB path /dev/loop1
devid    2 size 4.00GB used 272.00MB path /dev/loop2
*** Some devices missing
The file degraded lives on loop1 but not on loop2 when loop2 is mounted in degraded mode.
Why is that?
© Ask Ubuntu or respective owner