Knowledgebase : Operating System

With Solaris 11, Oracle introduces the new zpool split command to split the ZFS pool (SPARC / x86 ). This comes in handy to increase the size of the rpool. Below are the high level steps involved :

Steps Involved

  1. attach a mirror device to the rpool
  2. reboot off the mirror (to verify everything works).
  3. split the original disk from the pool.
  4. set the “autoexpand” property of the rpool

Detailed procedure

1. Assuming that your initial rpool has the disk c0t0d0s0 and that you have a new disk c1t1d0s0 that is the size that you want to expand to. We will attach the new device c1t1d0s0 to the exisitng rpool.

# zpool attach rpool c0t0d0s0 c1t1d0s0

2. Now wait for the resilvering to complete. You can track this with :

# zpool status rpool

3. At this point, you can reboot from the mirror disk to verify that it works.
– On Sparc, you can do this by setting OBP to boot from the mirror disk c1t1d0s0, e.g.:

# init 6      ( or init 0 if you have autoboot set to true)
ok> boot /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@1

– On x86, you would configure the system BIOS.

4. And then we detach the old sub-mirror.

# zpool split rpool oldrpool c0t0d0s0

Now if you look at the pool it will show only one device (the new disk) but at the old size. You will also see a pool called “oldrpool” with the old disk that we split off. At this point, you should be able to boot from either of the two disks, but each will be a distinct rpool.

5. In order to expand the rpool size to that of the new disks we added, we need to tell zfs to expand to the capacity of the new disk. To do so, we have to set the autoexpand property on.

# zpool set autoexpand=on rpool