btrfs-filesystem(8) =================== NAME ---- btrfs-filesystem - control btrfs filesystem SYNOPSIS -------- *btrfs filesystem* DESCRIPTION ----------- *btrfs filesystem* is used to do the filesystem level control jobs, including all the regular filesystem operations like setting/getting label, resizing, defragment. SUBCOMMAND ---------- *df* [options] :: Show space usage information for a mount point. + `Options` + -b|--raw:::: raw numbers in bytes, without the 'B' suffix -h|--human-readable:::: print human friendly numbers, base 1024, this is the default -H:::: print human friendly numbers, base 1000 --iec:::: select the 1024 base for the following options, according to the IEC standard --si:::: select the 1000 base for the following options, according to the SI standard -k|--kbytes:::: show sizes in KiB, or kB with --si -m|--mbytes:::: show sizes in MiB, or MB with --si -g|--gbytes:::: show sizes in GiB, or GB with --si -t|--tbytes:::: show sizes in TiB, or TB with --si + If conflicting options are passed, the last one takes precedence. *defragment* [options] | [|...]:: Defragment file data and/or directory metadata *online*. + If '-r' is passed, files in dir will be defragmented recursively. The start position and the number of bytes to defragment can be specified by start and len using '-s' and '-l' options below. Any extent bigger than threshold given by '-t' option, will be considered already defragged. Use 0 to take the kernel default. You can also turn on compression in defragment operations. + `Options` + -v:::: be verbose -c:::: compress file contents while defragmenting -r:::: defragment files recursively -f:::: flush filesystem after defragmenting -s [kKmMgGtTpPeE]:::: defragment only from byte onward -l [kKmMgGtTpPeE]:::: defragment only up to bytes -t [kKmMgGtTpPeE]:::: defragment only files at least bytes big + For , , it is possible to append units designator: \'K', \'M', \'G', \'T', \'P', or \'E', which represent KiB, MiB, GiB, TiB, PiB, or EiB, respectively. Case does not matter. + WARNING: defragmenting with kernels up to 2.6.37 will unlink COW-ed copies of data, don't use it if you use snapshots, have de-duplicated your data or made copies with `cp --reflink`. *label* [|] []:: Show or update the label of a filesystem. + [|] is used to identify the filesystem. If a newlabel optional argument is passed, the label is changed. + NOTE: the maximum allowable length shall be less than 256 chars // Some wording are extracted by the resize2fs man page *resize* [:][+/-][kKmMgGtTpPeE]|[:]max :: Resize a filesystem identified by for the underlying device devid *online*. + The devid can be found with *btrfs filesystem show* and defaults to 1 if not specified. The parameter specifies the new size of the filesystem. If the prefix + or - is present the size is increased or decreased by the quantity . If no units are specified, the unit of the parameter defaults to bytes. Optionally, the size parameter may be suffixed by one of the following units designators: \'K', \'M', \'G', \'T', \'P', or \'E', which represent KiB, MiB, GiB, TiB, PiB, or EiB, respectively. Case does not matter. + If \'max' is passed, the filesystem will occupy all available space on the device devid. + The resize command does not manipulate the size of underlying partition. If you wish to enlarge/reduce a filesystem, you must make sure you can expand the partition before enlarging the filesystem and shrink the partition after reducing the size of the filesystem. This can done using `fdisk`(8) or `parted`(8) to delete the existing partition and recreate it with the new desired size. When recreating the partition make sure to use the same starting disk cylinder as before. *show* [--mounted|--all-devices||||