Solaris ZFS Administration Guide

ZFS Device Replacement Enhancements

Solaris Express Community Edition, build 117: In this Solaris release, a system event or sysevent is provided when an underlying device is expanded. ZFS has been enhanced to recognize these events and adjusts the pool based on the new size of the expanded LUN, depending on the setting of the autoexpand property. You can use the autoexpand property pool to enable or disable automatic pool expansion when a dynamic LUN expansion event is received.

These features enable you to expand a LUN and the resulting pool can access the expanded space without having to export and import pool or reboot the system.

For example, automatic LUN expansion is enabled on the tank pool.


# zpool set autoexpand=on tank

Or , you can create the pool with the autoexpand property enabled.


# zpool create -o autoexpand=on tank c1t13d0

The autoexpand property is disabled by default so you can decide whether you want the LUN expanded or not.

A LUN can also be expanded by using the zpool online -e command. For example:


# zpool online -e tank c1t6d0

Or, you can reset the autoexpand property after the LUN is attached or made available by using the zpool replace feature. For example, the following pool is created with one 8-Gbyte disk (c0t0d0). The 8-Gbyte disk is replaced with a 16-Gbyte disk (c1t13d0), but the pool size is not expanded until the autoexpand property is enabled.


# zpool create pool c0t0d0
# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
pool  8.44G  76.5K  8.44G     0%  ONLINE  -
# zpool replace pool c0t0d0 c1t13d0
# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
pool  8.44G  91.5K  8.44G     0%  ONLINE  -
# zpool set autoexpand=on pool
# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
pool  16.8G   91.5K  16.8G     0%  ONLINE  -

Another way to expand the LUN in the above example without enabling the autoexpand property, is to use the zpool online -e command even though the device is already online. For example:


# zpool create tank c0t0d0
# zpool list tank
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank  8.44G  76.5K  8.44G     0%  ONLINE  -
# zpool replace tank c0t0d0 c1t13d0
# zpool list tank
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank  8.44G  91.5K  8.44G     0%  ONLINE  -
# zpool online -e tank c1t13d0
# zpool list tank
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank  16.8G    90K  16.8G     0%  ONLINE  -

Additional device replacement enhancements in this release include the following features:

For more information about replacing devices, see Replacing Devices in a Storage Pool.