A Btrfs file system can span several devices with its own data and metadata profiles (single, RAID0, RAID1, RAID10, RAID5/6). The member devices share a file system UUID and each carries a device record, so a set is reassembled from its superblocks.
Overview
Each Btrfs device carries a superblock with the file system UUID, a device item and the number of devices. The chunk tree maps logical addresses to stripes on member devices with a RAID profile (single, DUP, RAID0, RAID1, RAID10, RAID5, RAID6). Assembling a set means finding all devices with matching UUID and reading the logical address space through the chunk map.
History
- Multi-device support has been part of Btrfs since its initial mainline merge in 2009.
Structures
Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
No fixed-offset structures were found.
Constants
Btrfs Logical Device
| Name | Value | Type | Notes |
|---|---|---|---|
| Sector | 512 | int |
Implementation limits
| Class | Name | Value | Notes |
|---|---|---|---|
| Btrfs Logical Device | Chunk | 1 << 20 |