Re: Simple btrfs use case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-01-22 at 16:08 +0400, Pavel Vasilyev wrote:
> Hi
> 
> For example I have a bunch of various disks. I want to use them all as
> one big storage:
> mkfs.btrfs -m raid1 -d single /dev/sda /dev/sdb /dev/sdc ...
> And someday one of my disks becomes dead. Disappears.
> However, I can still mount fs in degraded,ro mode. All files that lays
> on working disks are still available, but the only option to save
> those files is to make a new fs on a new disk and copy them to it.
> Why? Can I just drop files, whose chunks was on the dead disk?
> 
> 
> How btrfs allocates files (file chunks) on physical disks? i.e. can I
> lose all my files in -d single mode, when one of my disk becomes dead?

In "single" data mode, btrfs makes no special attempt to keep files
together on the same disk, but if a file is written linearly and never
modified there's a chance it might happen. (Each modification will COW
the file, putting the modified portion on a random disk.)

As a result, yes, you may lose a substantial number - even most - of
your files if one disk dies while in single data mode.

The failure mode you are describing would be interesting, and people
talk about it now and then, but there is no current support in btrfs for
it.

(One thing to note: small files are often stored in the metadata area
instead of data area, which would be raid1 in your setup. As a result,
those small files are more likely to be recoverable).

-- 
Calvin Walton <calvin.walton@xxxxxxxxxx>

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


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux