On May 13, 2013, at 9:30 AM, Vincent <[email protected]> wrote:

> Shit, I've followed the official documentation 
> https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Replacing_failed_devices
> 
> With, as explain:
> mkfs.btrfs -d single /dev/sda3 /dev/sdb1 /dev/sdc1 /dev/sdd1

You did this originally, not just a couple hours ago, right? Because if you did 
it again, of course you've deleted all of your data by creating a new file 
system.
> 
> mount -o degraded /dev/sda3 /media/single-raid/

This should work, and you should be able to rsync or copy the data off the file 
system onto a new one, except for data that's on the failed drive. I'm not sure 
what sort of errors you get when copying data that the file system knows isn't 
available.

> btrfs device delete missing /media/single-raid/

I don't expect this to apply to either -d single or -d raid0. It doesn't 
actually have any benefit or meaning. I'd say at best, my expectation is you 
could copy out the surviving data, in degraded mode, out of the btrfs file 
system onto a new file system. I do not expect it's possible to replace the 
dead drive and go happily along with just the missing data being lost. You'll 
have to create a new file system at some point.


> And now all my datas on ALL drive has been deleted. How could I retrieve 
> datas on my Btrfs formatted partition now?!

If you really formatted it, I'd expect this. If that was an example of the 
original mkfs, I'd expect degraded should allow access to data on working 
drives. Maybe read/write is possible, but personally I'd prefer the file system 
in such a degraded state to be read only. And get the surviving data off.

But I am not a Btrfs developer.


Chris Murphy--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to