Difference between revisions of "Device names"

From OpenZFS on OS X
Jump to: navigation, search
(Created page with "Device Names 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 b...")
 
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
Device Names
 
 
 
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.
 
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,
 
To use the names in /var/run/disk/by-id,
 
  $ sudo zpool export tank
 
  $ sudo zpool export tank
  $ sudo zpool import -d /var/run/disk/by-id tank
+
  $ sudo zpool import -d /var/run/disk/by-id tank <new_device_name>
  
 
To use the names in /var/run/disk/by-serial,
 
To use the names in /var/run/disk/by-serial,
 
  $ sudo zpool export tank
 
  $ sudo zpool export tank
  $ sudo zpool import -d /var/run/disk/by-serial tank
+
  $ sudo zpool import -d /var/run/disk/by-serial tank <new_device_name>
  
 
To use the names in /var/run/disk/by-path,
 
To use the names in /var/run/disk/by-path,
 
  $ sudo zpool export tank
 
  $ sudo zpool export tank
  $ sudo zpool import -d /var/run/disk/by-path 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,
 
To use the less safe (because they vary) BSD disk names in /dev,

Latest revision as of 16:00, 12 February 2016

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