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? -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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@kepstin.ca> -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> 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.So, on highly fragmented fs reliability in single data mode is near to raid0? Rhetorical question, actually.> 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.Is there any plans to support 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).-- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Jan 22, 2013 at 07:29:47PM +0400, Pavel Vasilyev wrote:> > 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. > > So, on highly fragmented fs reliability in single data mode is near to raid0? > Rhetorical question, actually.Correct. The difference against ''single'' is that it does not spread the data by default, depends on actual data layout and is unpredictable in most cases.> > 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. > > Is there any plans to support it?I''ve added a project to the wiki, if that counts :) david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html