ZFS GUIDs vs device names

October 12, 2009

One thing about ZFS GUIDs that I didn't get around to covering is when commands like 'zpool status' are misleading you about the device names that they show.

When things are fine, ie when ZFS can find the GUID that it is looking for, the device name is correct (in fact hyper-correct, as 'zpool status' also checks that the device ID is the right one). When things are not fine, zpool will generally display the device name of the last device that that GUID was found on; it does so even if the device name doesn't actually exist on your system at the moment. (iSCSI devices are good for this, since they can disappear if you sneeze on them.)

(Very recent versions of OpenSolaris will actually display the GUID and then add 'most recently seen on <device>', which is the far more honest and helpful approach. Apparently someone at Sun woke up.)

This usually doesn't matter for doing things to pool devices, because zpool will use the pool configuration to map device names to the GUIDs it has to give the kernel. This is what lets you remove nonexistent devices (or at least usually lets you remove them, there are some just fixed ZFS bugs concerning removing nonexistent spares). If you have a situation where the same device name represents two different GUIDs in the same pool, this breaks down but zpool doesn't seem to notice. (I think you usually get the GUID of the first instance of the device name, which is usually the broken one.)

Written on 12 October 2009.
« Why security bugs aren't bugs
There are two different uses of conditional GETs »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Oct 12 02:34:46 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.