ZFS Adding gpart labels to ZFS pool drives after pool creation?

I have 2 3-way-mirror pools under zfs, and I'd like to label them with sensible identifiers.

Reading the comments in bug report 162342, I learned that gpart -l labels vanish when the pool is mounted if the pool was created using /dev/[a]da* references rather than label references, and sometimes even when a label was used for a replacement drive.

Calling zpool status shows me that one pool has da* identifiers while the other is a mix of 2 gptids and a discid reference for the drive I had to replace post-hoc.

Is there a simple way to (a) add labels at this point and (b) persuade zpool to refer to the drives by label as well as showing the labels when calling zpool status? I don't have enough free storage to back up the pools, destroy, and recreate them using label refs.
 
I don't know if there's a way to update the labels without rebuilding the array, but if not, you should be able to degrade then rebuild by doing something like:

zpool offline tank ada0
zpool replace tank ada0 gpt/xxx # replace "ada0" with the guid if available

Note that doing this will increase the risk of data loss if you have a failure during the rebuild. (I'm assuming by "3-way" you imply redundancy, such as a 3 drive mirror or RAIDZ; if it's a straight stripe, you won't be able to do this.)
 
Back
Top