atom feed7 messages in org.freebsd.freebsd-fsRe: Increasing ZFS Disk Sizes
FromSent OnAttachments
Tim GustafsonApr 23, 2012 8:22 pm 
Matthew SeamanApr 23, 2012 11:11 pm 
Peter MaloneyApr 23, 2012 11:48 pm 
Daniel KalchevApr 24, 2012 12:00 am 
Johannes TotzApr 24, 2012 6:53 am 
Tim GustafsonApr 24, 2012 7:10 am 
George HartzellApr 24, 2012 12:24 pm 
Subject:Re: Increasing ZFS Disk Sizes
From:George Hartzell (hart@alerce.com)
Date:Apr 24, 2012 12:24:58 pm
List:org.freebsd.freebsd-fs

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.