Justin Madru posted on Sat, 05 Mar 2016 12:32:31 -0800 as excerpted:

> I have a btrfs filesystem spanning 3 drives. The metadata is using raid1
> (mirroring), but the data is using single, so no mirroring or parity
> just spanning. For example:
> 
>     mkfs.btrfs -m raid1 -d single /dev/sda /dev/sdb /dev/sdc
> 
> One of the drives, /dev/sdb, had a hardware failure before I could
> replace it. I'm able to mount the filesystem in read-only using:
> 
>     mount -o degraded,ro /dev/sda /mnt/data
> 
> But how do I list the files that were on the failed drive?

I don't believe there's a simple, admin-level command, to list only the 
files that happened to be on a particular drive.

What you /can/ do is just do a global copy to somewhere else, and 
unaffected files will copy, while affected ones will fail.

The other alternative is to use btrfs restore on the unmounted 
filesystem, restoring the files that are possible to some other 
location.  Note that by default, the restored files will be written as 
root, using umask, with symlinks skipped, but on reasonably recent btrfs-
progs, restore has options that allow you to restore metadata such as 
ownership/perms/times, and symlinks, if you wish.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to