You might need to replace a disk in the root pool for the following reasons:
The root pool is too small and you want to replace it with a larger disk
The root pool disk is failing. In a non-redundant pool, if the disk is failing so that the system won't boot, you'll need to boot from an alternate media, such as a CD or the network, before you replace the root pool disk.
If you use the zpool replace command to replace a disk in a root pool disk, you will need to apply the boot blocks manually.
In a mirrored root pool configuration, you might be able to attempt a disk replacement without having to boot from alternate media. You can replace a failed disk by using the zpool replace command or if you have an additional disk, you can use the zpool attach command. See the steps below for an example of attaching an additional disk and detaching a root pool disk.
Systems with SATA disks require that you offline and unconfigure a disk before attempting the zpool replace operation to replace a failed disk. For example:
# zpool offline rpool c1t0d0 # cfgadm -c unconfigure c1::dsk/c1t0d0 <Physically remove failed disk c1t0d0> <Physically insert replacement disk c1t0d0> # cfgadm -c configure c1::dsk/c1t0d0 # zpool online rpool c1t0d0 # zpool replace rpool c1t0d0 # zpool status rpool <Let disk resilver before installing the boot blocks> x86# bootadm install-bootloader
On some hardware, you do not have to online or reconfigure the replacement disk after it is inserted.
# zpool attach rpool c2t0d0 c2t1d0 Make sure to wait until resilver is done before rebooting.
The correct disk labeling and the boot blocks are applied automatically.
# zpool status rpool pool: rpool state: ONLINE scan: resilvered 11.6G in 0h5m with 0 errors on Fri Jul 20 12:06:07 2012 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c2t0d0 ONLINE 0 0 0 c2t1d0 ONLINE 0 0 0 errors: No known data errors
# zpool detach rpool c2t0d0
Determine the existing rpool pool size:
# zpool list rpool NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 29.8G 152K 29.7G 0% 1.00x ONLINE -
# zpool set autoexpand=on rpool
Review the expanded rpool pool size:
# zpool list rpool NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 279G 146K 279G 0% 1.00x ONLINE -
Reconfigure the system BIOS.