zfs实践

https://blog.programster.org/zfs-create-disk-pools

https://techandtrains.com/2013/05/06/replacing-a-disk-in-zfs-mirror/

https://docs.oracle.com/cd/E19253-01/819-5461/gazgd/index.html

https://docs.oracle.com/cd/E19253-01/819-5461/gazgm/index.html

https://www.jianshu.com/p/80ac8c666227

Raid 1

To create a RAID1 pool (or mirror), simply add the command mirror when creating or adding drives. For example:

sudo zpool create  -f [new pool name] mirror /dev/sdb /dev/sdc

sudo zpool add [existing pool name] mirror /dev/sdd /dev/sde

zpool status

zfs list

zpool create -f myraid1 mirror /dev/sda1 /dev/sdb1

root@pve /root# zfs mount -a

模拟

zpool offline myraid1 sda

zpool status myraid1

zpool offline myraid1 sda

mkfs.ext4 /de/sda

zpool online myraid1 sda

zpool replace -f myraid1 sda

zpool online myraid1 sda

zpool status myraid1

    A+
发布日期:2021年07月27日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: