zfs pool recovery after /dev/sdX disk names changed

I recently ran into this problem with ZFS:

1. I made a mistake by creating a zfs pool by using /dev/sdX definitions (rather than /dev/disk/by-uuid).
2. After the Ubuntu upgrade from Ubuntu 11.10 to Ubuntu 12.04, the hard drive device numbering, i.e. sda, sdb, etc., changed. Needless to say, the zfs pool did not work anymore.

The solution was to run:

zpool import -d /dev/disk/by-id

and then run zpool import [zpoolname] by name, as instructed by zfs.

If this does not resolve the issue, try to export the zpool and re-import it using the /dev/disk/by-id configuration, e.g.

zpool export [zpoolname]
zpool import -d /dev/disk/by-id [zpoolname] -f

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s