ZFS: changing device IDs.

When I created my zpool on FreeBSD, I went to great lengths to use volume names that matched the serial numbers on the disks. I then made sure the last 7 digits of the serial numbers were visible while the disks were in-situ, so that if one failed I could immediately tell which. This all went out the damn window when I moved the pool to Linux, because ZFS-on-Linux imported them as standard Linux disks (/dev/sd[bcd]).

That’s a pain in the arse, because the ZFS disks are in the higher numbered drive slots, so if I add or remove an extra disk and reboot the machine, Linux re-letters them, and ZFS needs help to figure it out as it seems to give up if nothing matches what’s in the cache file. The cache file, by the way, is binary in part, so editing it by hand didn’t seem like much fun. This is all not to mention that my original intention of knowing exactly which disk to pull was still not working.

For work today, we ran into a situation where we had unusually named disks on one machine, and I figured I’d test it at home, scratching my itch at the same time.

So I recorded the procedure necessary to do it.

Horsham, VIC, Australia fwaggle

Published:


Modified:


Filed under:


Location:

Horsham, VIC, Australia

Navigation: Older Entry Newer Entry