How to add a new disk to ZFS and make it available existing mountpoints if the current pool is root pool

solariszfszpool

My S11 server has the following configuration:

disk #1 is used for rpool, which is the root pool
I want to add disk #2 to increase the size available for the already mounted folders, but I can't add the disk to the existing rpool because its the root-pool.

Is there a way to make the new disk available for the "/" folder?
Is my only option to create a new zpool and mount it under a new folder?

Thanks.

RaamEE


 root@raamee:~# zpool status
  pool: rpool
 state: ONLINE
 status: The pool is formatted using an older on-disk format. The pool can
         still be used, but some features are unavailable.
 action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
         pool will no longer be accessible on older software versions.
  scan: none requested
 config:

         NAME        STATE     READ WRITE CKSUM
         rpool       ONLINE       0     0     0
           c4t0d0s0  ONLINE       0     0     0

root@raamee:~# zfs list
NAME                       USED  AVAIL  REFER  MOUNTPOINT
rpool                      130G  4.18G  4.59M  /rpool
rpool/ROOT                 101G  4.18G    31K  legacy
rpool/ROOT/S11-GA          152M  4.18G  7.33G  /
rpool/ROOT/S11-GA/var     17.4M  4.18G  5.20G  /var
rpool/VARSHARE             180K  4.18G   180K  /var/share
rpool/dump                8.25G  4.43G  8.00G  -
rpool/guests                31K  4.18G    31K  /guests
rpool/scratch             2.52M  4.18G  2.52M  /scratch
rpool/swap                20.6G  4.81G  20.0G  -

root@raamee:~# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c4t0d0 <FUJITSU-MBB2147RCSUN146G-0505 cyl 17845 alt 2 hd 255 sec 63>
          /pci@7b,0/pci1022,7458@11/pci1000,3060@2/sd@0,0
          /dev/chassis/SYS/HD0/disk
       1. c4t1d0 <FUJITSU-MBB2147RCSUN146G-0505-136.73GB>
          /pci@7b,0/pci1022,7458@11/pci1000,3060@2/sd@1,0
          /dev/chassis/SYS/HD1/disk

Best Answer

Attach the second disk as a mirror of the first, wait for resilver, remove the first disk, set the properties to autoexpand. Don't forget to setup boot code or anything like that. Example:

zpool attach rpool olddisk newdisk
...wait, check using zpool status rpool
zpool detach rpool olddisk
zpool set autoexpand=on rpool