Linux find disk names by serial number using /dev/disk/by-id/

Fig.01: Linux find disk names by serial number using /dev/disk/by-id/

Fig.01: Linux find disk names by serial number using /dev/disk/by-id/

To find disk names by serial number using /dev/disk/by-id/, enter:
$ ls -l /dev/disk/by-id/
To filter out disks only, enter:
$ ls -l /dev/disk/by-id/ | grep sd[a-z]$
Sample outputs:

lrwxrwxrwx 1 root root  9 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_00014128 -> ../../sdc
lrwxrwxrwx 1 root root  9 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_0001493C -> ../../sdd
lrwxrwxrwx 1 root root  9 Aug  2 05:01 ata-SDLFGC7R-960G-1HST_FG00CLST -> ../../sda
lrwxrwxrwx 1 root root  9 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_FG00CNHB -> ../../sdb
lrwxrwxrwx 1 root root  9 Aug  2 05:01 wwn-0x50011731002b33ac -> ../../sda
lrwxrwxrwx 1 root root  9 Aug  2 03:20 wwn-0x50011731002b50d0 -> ../../sdb
lrwxrwxrwx 1 root root  9 Aug  2 03:20 wwn-0x5001173100406557 -> ../../sdc
lrwxrwxrwx 1 root root  9 Aug  2 03:20 wwn-0x50011731004085a7 -> ../../sdd

To filter out disk names by partition names, enter:
$ ls -l /dev/disk/by-id/ | grep sd[a-z][0-9]$
Sample outputs:

lrwxrwxrwx 1 root root 10 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_00014128-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_00014128-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_0001493C-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_0001493C-part2 -> ../../sdd2
lrwxrwxrwx 1 root root 10 Aug  2 05:01 ata-SDLFGC7R-960G-1HST_FG00CLST-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug  2 05:01 ata-SDLFGC7R-960G-1HST_FG00CLST-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug  2 05:01 ata-SDLFGC7R-960G-1HST_FG00CLST-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Aug  2 05:01 ata-SDLFGC7R-960G-1HST_FG00CLST-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 Aug  2 05:01 ata-SDLFGC7R-960G-1HST_FG00CLST-part7 -> ../../sda7
lrwxrwxrwx 1 root root 10 Aug  2 05:01 ata-SDLFGC7R-960G-1HST_FG00CLST-part8 -> ../../sda8
lrwxrwxrwx 1 root root 10 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_FG00CNHB-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Aug  2 03:20 ata-SDLFGC7R-960G-1HST_FG00CNHB-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Aug  2 05:01 wwn-0x50011731002b33ac-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug  2 05:01 wwn-0x50011731002b33ac-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug  2 05:01 wwn-0x50011731002b33ac-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Aug  2 05:01 wwn-0x50011731002b33ac-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 Aug  2 05:01 wwn-0x50011731002b33ac-part7 -> ../../sda7
lrwxrwxrwx 1 root root 10 Aug  2 05:01 wwn-0x50011731002b33ac-part8 -> ../../sda8
lrwxrwxrwx 1 root root 10 Aug  2 03:20 wwn-0x50011731002b50d0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Aug  2 03:20 wwn-0x50011731002b50d0-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Aug  2 03:20 wwn-0x5001173100406557-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Aug  2 03:20 wwn-0x5001173100406557-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Aug  2 03:20 wwn-0x50011731004085a7-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Aug  2 03:20 wwn-0x50011731004085a7-part2 -> ../../sdd2

You can use name such as ata-SDLFGC7R-960G-1HST_00014128 or wwn-0x50011731002b33ac while creating storage pools using disk manager or ZFS file system on Linux.

Examples and usage: How to create RAID 10 - Striped Mirror Vdev ZPool On Ubuntu Linux