btrfs-progs/Documentation
David Sterba 7ab0c46a81 btrfs-progs: fi usage: fix unallocated and print total and slack
The size reported as Unallocated in the table was different that the one
in the listing, calculated differently. The values should reflect the
unallocated area available for the filesystem - not necessarily the
total size of the device. If there's such slack space it's reported
separately.

The values in the table mean:

- Unallocated: block device size - slack - allocated
- Total:       block device size - slack
- Slack:       block device size - filesystem

The new columns make the table wider but the values are deemed to be
important by users and for filesystems with normal profiles it fits
under reasonable line width. During balance or with multiple profiles it
can get wider but this should not be a serious problem.

Example output:

Overall:
    Device size:                  13.00GiB
    Device allocated:            536.00MiB
    Device unallocated:           12.48GiB
    Device missing:                  0.00B
    Device slack:                  1.00GiB
    Used:                          2.31MiB
    Free (estimated):             12.48GiB      (min: 6.24GiB)
    Free (statfs, df):            12.48GiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:                3.50MiB      (used: 0.00B)
    Multiple profiles:                  no

              Data    Metadata  System
Id Path       single  DUP       DUP      Unallocated Total    Slack
-- ---------- ------- --------- -------- ----------- -------- -------
 1 /dev/loop0 8.00MiB 512.00MiB 16.00MiB     2.48GiB  3.00GiB 1.00GiB
 2 /dev/loop1       -         -        -    10.00GiB 10.00GiB       -
-- ---------- ------- --------- -------- ----------- -------- -------
   Total      8.00MiB 256.00MiB  8.00MiB    12.48GiB 13.00GiB 1.00GiB
   Used       2.00MiB 144.00KiB 16.00KiB

