差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
btrfs [2023/06/11 01:02] jz |
btrfs [2023/06/11 01:10] (目前版本) jz |
||
---|---|---|---|
行 20: | 行 20: | ||
</code> | </code> | ||
- | ===== Raid1 ===== | + | ===== Create Raid1 ===== |
<code> | <code> | ||
btrfs fi show | btrfs fi show | ||
行 28: | 行 28: | ||
===== Replace ===== | ===== Replace ===== | ||
+ | Replace | ||
<code> | <code> | ||
echo 1 | sudo tee /sys/block/sdb/device/delete | echo 1 | sudo tee /sys/block/sdb/device/delete | ||
btrfs filesystem show /mountpoint | btrfs filesystem show /mountpoint | ||
btrfs replace start -B <devid> /dev/new-disk /mountpoint | btrfs replace start -B <devid> /dev/new-disk /mountpoint | ||
- | btrfs replace status | + | btrfs replace status /mountpoint |
iostat -d 1 -m <target-dev> | iostat -d 1 -m <target-dev> | ||
</code> | </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/ | http://www.moocowproductions.org/2014/12/04/fully-online-raid1-to-raid10-migration-using-btrfs/ | ||
+ | https://wiki.tnonline.net/w/Btrfs/Replacing_a_disk |