====== Btrfs ======
===== Snapshot =====
btrfs send /mnt/btr_backup/data.20150101 | btrfs receive /mnt/btr_pool/
btrfs subvolume snapshot /mnt/btr_pool/data.20150101 /mnt/btr_pool/data
btrfs subvolume delete /mnt/btr_pool/data.20150101
===== Scrub =====
btrfs scrub start /
Find files with csum error
find /mount-point -type f -exec cp {} /dev/null \;
===== Create Raid1 =====
btrfs fi show
btrfs device add /dev/xxx /
btrfs balance start -dconvert=raid1 -mconvert=raid1 /
===== Replace =====
Replace
echo 1 | sudo tee /sys/block/sdb/device/delete
btrfs filesystem show /mountpoint
btrfs replace start -B /dev/new-disk /mountpoint
btrfs replace status /mountpoint
iostat -d 1 -m
Balance
btrfs fi usage -T /mountpoint
btrfs device usage /mountpoint
btrfs filesystem balance
Replace and Disable reading from failed disk
btrfs replace start -r 5 /dev/nvme0n5 /mnt/raid10/
http://www.moocowproductions.org/2014/12/04/fully-online-raid1-to-raid10-migration-using-btrfs/
https://wiki.tnonline.net/w/Btrfs/Replacing_a_disk