Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2012 12:25:21 -0700
From:      George Hartzell <hartzell@alerce.com>
To:        Johannes Totz <johannes@jo-t.de>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Increasing ZFS Disk Sizes
Message-ID:  <20374.65057.207126.29371@gargle.gargle.HOWL>
In-Reply-To: <jn6b8m$3k5$1@dough.gmane.org>
References:  <CACMcHMdCaJjE1Ao7jN156tK%2ByNHDCyEZ-wam489jq2JhCJd%2BnA@mail.gmail.com> <4F964429.5060607@infracaninophile.co.uk> <jn6b8m$3k5$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20374.65057.207126.29371>