Hi,
I'm deploying my first FreeBSD server and I've run into a gray area. I installed using the automatic partitioning of the installer.
And
I'd like to add da2 & da3 to my zroot as a second mirror VDEV, but I'm unsure if I should just add the whole disk or copy the partition table and copy the boot code.
I've already figured I can backup | restore the partition tables:
Then copy the boot code?
This is what came up with from searching the forums, but as I installed using UEFI+BIOS, will this work for both the efi and freebsd-boot partitions?
Then add swap to /etc/fstab
And finally, add the mirror to the pool:
So, do i have it right? Or am I about to bork my installation? Also, adding a mirror to the pool should not require a resilver, but a scrup would be recommended to balance the VDEVs, right?
I'm deploying my first FreeBSD server and I've run into a gray area. I installed using the automatic partitioning of the installer.
zpool status
shows:
Code:
pool: zroot
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
da0p4 ONLINE 0 0 0
da1p4 ONLINE 0 0 0
errors: No known data errors
And
gpart show
returns (note: da2 & da3 are from an orphaned installation):
Code:
=> 40 23437770672 da1 GPT (11T)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 16777216 3 freebsd-swap (8.0G)
17311744 23420456960 4 freebsd-zfs (11T)
23437768704 2008 - free - (1.0M)
=> 40 23437770672 da3 GPT (11T)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 33554432 2 freebsd-swap (16G)
33556480 23404212224 3 freebsd-zfs (11T)
23437768704 2008 - free - (1.0M)
=> 40 23437770672 da2 GPT (11T)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 33554432 2 freebsd-swap (16G)
33556480 23404212224 3 freebsd-zfs (11T)
23437768704 2008 - free - (1.0M)
=> 40 23437770672 da0 GPT (11T)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 984 - free - (492K)
534528 16777216 3 freebsd-swap (8.0G)
17311744 23420456960 4 freebsd-zfs (11T)
23437768704 2008 - free - (1.0M)
I'd like to add da2 & da3 to my zroot as a second mirror VDEV, but I'm unsure if I should just add the whole disk or copy the partition table and copy the boot code.
I've already figured I can backup | restore the partition tables:
Code:
gpart backup da0 | gpart restore -F da2 da3
Then copy the boot code?
Code:
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da2
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da3
This is what came up with from searching the forums, but as I installed using UEFI+BIOS, will this work for both the efi and freebsd-boot partitions?
Then add swap to /etc/fstab
Code:
# Device Mountpoint FStype Options Dump Pass#
/dev/gpt/efiboot0 /boot/efi msdosfs rw 2 2
/dev/da0p3 none swap sw 0 0
/dev/da1p3 none swap sw 0 0
/dev/da2p3 none swap sw 0 0
/dev/da3p3 none swap sw 0 0
And finally, add the mirror to the pool:
Code:
zpool add zroot mirror /dev/da2p4 da3p4
So, do i have it right? Or am I about to bork my installation? Also, adding a mirror to the pool should not require a resilver, but a scrup would be recommended to balance the VDEVs, right?