Procedure to replace a zfs on root disk (zroot)
Редактиране на публикация
Switch to draftПрегледОбновяванеДобавяне на заглавие
The procedure, as typed, for replacing ada2 with ada8:
# gpart backup ada2 | gpart restore -F ada8
# zpool replace zroot /dev/ada2p3 /dev/ada8p3 (wait for resilver
checking via "zpool status")
# swapoff /dev/ada2p2
# swapon /dev/ada8p2
( verify via swapinfo )
If the size of the new disk is different it is better instead of gpart backup/restore step do:
# zpool set autoexpand=on zroot
# gpart show
# gpart create -s gpt ada8
# gpart add -a 4k -s 512k -t freebsd-boot -l gptboot2 ada8
# gpart add -a 4k -s 4G -t freebsd-swap -l zfs2 ada8
# gpart add -a 4k -t freebsd-zfs -l zfs2 ada8