Growing the root pool
By Stefan Hinker-Oracle on Jun 12, 2013
Some small inbetween laptop experiences... I finally decided to throw away that other OS (I used it so rarely that I regularily had to use the password reset procedure...). That gave me another 50g of valuable laptop disk space - furtunately on the right part of the disk. So in theory, all I'd have to do is resize the Solaris partition, tell ZFS about it and be happy... Of course, there are the usual pitfalls.
To avoid confusion, much of this is x86 related. On normal SPARC servers, you don't have any of the problems for which I describe solutions here...
First of all, you should *not* try to resize the partition that hosts your rpool while Solaris is up and running. It works, but there are nicer ways to do a shutdown. (What happens is that fdisk will not only create the new partition, but also write a default label in that partition, which means that ZFS will not find it's slice, which will make Solaris very unresponsive...) The right way to do this is to boot off something else (PXE, USB, DVD, whatever) and then change the partition size. Once that's done, re-create the slice for the ZFS rpool. The important part is to use the very same starting cylinder. The length, naturally, will be larger. (At least, I had to do that, since the original zpool lived in a slice.)
After that, it's back to the book: Boot Solaris and choose one of "zpool set autoexpand=on rpool" or "zpool online -e rpool c0t0d0s0" and there you go - 50g more space.
Did I forget to mention that I actually did a full backup before all of this? I must be getting old...