User Tools

Site Tools







newpage

linux:filesystems:brtfs

This is an old revision of the document!


Table of Contents

btrfs

  • needs a non-btrfs boot partition - grub2 doesn't handle brtfs compression, etc.
  • apt-get install apt-btrfs-snapshot - for automatic snapshots during apt actions

IMPORTANT:

do not run with an old kernel! jessie 3.16 is TOO OLD - crashes and rebootloops when balancing!!

install 4.0 from jessie backports https://backports.debian.org/Instructions/

optimize

COW is not good for small files like database files:

disable it for a directory:

chattr -R +C /var/lib/mysql

check:

lsattr /var/lib/

balance reorders metadata - use after a lot data has changed or disc was full:

fast:

btrfs fi balance start -dusage=5 /

good:

btrfs bal start -v -dusage=51  /

..watch the process:

btrfs bal stat /

weekly cron “fsck”:

btrfs scrub start -c3 /

defrag and compress:

btrfs fi defrag -v -r -czlib /home/backup

or set mount-option “autodefrag”

remove dups:

duperemove  FIXME

If btrfs runs on a md raid or in raid mode, you can disable the metadata duplication for better performance

btrfs bal start -v -f -mconvert=single -sconvert=single /

or re-enable them

btrfs bal start -v -f  -mconvert=dup -sconvert=dup /

he ho the disc is full

the computer may get slow and even freeze up! altough df shows free space :-0

only this shows the real free space:

btrfs fi df /home/

see, if the device was full:

btrfs filesystem show 

if the device was full, reorder chunks - kind of defrag:

btrfs fi balance start -dusage=5 /home/


linux/filesystems/brtfs.1475182869.txt.gz · Last modified: 2016/09/29 23:01 by tkilla