|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Mon, May 07, 2012 at 08:25:00PM +0200, Helmut Hullen wrote: > Hallo, Hugo, > > Du meintest am 07.05.12: > > >> With a file system like ext2/3/4 I can work with several directories > >> which are mounted together, but (as said before) one broken disk > >> doesn't disturb the others. > > > mkfs.btrfs -m raid1 -d single should give you that. > > What's the difference to > > mkfs.btrfs -m raid1 -d raid0 - RAID-0 stripes each piece of data across all the disks. - single puts data on one disk at a time. So, on three disks (each disk running horizontally), the FS will allocate block groups this way for RAID-0: Disk 1: | A1 | B1 | C1 |... Disk 2: | A2 | B2 | C2 |... Disk 3: | A3 | B3 | C3 |... where each chunk, e.g. A2, is 1G in size. Then data is striped across all of the An chunks (a single block group of size 3G) in 64k sub-stripes, until block group A is filled up, and then it'll move on to another block group. For "single" allocation on the same disks, you will instead get: Disk 1: | A | D | G |... Disk 2: | B | E | H |... Disk 3: | C | F | I |... where, again, each chunk is 1G in size. Data written to the FS will live in one of the chunks, overflowing to some other chunk when there's no more space. With large files, you've still got a chance that (some of) the data from the file will be on more than one disk, but it's a much much better situation than you'd have with RAID-0. Of course, you still need RAID-1 metadata, so that when a disk does go bang, you still have all the filesystem structures you need to read the remaining data. :) In fact, this is probably a good argument for having the option to put back the old allocator algorithm, which would have ensured that the first disk would fill up completely first before it touched the next one... Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- ... one ping(1) to rule them all, and in the --- darkness bind(2) them.
Description: Digital signature