• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

scsi_id Command Examples in Linux

by admin

scsi_id is the command used for finding out the WWN numbers for the external LUNS attached to the host via a FC cable and can’t be used for finding out UUID of devices. scsi_id is primarily for use by other utilities such as udev that require a unique SCSI identifier. By default all devices are assumed black listed, the –whitelisted option must be specified on the command line or in the config file for any useful behavior.

Output from blkid command shows the UUID of devices as shown below.

/dev/sdbh: UUID="r1PHiD-EMu0-oMBa-zzX7-1MT5-YK7R-hJrsjJ" TYPE="LVM2_member" 
/dev/sdbi: UUID="cNTqqN-JRW7-sEWz-fEmw-yWeu-fMEe-0It4ey" TYPE="LVM2_member" 
/dev/mapper/testdevice: UUID="0h3qmS-y1Gk-pEZE-KbfN-gZ7u-Da8O-FkUHJS" TYPE="LVM2_member" 
/dev/mapper/9af08d4e--f055--4200--ad79--d66185ed32fb-master: UUID="1abc78f9-a153-4d9d-b0c4-c8f274bad46a" TYPE="ext3" 

Output of the scsi_id command will give the WWN number of the External storage attached to the server as shown below.

# scsi_id --whitelisted --device=/dev/sda
3600508e000000000d6580ba0eaf2e107

scsi_id Command Examples

1. To retrieve and generate a unique SCSI identifier:

# scsi_id 

2. To Send SG_IO commands to device:

# scsi_id --device=device /dev/sdc 

4. To treat the device as black listed, and do nothing unless a white listed device is found:

# scsi_id --blacklisted 

5. To read configuration and black/white list entries from config-file:

# scsi_id --config=config-file 

6. To treat the device as white listed:

# scsi_id --whitelisted 

7. To use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83:

# scsi_id --page=0x80|0x83|pre-spc3-83 

8. To reformat the output:

# scsi_id --replace-whitespace 

9. To export all data in KEY= format used to import in other programs:

# scsi_id --export 

10. To generate verbose debugging output:

# scsi_id --verbose 

11. To display the version:

# scsi_id --version 

Filed Under: Linux

Some more articles you might also be interested in …

  1. aurman Command Examples
  2. CentOS / RHEL : How to identify/match LUN presented from SAN with underlying OS disk
  3. exercism: Download and solve problems from the command-line
  4. “kubectl run” Command Examples
  5. aws lambda: CLI for AWS lambda (Command Examples)
  6. wg: command not found
  7. Basic “chmod” Command examples in Linux
  8. jenv Command Examples
  9. “shutdown” Command Examples in Linux
  10. doctl kubernetes cluster: Manage Kubernetes clusters and view configuration options relating to clusters

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright