Hi everybody,
I have a Freebsd 11.0 system installed on a single GPT partitioned disk (ada0).
I would like to create a mirror using an identical blank disk (ada1). I read that mirroring a full GTP disk may lead to system instability but that I may try to create a mirror for each partition. I would like to apply the following procedure, do you see any error/danger in it?
1) Backup/Restore the partitions from ada0 to ada1 using gpart
2) Create a mirror for the boot partition adding ada0p1 first and then inserting ada1p1
3) Create a mirror for the swap partition adding ada0p3 first and then inserting ada1p3
4) Create a mirror for the root partition adding ada1p2 first
4.1) Create a new filesystem on mirror/root
4.2) reboot in single user mode
4.3) rsync / from ada0p1 to the newly created mirror
4.4) modify /etc/fstab to mount the mirrored root and swap, reboot
4.5) check that everything works!
4.6) insert ada0p2 into the root mirror
Thanks for your advices!
Francesco
I have a Freebsd 11.0 system installed on a single GPT partitioned disk (ada0).
I would like to create a mirror using an identical blank disk (ada1). I read that mirroring a full GTP disk may lead to system instability but that I may try to create a mirror for each partition. I would like to apply the following procedure, do you see any error/danger in it?
1) Backup/Restore the partitions from ada0 to ada1 using gpart
gpart backup ada0 > table.ada0
gpart restore ada1 < table.ada0
2) Create a mirror for the boot partition adding ada0p1 first and then inserting ada1p1
gmirror label -v boot ada0p1
gmirror insert boot ada1p1
3) Create a mirror for the swap partition adding ada0p3 first and then inserting ada1p3
gmirror label -v swap ada0p3
gmirror insert swap ada1p3
4) Create a mirror for the root partition adding ada1p2 first
gmirror label -v root ada1p2
4.1) Create a new filesystem on mirror/root
newfs -U /dev/mirror/root
4.2) reboot in single user mode
4.3) rsync / from ada0p1 to the newly created mirror
mount /dev/mirror/root /mnt/bkup
rsync -av --exclude={"/dev/*","/proc/*","/tmp/*","/mnt/*"} / /mnt/bkup
4.4) modify /etc/fstab to mount the mirrored root and swap, reboot
4.5) check that everything works!
4.6) insert ada0p2 into the root mirror
gmirror insert root ada0p2
Thanks for your advices!
Francesco