larger disk for a zfs pool

andrew clarke mail at ozzmosis.com
Mon Aug 1 15:27:31 UTC 2011


On Mon 2011-08-01 17:05:02 UTC+0200, Dick Hoogendijk (dick at nagual.nl) wrote:

> But I'm confused about the gpart thing I did on the original disks.
> 
> $ gpart show
> =>       34  156301421  ad4  GPT  (75G)
>           34        128    1  freebsd-boot  (64K)
>          162    8388608    2  freebsd-swap  (4.0G)
>      8388770  147912685    3  freebsd-zfs  (71G)
> 
> =>       34  156301421  ad6  GPT  (75G)
>           34        128    1  freebsd-boot  (64K)
>          162    8388608    2  freebsd-swap  (4.0G)
>      8388770  147912685    3  freebsd-zfs  (71G)

> Do I repeat this gpart section on the new disk(s) before putting them in 
> the rpool (one at a time).

Basically yes.  Both drives in the mirror need the freebsd-boot
partition, otherwise the drive without freebsd-boot won't be bootable
if the other drive fails to boot.

freebsd-swap can be any size.  The sector count of the freebsd-zfs
partition on the new drive needs to be equal or greater to the
existing sector count, though.  147912685 in your case.  gpart should
do that automatically if the replacement drive is larger and you tell
it just to use the remaining space.

Don't forget this step:

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i nnn device

>  Is it compatrible to putting the solaris bootcode on disk before
>  attaching them to a rootpool and resilvering? I want to expand my
>  rootpool but am a little confused about the right procedure.

I've not used Solaris, but I assume so.

Regards
Andrew


More information about the freebsd-questions mailing list