Oct 032009
Yesterday I went through the process of creating a ZFS storage pool with a single device :-
zpool create zt1 cXXXXX
Next adding an additional device to mirror the first :-
zpool attach zt1 cXXXXX cYYYYY
Watched it resilver, and then detached the first replica reducing the number of replicas to one :-
zpool detach zt1 cXXXXX
This is one of the nicest ways possible to migrate a large dataset from one set of devices to another (say replacing a SAN). However the documentation on Sun’s manual page for zpool is just a little vague in the relevant area and does not explicitly say that a single replica is a perfectly valid configuration.
This might all seem a little obvious, but removing a replica to reduce a storage pool to an pool without a mirror (no redundancy) is something that some volume managers don’t allow.