Question about drive labels

Using Ubuntu server, headless. Have a bunch of drives in my pool - how can i get the labels to show up for sda, sdb, and sdc like for the remainder? Useful for when drives fail (as happens occasionally, and thankfully not four drives in a row).

  pool: evilpool
 state: ONLINE
  scan: resilvered 9.30G in 00:03:57 with 0 errors on Sun Jul 23 12:49:30 2023
config:

        NAME                                         STATE     READ WRITE CKSUM
        evilpool                                     ONLINE       0     0     0
          raidz2-0                                   ONLINE       0     0     0
            sda                                      ONLINE       0     0     0
            sdb                                      ONLINE       0     0     0
            sdc                                      ONLINE       0     0     0
            ata-HGST_HUS724040ALE640_PK1334PBHHM5HX  ONLINE       0     0     0
            ata-HGST_HDN724040ALE640_PK2334PBHAMGAR  ONLINE       0     0     0
            ata-HGST_HUS724040ALE640_PK1334PEH0K2AS  ONLINE       0     0     0
            ata-HGST_HDN724040ALE640_PK2334PCG458MB  ONLINE       0     0     0
            ata-HGST_HDN724040ALE640_PK2334PBKM2EWT  ONLINE       0     0     0

root@box:~# zpool export evilpool ; zpool import -d /dev/disk/by-id evilpool

Note that you may not get the exact labels you want this way, since /dev/disk/by-id typically contains ata, SCSI, and wwn labels for the same drives. If that ends up being the case, you can just mv the labels you don’t like to /tmp, then import, then mv them back from /tmp into /dev/disk/by-id.

And that’s if you’re feeling especially careful–those labels are automatically generated at each system boot, so sloppier/less-careful admins frequently just rm the ones they don’t want, knowing that the system will repopulate them on the next boot anyway. :slight_smile: