顯示頁面 舊版 反向連結 本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 ====== Btrfs ====== ===== Snapshot ===== <code bash> 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 </code> ===== Scrub ===== <code bash> btrfs scrub start / </code> Find files with csum error <code bash> find /mount-point -type f -exec cp {} /dev/null \; </code> ===== Create Raid1 ===== <code> btrfs fi show btrfs device add /dev/xxx / btrfs balance start -dconvert=raid1 -mconvert=raid1 / </code> ===== Replace ===== Replace <code> echo 1 | sudo tee /sys/block/sdb/device/delete btrfs filesystem show /mountpoint btrfs replace start -B <devid> /dev/new-disk /mountpoint btrfs replace status /mountpoint iostat -d 1 -m <target-dev> </code> Balance <code> btrfs fi usage -T /mountpoint btrfs device usage /mountpoint btrfs filesystem balance </code> Replace and Disable reading from failed disk <code> btrfs replace start -r 5 /dev/nvme0n5 /mnt/raid10/ </code> http://www.moocowproductions.org/2014/12/04/fully-online-raid1-to-raid10-migration-using-btrfs/ https://wiki.tnonline.net/w/Btrfs/Replacing_a_disk