# check / repair sudo btrfs check /dev/sdc1 sudo btrfs check --repair /dev/sdc1 sudo btrfs check --clear-space-cache v1|v2 /dev/sdc1 # subvolume btrfs subvolume create current btrfs subvolume snapshot current 2018-01-04 btrfs subvolume snapshot -r current 2018-01-04 # read only sudo btrfs subvolume list . # restrict list to `dir`, given that `dir` is a subvolume on its own sudo btrfs subvolume list -o dir/ sudo btrfs subvolume delete 2018-01-04 # set / unset readonly btrfs property set -ts subvol ro false # send/receive - src needs to be subvolume - have to create readonly snapshot of src before syncing - `send` compares two readonly snapshots, need to keep old one around - `send` seems to be root, `receive` also. confirm? # init btrfs subvolume create src btrfs subvolume snapshot -r src src-`date -Iminutes` sudo btrfs send src-2018-01-18T14\:52+01\:00 | sudo btrfs receive backup/ # increment btrfs subvolume snapshot -r src src-`date -Iminutes` sudo btrfs send -p src-2018-01-18T14\:52+01\:00 src-2018-01-18T14\:57+01\:00 | sudo btrfs receive backup/ # raid btrfs filesystem show btrfs filesystem df /mnt/ sudo mkfs.btrfs /dev/sda1 -L label sudo btrfs device add /dev/sda2 /mnt/ sudo btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/ sudo btrfs device delete /dev/sda1 /mnt/ sudo btrfs balance pause /mnt/ sudo btrfs balance start -f -mconvert=single -dconvert=single /mountpoint sudo btrfs device remove missing /mountpoint sudo btrfs balance start -mconvert=dup /mountpoint