RAID[56] with arbitrary numbers of "parity" stripes.
We discussed using the top bits of the chunk type field field to store a number of redundant disks -- so instead of RAID5, RAID6, etc., we end up with a single 'RAID56' flag, and the amount of redundancy is stored elsewhere.
This attempts it, but I hate it and don't really want to do it. The type field is designed as a bitmask, and _used_ as a bitmask in a number of places -- I think it's ugly and fragile to do it this way (and degraded mounts aren't working for some reason I haven't chased down yet).
I'd much prefer to stick with the separate bit flags for RAID5 and RAID6 (and RAID7, RAID8, or whatever we want to call the versions with 3, 4, or more redundant blocks). We have a 64-bit bitfield, after all -- we're not exactly short of bits even once we start doing RAID50, RAID60, etc...
fs/btrfs/ctree.h +8 -2
@@ -655,8 +655,14 @@ struct btrfs_csum_item {#define BTRFS_BLOCK_GROUP_RAID1 (1 << 4)#define BTRFS_BLOCK_GROUP_DUP (1 << 5)#define BTRFS_BLOCK_GROUP_RAID10 (1 << 6) -#define BTRFS_BLOCK_GROUP_RAID5 (1 << 7) -#define BTRFS_BLOCK_GROUP_RAID6 (1 << 8) +#define BTRFS_BLOCK_GROUP_RAID56 (1 << 7) + +#define BTRFS_BLOCK_GROUP_USED_BITS 8 +/* For RAID5/RAID6, the top 8 bits indicate the number of spares +(1 for RAID5, 2 for RAID6, more once we get the arithmetic for it */ +#define BTRFS_BLOCK_GROUP_MASK (((u64)1 << 56) - 1) + +#define BTRFS_RAID56_MAX_SPARES 2struct btrfs_block_group_item {__le64 used;
fs/btrfs/extent-tree.c +70 -21
145 lines not on this page · raw message
fs/btrfs/volumes.c +24 -45
131 lines not on this page · raw message
Signature · 2 lines
David Woodhouse Open Source Technology Centre [email protected] Intel Corporation
Quoted 4 lines
We discussed using the top bits of the chunk type field field to store a number of redundant disks -- so instead of RAID5, RAID6, etc., we end up with a single 'RAID56' flag, and the amount of redundancy is stored elsewhere.
Is there any sort of timeline for RAID5/6 support in btrfs? I currently have 8 drives in a zfs-fuse RAIDZ2 (RAID6) configuration, and I'd love to see how btrfs compares to that, once it's ready.
Quoted 10 lines · tsuraan
Quoted 6 lines
We discussed using the top bits of the chunk type field field to =20 store a
number of redundant disks -- so instead of RAID5, RAID6, etc., we =20 end up
with a single 'RAID56' flag, and the amount of redundancy is stored elsewhere.Is there any sort of timeline for RAID5/6 support in btrfs? I currently have 8 drives in a zfs-fuse RAIDZ2 (RAID6) configuration, and I'd love to see how btrfs compares to that, once it's ready.
I think someone started doing RAID[56] (see threads "A start at =20 RAID[56] support" and perhaps "Factor out RAID6 algorithms into lib/". = =20
Seems something is in the works.
By the way - how does FUSE ZFS work? Is it stable? Good performance? =20 We're using ZFS natively on Solaris 10 now, perhaps moving the storage = =20
to opensolaris soon.
roy
--
Roy Sigurd Karlsbakk
(+47) 97542685
[email protected]
http://blogg.karlsbakk.net/
--
I all pedagogikk er det essensielt at pensum presenteres =20 intelligibelt. Det er et element=E6rt imperativ for alle pedagoger =E5 = =20
unng=E5 eksessiv anvendelse av idiomer med fremmed opprinnelse. I de =20 fleste tilfeller eksisterer adekvate og relevante synonymer p=E5 norsk.
--
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
Quoted 3 lines
By the way - how does FUSE ZFS work? Is it stable? Good performance? We're using ZFS natively on Solaris 10 now, perhaps moving the storage to opensolaris soon.
It's pretty stable; I wouldn't put anything on it that isn't backed up, but I guess that holds for any other filesystem. The speed isn't yet up to par with the ntfs-fuse project, but they're working on it. On my personal machine, I get 100MB/s writes and 250MB/s reads on an 8-drive RAID-Z2, but I don't know how that compares to anything else, since OpenSolaris won't boot on my hardware and I don't have the patience to wait for md to sync 8 TB worth of drives. I'm reasonably happy with zfs-fuse, but I'm definitely looking forward to seeing how it compares with a native filesystem that supports RAID6.