1SCSI_ID(8)               Linux Administrator's Manual               SCSI_ID(8)
2
3
4

NAME

6       scsi_id - retrieve and generate a unique SCSI identifier
7

SYNOPSIS

9       scsi_id [options]
10

DESCRIPTION

12       scsi_id  queries  a SCSI device via the SCSI INQUIRY vital product data
13       (VPD) page 0x80 or 0x83 and uses the resulting data to generate a value
14       that  is unique across all SCSI devices that properly support page 0x80
15       or page 0x83.
16
17       If a result is generated it is sent to standard output, and the program
18       exits  with a zero value. If no identifier is output, the program exits
19       with a non-zero value.
20
21       scsi_id is primarily for use by  other  utilities  such  as  udev  that
22       require a unique SCSI identifier.
23
24       By  default  all  devices  are  assume  black listed, the --whitelisted
25       option must be specified on the command line or in the config file  for
26       any useful behaviour.
27
28       SCSI  commands  are  sent  directly  to  the device via the SG_IO ioctl
29       interface.
30
31       In order to generate unique values for either page 0x80 or  page  0x83,
32       the serial numbers or world wide names are prefixed as follows.
33
34       Identifiers  based  on page 0x80 are prefixed by the character 'S', the
35       SCSI vendor, the SCSI product (model) and then the  the  serial  number
36       returned by page 0x80. For example:
37
38
39       # scsi_id --page=0x80 --devpath=/block/sdg
40       SIBM     3542           1T05078453
41
42       Identifiers based on page 0x83 are prefixed by the identifier type fol‐
43       lowed by the page 0x83 identifier. For example, a  device  with  a  NAA
44       (Name  Address  Authority)  type  of 3 (also in this case the page 0x83
45       identifier starts with the NAA value of 6):
46
47
48       # /sbin/scsi_id --page=0x83 --devpath=/block/sdg
49       3600a0b80000b174b000000d63efc5c8c
50

OPTIONS

52       --fallback-to-sysfs
53              Always print  information  (model,  vendor  strings)  about  the
54              device even if it does not support VPD pages.
55
56       --ignore-sysfs
57              Ignore sysfs entries. Used for devices which are not represented
58              as SCSI devices, but understand SG_IO commands.
59
60       --blacklisted
61              The default behaviour - treat the device as black listed, and do
62              nothing  unless  a  white  listed device is found in the scsi_id
63              config-file.
64
65       --device=device
66              Instead of determining and creating a device  node  based  on  a
67              sysfs  dev  entry  as  done  for  the -s, send SG_IO commands to
68              device, such as /dev/sdc.  This argument  should  also  be  used
69              when  invoked via udev to avoid problems with creation of tempo‐
70              rary files on not-yet writable directories.
71
72       --config=config-file
73              Read configuration and black/white list entries from config-file
74              rather than the default /etc/scsi_id.config file.
75
76       --whitelisted
77              Treat  the device as white listed. The --whitelisted option must
78              be specified on the command line or in the scsi_id configuration
79              file for scsi_id to generate any output.
80
81       --prefix-bus-id
82              Prefix  the identification string with the  driver model (sysfs)
83              bus id of the SCSI device.
84
85       --page=0x80|0x83|pre-spc3-83
86              Use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83.
87
88              The default behaviour is to query the available VPD  pages,  and
89              use page 0x83 if found, else page 0x80 if found, else nothing.
90
91              Page  pre-spc3-83 should only be utilized for those scsi devices
92              which are not compliant with the SPC-2 or SPC-3 format for  page
93              83.   While  this option is used for older model 4, 5, and 6 EMC
94              Symmetrix devices, its use with SPC-2 or SPC-3 compliant devices
95              will fallback to the page 83 format supported by these devices.
96
97       --devpath=sysfs-devpath
98              Generate  an  id  for  the sysfs-devpath.  The sysfs mount point
99              must not be included.
100
101       --replace-whitespace
102              Reformat the output : replace all whitespaces by underscores.
103
104       --export
105              Export all data in KEY=<value> format used to  import  in  other
106              programs.
107
108       --verbose
109              Generate verbose debugging output.
110
111       --version
112              Display version number and exit.
113
114

ENVIRONMENT

116       If the DEVPATH environment variable is set, scsi_id assumes it has been
117       invoked via udev (or some other hotplug program),  and  all  errors  or
118       warnings are sent using syslog.
119

FILES

121       /etc/scsi_id.config                  configuration and black/white list entries
122

SEE ALSO

124       udev(7)
125

AUTHORS

127       Developed  by  Patrick  Mansfield <patmans@us.ibm.com> based on SCSI ID
128       source included in earlier linux 2.5 kernels, sg_utils source, and SCSI
129       specifications.
130
131
132
133                                 December 2003                      SCSI_ID(8)
Impressum