Hi
I have a firewall with a 32 GB msata disk. I have another and new disk on the shelf that I will add to the firewall.
I want this to be a 100% moirrored disk that I can boot from by just changing boot order in bios.
This is what it looks like before I have added the second msata....
Now lets say I have added the new second disk...... I need some help with the steps to avoid reinstall
I have never done this with zfs+FreeBSD on the root disk and just want to be careful...
# 1 # - Clone partition table
I assume I first have to clone my partition table. According to the man page of gpart I could do it with:
# 2 # - Set up mirror
I guess this will work directly, but I cannot boot on the new disk if trying as I have no boot block. Right?
Will this use just partition 3 and leave the others (i.e not destroying my other partitions)? I mean... If the
second disk would have been blank, it would have created the partion with this command.
# 3 # - Make new disk bootable
Well... what is the proper way for me doing this based on my printed disk data above?
# 4 # - swap
will the swap work out of the box if booting on the second disk as the partiton is cloned? Or does it need any other prepp?
# 5 # - Make second disk the second boot option in bios
Any pro:s that can help me avoid a disk recovery caused by me doing the wrong things
Tnx in advance
/Peo
I have a firewall with a 32 GB msata disk. I have another and new disk on the shelf that I will add to the firewall.
I want this to be a 100% moirrored disk that I can boot from by just changing boot order in bios.
This is what it looks like before I have added the second msata....
Code:
13:07:26 xanadu:~ # gpart show -l
=> 40 61865904 ada0 GPT (30G)
40 1024 1 gptboot0 (512K)
1064 984 - free - (492K)
2048 4194304 2 swap0 (2.0G)
4196352 57667584 3 zfs0 (27G)
61863936 2008 - free - (1.0M)
13:05:48 xanadu:~ # zpool list -v
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 27G 5.38G 21.6G - - 7% 19% 1.00x ONLINE -
ada0p3 27G 5.38G 21.6G - - 7% 19%
13:06:30 xanadu:~ #
Now lets say I have added the new second disk...... I need some help with the steps to avoid reinstall
I have never done this with zfs+FreeBSD on the root disk and just want to be careful...
# 1 # - Clone partition table
I assume I first have to clone my partition table. According to the man page of gpart I could do it with:
/sbin/gpart backup ada0 | /sbin/gpart restore -F ada1
# 2 # - Set up mirror
I guess this will work directly, but I cannot boot on the new disk if trying as I have no boot block. Right?
Will this use just partition 3 and leave the others (i.e not destroying my other partitions)? I mean... If the
second disk would have been blank, it would have created the partion with this command.
zpool attach zroot ada0 ada1
# 3 # - Make new disk bootable
Well... what is the proper way for me doing this based on my printed disk data above?
gpart bootcode <what...> ada1
# 4 # - swap
will the swap work out of the box if booting on the second disk as the partiton is cloned? Or does it need any other prepp?
# 5 # - Make second disk the second boot option in bios
Any pro:s that can help me avoid a disk recovery caused by me doing the wrong things
Tnx in advance
/Peo