Skip to content

Instantly share code, notes, and snippets.

@Brli
Last active June 11, 2016 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Brli/a00ffb3098eb072024f997c88e284803 to your computer and use it in GitHub Desktop.
Save Brli/a00ffb3098eb072024f997c88e284803 to your computer and use it in GitHub Desktop.
Btrfs mantainance
# btrfs fi df /directory

should get

example result
___
Data, single: total=29.88GiB, used=12.72GiB
System, single: total=4.00MiB, used=16.00KiB
Metadata, single: total=272.00MiB, used=190.72MiB
GlobalReserve, single: total=64.00MiB, used=0.00B

compare it with

# btrfs fi show /directory
example result
___
Label: none  uuid: UUID-HERE
        Total devices 1 FS bytes used 12.91GiB
        devid    1 size 30.15GiB used 30.15GiB path /dev/sda2

the used part looks bad :/ caculate the real percentage of used space, and do

# btrfs balance start -dusage='<the percentage(>10), eg. 30>' /direcotry

everything should be fine again check it with

# btrfs fi show /directory

again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment