Changing ZFS pool to use disk ID instead of disk assignment

This what I have:

# zpool status
  pool: tank
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            sdb     ONLINE       0     0     0
            sdc     ONLINE       0     0     0
            sdd     ONLINE       0     0     0

To convert the pool to use disk’s ID instead of device files such as /dev/sda, we need to export the storage pool.

# zpool export tank

After this command is executed, the pool tank is no longer visible on the system. Now, we’re ready to reimport the pool:

# zpool import -d /dev/disk/by-id tank
# zpool list
NAME   SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
tank  29.8G   192M  29.6G     0%  1.00x  ONLINE  -
# zpool status
  pool: tank
 state: ONLINE
  scan: none requested
config:

        NAME                                       STATE     READ WRITE CKSUM
        tank                                       ONLINE       0     0     0
          raidz1-0                                 ONLINE       0     0     0
            ata-VBOX_HARDDISK_VB5844dcdb-0b3799a3  ONLINE       0     0     0
            ata-VBOX_HARDDISK_VBd864f75d-f80a1f7b  ONLINE       0     0     0
            ata-VBOX_HARDDISK_VBb978bce3-baec4252  ONLINE       0     0     0

Source:

2 thoughts on “Changing ZFS pool to use disk ID instead of disk assignment

Leave a Reply

Your email address will not be published. Required fields are marked *