atom feed7 messages in org.freebsd.freebsd-fsIncreasing 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:Increasing ZFS Disk Sizes
From:Tim Gustafson (tj@tgustafson.com)
Date:Apr 23, 2012 8:22:11 pm
List:org.freebsd.freebsd-fs

Hi,

I've got a 9.0-RELEASE system that's installed using the hand mfsroot installer. My gpart tables look like this:

=> 34 976773101 ada0 GPT (465G) 34 128 1 freebsd-boot (64k) 162 33554432 2 freebsd-swap (16G) 33554594 943218541 3 freebsd-zfs (449G)

=> 34 976773101 ada1 GPT (465G) 34 128 1 freebsd-boot (64k) 162 33554432 2 freebsd-swap (16G) 33554594 943218541 3 freebsd-zfs (449G)

I'd like to increase the size of the freebsd-zfs partition. I was thinking of "breaking" my mirror, like this:

zpool detach tank ada0p3

and then swapping out one of the disks with a blank 2TB disk, and then running:

gpart create -s gpt ada0 gpart add -b 34 -s 64k -t freebsd-boot ada0 gpart add -s 16G -t freebsd-swap -l swap0 ada0 gpart add -t freebsd-zfs -l disk0 ada0 gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ada0

And then running:

zpool attach tank ada0p3

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:

/dev/gptid/47bc37af-873b-11e1-b913-003048b98c9e none swap sw 0 0

Would it be safe to change that to:

/dev/ada1p2 none swap sw 0 0

during the operation, and then back to ada0p2 when the re-silvering is complete?

Of course, once I'm done with the first disk, I will repeat the procedure for the second disk.

Thanks!