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  assumed 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       # /lib/udev/scsi_id --page=0x80 --whitelisted --device=/dev/sda
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       # /lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/sda
49       3600a0b80000b174b000000d63efc5c8c
50

OPTIONS

52       -b, --blacklisted
53              The default behaviour - treat the device as black listed, and do
54              nothing  unless  a  white  listed device is found in the scsi_id
55              config-file.
56
57       -d, --device=device
58              Send SG_IO commands to device, such as /dev/sdc.
59
60       -f, --config=config-file
61              Read configuration and black/white list entries from config-file
62              rather than the default /etc/scsi_id.config file.
63
64       -g, --whitelisted
65              Treat  the device as white listed. The --whitelisted option must
66              be specified on the command line or in the scsi_id configuration
67              file for scsi_id to generate any output.
68
69       -p, --page=0x80 | 0x83 | pre-spc3-83 | 0x80-0x83 | 0x83-0x80
70              Use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83.
71
72              The  default  behaviour is to query the available VPD pages, and
73              use page 0x83 if found, else page 0x80 if found, else nothing.
74
75              Page pre-spc3-83 should only be utilized for those scsi  devices
76              which  are not compliant with the SPC-2 or SPC-3 format for page
77              83.  While this option is used for older model 4, 5, and  6  EMC
78              Symmetrix devices, its use with SPC-2 or SPC-3 compliant devices
79              will fallback to the page 83 format supported by these devices.
80
81              0x80-0x83 is like 0x80, and exports ID_SERIAL and  ID_SERIAL_80,
82              but also exports 0x83 in ID_SERIAL_83.
83
84              0x83-0x80  is like 0x83, and exports ID_SERIAL and ID_SERIAL_83,
85              but also exports 0x80 in ID_SERIAL_80.
86
87
88       -u, --replace-whitespace
89              Reformat the output : replace all whitespaces by underscores.
90
91       -x, --export
92              Export all data in KEY=<value> format used to  import  in  other
93              programs.
94
95       -v, --verbose
96              Generate verbose debugging output.
97
98       -V, --version
99              Display version number and exit.
100
101

FILES

103       /etc/scsi_id.config
104              Configuration of black/white list entries and per device options:
105              # one config per line, short match strings match longer strings
106              # vendor=string[,model=string],options=<per-device scsi_id command line options>
107              vendor="ATA",options=-p 0x80
108

SEE ALSO

110       udev(7)
111

AUTHORS

113       Developed  by  Patrick  Mansfield <patmans@us.ibm.com> based on SCSI ID
114       source included in earlier linux 2.5 kernels, sg_utils source, and SCSI
115       specifications.
116
117
118
119                                 December 2003                      SCSI_ID(8)
Impressum