- attach a mirror device to the rpool
- reboot off the mirror (to verify everything works).
- split the original disk from the pool.
- set the “autoexpand” property of the rpool
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 [email protected][email protected][email protected][email protected],2/LSILogic,[email protected][email protected]
– 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
# zpool set autoexpand=on rpool