Mostly trivia, but might help someone one day...

True that raid0 is basically for data you don't care about, if any
drive in the array dies, you lose everything. Except on Btrfs...

If the metadata profile is raid1 (or raid1c34), you will still lose
all the data on the failed drive. But you will be able to mount the
remaining drive(s) using `mount -o ro,degraded` due to the raid1
metadata profile. The file system itself is not striped, but mirrored
(two copies for raid1 no matter how many drives). You can't mount it
read-write because it's below the minimum number of drives due to
raid0 data.

If you copy the files out, you'll have quite a mess because obviously
most files are missing or damaged (swiss cheese). You'll need a tool
that tolerates I/O errors, by continuing to read the rest of the file
rather than giving up on the first I/O error. ddrescue does this (it
works on block devices or files, in this case you'd use it on files).

The mkfs time default profile for metadata is raid1 if you include 2
or more disks in the mkfs command. Otherwise you get DUP profile for
metadata and single profile for data. If you add a second drive to a
single drive Btrfs, you need to manually convert, e.g. `btrfs balance
start -mconvert=raid1 -dconvert=raid0`

This same behavior happens with an e.g. 2-disk Btrfs with single
profile data, and raid1 profile metadata. You can mount it
ro,degraded, and get the files off the surviving drives. In this case,
you'll get both more completely lost files and more completely intact
files because single profile doesn't stripe data.



--
Chris Murphy
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to