Increasing ZFS Disk Sizes
George Hartzell
hartzell at alerce.com
Tue Apr 24 19:25:28 UTC 2012
Johannes Totz writes:
> On 24/04/2012 07:11, Matthew Seaman wrote:
> > On 24/04/2012 04:22, Tim Gustafson wrote:
> >> Am I missing anything here, or is the this "safe" way to do this? Do
> >> I need to do anything special (other than the gpart bootcode command)
> >> to make the new disk bootable? Do I need to do anything special to
> >> set up the swap partition? Right now, I have this in my /etc/fstab:
> >
> > Yes, this is a good way to do this change. The only better way would be
> > to add the 2TB disk to the mirror first -- thus making a three way
> > mirror, let that resilver, and then remove one of the old drives. But
> > that requires you to have available spare disk slots.
>
> Don't forget to scrub first.
> Also might want to consider a zpool split, instead of detach. So that
> you have two disks with usable data in case the to-be-resilvered-from
> disk dies unexpectedly.
> [...]
Be careful about the split, it seems to leave a bootable ZFS mirror
unbootable. I have a bug open (kern/166566) that Andriy Gapon is
looking into it. My understanding of the current suspect is that
GUID's are changed unexpected and/or inconsistently and/or
incompletely.
I seem to be able to fix the problem by booting via a live CD,
importing the pool and copying the resulting zpool.cache file to the
bootable pool, e.g.
zpool split zroot zsplitroot
# ... frustration ensues
boot live cd
zpool import # lists new pools, e.g. zroot and zsplitroot
zpool import -f -o cachefile=/tmp/zpool.cache \
-o altroot=/mnt zroot
mount -t zfs zroot /mnt # I don't have things automagically mount
cp /tmp/zpool.cache /mnt/boot/zfs/zpool.cache
reboot
g.
More information about the freebsd-fs
mailing list