![]() For example, with an existing filesystem mounted at /mnt, you can add the device /dev/sdc to it with:Īt this point we have added our device to the filesystem, but all of the metadata and data are still stored on the original device(s). This is required after loading the btrfs module if you're running with more than one device in a filesystem.ītrfs filesystem show will print information about all of the btrfs filesystems on the machine.ītrfs filesystem show gives you a list of all the btrfs filesystems on the systems and which devices they include.ītrfs device add is used to add new devices to a mounted filesystem.ītrfs balance can balance (restripe) the allocated extents across all of the existing devices. The UseCases page gives a few quick recipes for filesystem creation.ītrfs device scan is used to scan all of the block devices under /dev and probe for Btrfs volumes. # Create and mount a filesystem made of several disk imagesĪfter a reboot or reloading the btrfs module, you'll need to use btrfs device scan to discover all multi-device filesystems on the machine (see below) Instead, you'll have to set up the loopbacks manually: ![]() If you want to mount a multi-device filesystem using a loopback device, it's not sufficient to use mount -o loop. Once you create a multi-device filesystem, you can use any device in the FS for the mount command: # Use full capacity of multiple drives with different sizes (metadata mirrored, data not mirrored and not striped) (See btrfs-space-calculator or btrfs disk usage calculator) Non-striped equivalents may give you a more effective use of space (single instead of RAID 0, RAID 1 instead of RAID 10). If you want to use devices of different sizes, striped RAID levels (RAID 0, RAID 10, RAID 5, RAID 6) may not use all of the available space on the devices. # Don't duplicate metadata on a single drive (default on single SSDs) Mkfs.btrfs -m raid10 -d raid10 /dev/sdb /dev/sdc /dev/sdd /dev/sde # Stripe the data without mirroring, metadata are mirrored Mkfs.btrfs -d single /dev/sdb /dev/sdc /dev/sdd /dev/sde # Create a filesystem across four drives (metadata mirrored, linear data allocation) Option -m single means that no duplication is done, which may Valid choices are raid0, raid1, raid10, raid5, raid6, single and dup. Has options to control the RAID configuration for data ( -d) and metadata ( -m). Mkfs.btrfs will accept more than one device on the command line. Note that the minimum number of devices required for RAID 5 is 3. Please read the parity RAID status page first: RAID56. See Manpage/mkfs.btrfs for more details on this and other RAID profiles. The RAID 1 profile also allows for 2, 3, or 4 copies of redundant data copies, called RAID 1, RAID 1C3, and RAID 1C4 respectively. See the Gotchas page for some current issues when using btrfs with multiple volumes. If thereĪre any errors, Btrfs tries to read from an alternate copy and will repair theīroken copy if the alternative copy succeeds. When blocks are read in, checksums are verified. If using multiple devices dup should be avoided and metadata should be stored using raid1 mkfs.btrfs -m raid1 -d single.ītrfs can add and remove devices online, and freely convert between RAID levels after the FS has been created.ītrfs supports RAID 0, RAID 1, RAID 10, RAID 5 and RAID 6 (but see the section belowĪbout RAID 5/6), and it can also duplicate metadata or data on a single spindle If only one device is present, metadata will be duplicated on that one device mkfs.btrfs -m dup -d single. This is equivalent to mkfs.btrfs -m raid1 -d raid0. A Btrfs filesystem can be created on top of many devices, and more devices can be added after the FS has been created.īy default, metadata will be mirrored across two devices and data will be striped across all of the devices present.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |