Device names

From OpenZFS on OS X
Revision as of 16:00, 12 February 2016 by 175.156.183.5 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Changing the device names on an existing pool can be done by simply exporting the pool and re-importing it with the -d option to specify which new names should be used.

To use the names in /var/run/disk/by-id,

$ sudo zpool export tank
$ sudo zpool import -d /var/run/disk/by-id tank <new_device_name>

To use the names in /var/run/disk/by-serial,

$ sudo zpool export tank
$ sudo zpool import -d /var/run/disk/by-serial tank <new_device_name>

To use the names in /var/run/disk/by-path,

$ sudo zpool export tank
$ sudo zpool import -d /var/run/disk/by-path tank <new_device_name>

To use the less safe (because they vary) BSD disk names in /dev,

$ sudo zpool export tank
$ sudo zpool import -d /dev tank

Even if you are using invariant paths (by-id, by-serial, or by-path), you can reveal the "normal" BSD disk names at any time,

$ zpool status -L tank