Issue: #508
Pull-request: #509 (partial fix)
Signed-off-by: David Sterba <dsterba@suse.com>
2022-10-11 09:06:12 +02:00
..
_static btrfs-progs: docs: update template, more about subvolumes 2022-01-11 15:46:33 +01:00
_templates btrfs-progs: docs: update template, more about subvolumes 2022-01-11 15:46:33 +01:00
Administration.rst btrfs-progs: docs: move flexibility to Administration 2022-05-17 21:12:19 +02:00
Auto-repair.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
Balance.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
CHANGES.rst btrfs-progs: docs: distinguish Changes title 2022-08-16 15:18:10 +02:00
Checksumming.rst btrfs-progs: docs: add more chapters 2021-12-17 11:53:44 +01:00
CmdLineConventions btrfs-progs: fix a bunch of typos 2022-02-01 18:40:53 +01:00
CodingConventions btrfs-progs: docs: document conventions 2017-07-03 13:35:10 +02:00
Common-features.rst btrfs-progs: docs: update file attributes 2022-03-08 18:11:40 +01:00
Compression.rst btrfs-progs: docs: add more chapters 2021-12-17 11:53:44 +01:00
Contributors.rst btrfs-progs: docs: update kernel 5.19 contributor stats 2022-08-16 15:18:12 +02:00
Convert.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
Custom-ioctls.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
Deduplication.rst btrfs-progs: docs: update some chapters 2022-01-05 00:44:14 +01:00
Defragmentation.rst btrfs-progs: docs: update some chapters 2022-01-05 00:44:14 +01:00
DocConventions.rst btrfs-progs: docs: fix spinx build warnings 2022-08-16 15:18:10 +02:00
Experimental.rst btrfs-progs: docs: convert Experimental.md to RST 2022-05-17 23:11:03 +02:00
Feature-by-version.rst btrfs-progs: docs: add new 5.19 features 2022-09-10 22:47:24 +02:00
Glossary.rst btrfs-progs: docs: update Gloassary 2022-06-06 15:48:15 +02:00
Hardware.rst btrfs-progs: docs: separate chapter for hardware considerations 2022-05-17 21:12:19 +02:00
INSTALL.rst btrfs-progs: docs: link INSTALL to docs 2022-05-12 13:56:03 +02:00
Inline-files.rst btrfs-progs: docs: update some chapters 2022-01-05 00:44:14 +01:00
Interoperability.rst btrfs-progs: docs: add more chapters 2021-12-17 11:53:44 +01:00
Introduction.rst btrfs-progs: docs: fix superscript formatting 2022-05-20 23:52:20 +02:00
Kernel-by-version.rst btrfs-progs: docs: add stub page for kernel changes 2022-09-10 22:47:27 +02:00
Makefile.in btrfs-progs: docs: convert btrfs-ioctl.asciidoc to RST 2022-05-18 13:28:35 +02:00
Qgroups.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
Quick-start.rst btrfs-progs: docs: add more of the new doc structure 2021-11-30 16:00:48 +01:00
Reflink.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
ReleaseChecklist btrfs-progs: Update README and other docs 2016-11-23 11:07:05 +01:00
Resize.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
Scrub.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
Seeding-device.rst btrfs-progs: docs: add more chapters 2021-12-17 11:53:44 +01:00
Send-receive.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
Source-repositories.rst btrfs-progs: docs: fix spinx build warnings 2022-08-16 15:18:10 +02:00
Subpage.rst btrfs-progs: docs: update header formatting 2022-05-20 23:59:40 +02:00
Subvolumes.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
Swapfile.rst btrfs-progs: docs: split swapfile from section 5 2022-01-11 23:56:48 +01:00
Tree-checker.rst btrfs-progs: docs: copy more contents from wiki 2022-05-17 21:12:19 +02:00
Trim.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
Volume-management.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
Zoned-mode.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
btrfs-balance.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
btrfs-check.rst btrfs-progs: docs: convert btrfs-check to rst 2021-10-29 17:30:04 +02:00
btrfs-convert.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
btrfs-device.rst btrfs-progs: device: add replace subcommand as alias to 1st level command 2022-08-16 15:18:11 +02:00
btrfs-filesystem.rst btrfs-progs: fi usage: fix unallocated and print total and slack 2022-10-11 09:06:12 +02:00
btrfs-find-root.rst btrfs-progs: docs: convert btrfs-find-root to rst 2021-10-29 17:30:04 +02:00
btrfs-image.rst btrfs-progs: docs: convert btrfs-image to rst 2021-10-29 17:30:04 +02:00
btrfs-inspect-internal.rst btrfs-progs: docs: convert btrfs-inspect-internal to rst 2021-10-29 17:30:04 +02:00
btrfs-ioctl.rst btrfs-progs: docs: convert btrfs-ioctl.asciidoc to RST 2022-05-18 13:28:35 +02:00
btrfs-man5.rst btrfs-progs: docs: copy more contents from wiki 2022-05-17 21:12:19 +02:00
btrfs-map-logical.rst btrfs-progs: docs: convert btrfs-map-logical to rst 2021-10-29 17:30:04 +02:00
btrfs-property.rst btrfs-progs: docs: reformat btrfs-property manual page 2022-06-06 15:47:57 +02:00
btrfs-qgroup.rst btrfs-progs: docs: convert btrfs-qgroup to rst 2021-10-29 17:30:03 +02:00
btrfs-quota.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
btrfs-receive.rst btrfs-progs: receive: encoded_write fallback to explicit decode and write 2022-06-07 13:59:32 +02:00
btrfs-replace.rst btrfs-progs: docs: RST formatting fixups 2021-11-18 10:17:21 +01:00
btrfs-rescue.rst btrfs-progs: rescue: introduce clear-uuid-tree 2021-11-22 21:45:37 +01:00
btrfs-restore.rst btrfs-progs: docs: convert btrfs-restore to rst 2021-10-29 17:30:03 +02:00
btrfs-scrub.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
btrfs-select-super.rst btrfs-progs: docs: add sample RSTified manual page 2021-10-29 17:30:03 +02:00
btrfs-send.rst btrfs-progs: send: stream v2 ioctl flags 2022-06-07 13:59:33 +02:00
btrfs-subvolume.rst btrfs-progs: docs: make description of list output more clear 2022-06-06 15:48:03 +02:00
btrfs.rst btrfs-progs: docs: convert btrfs(8) to rst 2021-10-29 17:30:04 +02:00
btrfsck.8 btrfs-progs: docs: use manual page link instead of symlink 2018-10-23 14:48:39 +02:00
btrfstune.rst btrfs-progs: btrfstune: add the ability to convert to block group tree feature 2022-09-12 18:25:32 +02:00
ch-balance-filters.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
ch-balance-intro.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
ch-bootloaders.rst btrfs-progs: docs: separate bootloaders chapter 2022-05-17 21:12:19 +02:00
ch-checksumming.rst btrfs-progs: docs: more docs updates 2022-01-10 16:20:34 +01:00
ch-compression.rst btrfs-progs: docs: clarify zstd level mapping 2022-02-16 22:48:01 +01:00
ch-convert-intro.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
ch-file-attributes.rst btrfs-progs: docs: update file attributes 2022-03-08 18:11:40 +01:00
ch-flexibility.rst btrfs-progs: docs: move flexibility to Administration 2022-05-17 21:12:19 +02:00
ch-fs-limits.rst btrfs-progs: docs: fix superscript formatting 2022-05-20 23:52:20 +02:00
ch-hardware-considerations.rst btrfs-progs: docs: update header formatting 2022-05-20 23:59:40 +02:00
ch-mount-options.rst btrfs-progs: docs: split mount options 2022-01-12 00:09:29 +01:00
ch-quota-intro.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
ch-scrub-intro.rst btrfs-progs: docs: add more chapters (part 2) 2021-12-17 11:53:44 +01:00
ch-seeding-device.rst btrfs-progs: docs: copy more contents from wiki 2022-05-17 21:12:19 +02:00
ch-subvolume-intro.rst btrfs-progs: docs: update template, more about subvolumes 2022-01-11 15:46:33 +01:00
ch-swapfile.rst btrfs-progs: docs: split swapfile from section 5 2022-01-11 23:56:48 +01:00
ch-volume-management-intro.rst btrfs-progs: docs: add more chapters (part 3) 2021-12-17 15:35:10 +01:00
ch-zoned-intro.rst btrfs-progs: zoned: add upper and lower zone size boundaries 2022-06-06 15:47:50 +02:00
conf.py btrfs-progs: docs: set version from VERSION file 2022-02-16 23:24:12 +01:00
dev-send-stream.rst btrfs-progs: docs: add send stream format description 2022-08-16 15:18:11 +02:00
fsck.btrfs.rst btrfs-progs: docs: convert fsck.btrfs to rst 2021-10-29 17:30:03 +02:00
index.rst btrfs-progs: docs: add stub page for kernel changes 2022-09-10 22:47:27 +02:00
man-index.rst btrfs-progs: docs: drop indices from pages 2021-11-26 00:48:24 +01:00
mkfs.btrfs.rst btrfs-progs: docs: fix typo in mkfs.btrfs 2022-06-06 15:48:00 +02:00
trouble-index.rst btrfs-progs: docs: update troubleshooting 2022-08-16 15:18:11 +02:00