Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 8172  / 1 Year ago, fri, april 28, 2023, 10:33:07

My idea was that (using loopback devices) it works like this




  1. Create the raid array sudo mkfs.btrfs -m raid1 -d raid1 /dev/loop1 /dev/loop2

  2. You mount them sudo mount /dev/loop1 /mnt and mark them touch goodcondition

  3. You unmount and simulate disk failure (remove disk or delete loopback device loop2 in my case)

  4. You mount degraded -o degraded and mark again touch degraded

  5. You add the bad disk again sudo btrfs dev add /dev/loop2

  6. 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?


More From » mount

 Answers
4

It looks like you added a third device and so the original second is still missing. I guess you need to remove the missing device before adding the new one. The brtfs mailing list might also be a better place to ask this question.


[#44520] Saturday, April 29, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
beateyra

Total Points: 499
Total Questions: 113
Total Answers: 125

Location: Falkland Islands
Member since Mon, Jul 13, 2020
4 Years ago
;