Contents
How do I defrag btrfs?
You can also defragment, and optionally compress, individual file system objects, such as directories and files, within a btrfs file system. You can set up automatic defragmentation by specifying the autodefrag option when you mount the file system.
How do I resize btrfs FileSystem?
Expanding the file system by adding a new disk
- add a new disk.
- rescan the SCSI bus using. rescan-scsi-bus.sh -a.
- Add the newly added device to the root btrfs filesystem. btrfs device add /dev/sdX /
- At this point the metadata is only stored on the first disk, to distribute (balance) it across the devices run:
What is the usage value for Btrfs balance?
Balances only block groups with usage under the given percentage. The value of 0 is allowed and will clean up completely unused block groups, this should not require any new work space allocated. You may want to use usage=0 in case balance is returning ENOSPC and your filesystem is not too full.
Is the Btrfs balance start command deprecated?
Note: A short syntax btrfs balance works due to backward compatibility but is deprecated and should not be used any more. Use btrfs balance start command instead. Balancing operations are very IO intensive and can also be quite CPU intensive, impacting other ongoing filesystem operations.
What are the parameters of Btrfs in manpage?
Parameters are a list of profile names separated by ” | ” (pipe). Balances only block groups with usage under the given percentage. The value of 0 is allowed and will clean up completely unused block groups, this should not require any new work space allocated.
Why do I need a section profile in Btrfs?
For the constraints of the profiles please refer to mkfs.btrfs (8) , section PROFILES. The way balance operates, it usually needs to temporarily create a new block group and move the old data there, before the old block group can be removed. For that it needs the work space, otherwise it fails for ENOSPC reasons.