Software >> OS >> Unix >> Solaris >> ZFS >> How to create a new pool by splitting a mirrored ZFS storage pool

 

Creating a New Pool By Splitting a Mirrored ZFS Storage Pool


A mirrored ZFS storage pool can be quickly cloned as a backup pool by using the zpool split command.  You can use this feature to split a mirrored root pool, but the pool that is split off is not bootable.  You can use the zpool splitcommand to detach one or more disks from a mirrored ZFS storage pool to create a new pool with the detached disk or disks. The new pool will have identical contents to the original mirrored ZFS storage pool.  By default, a zpool split operation on a mirrored pool detaches the last disk for the newly
created pool.  After the split operation, you then import the new pool.

For example:

 

#zpool status tank
pool: tank
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
Managing Devices in ZFS Storage Pools
Chapter 4 • Managing Oracle Solaris ZFS Storage Pools 65
mirror-0 ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
c1t2d0 ONLINE 0 0 0
errors: No known data errors
#zpool split tank tank2
#zpool import tank2
#zpool status tank tank2
pool: tank
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
c1t0d0 ONLINE 0 0 0
errors: No known data errors
pool: tank2
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
tank2 ONLINE 0 0 0
c1t2d0 ONLINE 0 0 0
errors: No known data errors