A reliable way to change the zpool guid and vdev uuid?
Jyoti Sharma
jyoti.mickey at gmail.com
Tue Nov 11 06:48:47 UTC 2014
We support ZFS filesystems ( Zpools really ) with our IntelliSnap hardware
snapshot technology.
As part of this we need to read and often modify the zpool guid and vdev
uuids of the disks involved. Recently we've seen that as our operations
that change the zpool guid and vdev uuid no longer work for zpools which
are @ the latest version of the on disk format. As a result of this our
import operations on the pools fail.
The sequence of operations we perform are as follows :
1. Take a hardware snapshot of ZFS disks.
2. Expose the snapshot LUNs to a different / same box.
3. Read and manipulate on-disk ids of the snapshot luns to be unique.
4. Rename the pool by writing to on-disk structures.
5. Import the pool on the host with a new name.
With the more recent version of ZPools we see that operation 5 fails. If we
simply use the zpool import command without running steps 3,4 step 5 works.
But this is not desirable because as part of our backup operations, at any
given time we can import :
a. copy of the source pool to the same host
----OR------
b. multiple copies of the source pool on the same host at a time.
We've used knowledge gained from zfs ondisk specs available online for our
implementation and these ideas have worked for us until now. In short we
suspect a disk format change in the latest or the recent versions of zfs
that affect the on-disk placement of those ids. We are looking for a
documented or supported way to change the ids reliably w/o relying on
on-disk format information in order to keep our codebase future compliant.
Thank you.
More information about the zfs-devel
mailing list