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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. Understanding kdump Configuration file /etc/kdump.conf
  2. mumble: command not found
  3. act – Execute GitHub Actions locally using Docker (Command Examples)
  4. debootstrap: command not found
  5. net-snmp-create-v3-user: command not found
  6. mount.cifs: command not found
  7. How to Change the filesystem Labels in CentOS/RHEL
  8. ncat Command Examples in Linux
  9. f5fpc Command Examples
  10. How to Enable sudo I/O Logging

You May Also Like

Primary Sidebar

Recent Posts

  • “az storage blob” Command Examples (Manage blob storage containers and objects in Azure)
  • “az storage account” Command Examples (Manage storage accounts in Azure)
  • “az sshkey” Command Examples (Manage ssh public keys with virtual machines)
  • “az redis” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright