1SCSI_ID(8) Linux Administrator's Manual SCSI_ID(8)
2
3
4
6 scsi_id - retrieve and generate a unique SCSI identifier
7
9 scsi_id [options]
10
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
52 --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 --device=device
58 Send SG_IO commands to device, such as /dev/sdc.
59
60 --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 --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 --page=0x80|0x83|pre-spc3-83
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 --replace-whitespace
82 Reformat the output : replace all whitespaces by underscores.
83
84 --export
85 Export all data in KEY=<value> format used to import in other
86 programs.
87
88 --verbose
89 Generate verbose debugging output.
90
91 --version
92 Display version number and exit.
93
94
96 /etc/scsi_id.config
97 Configuration of black/white list entries and per device options:
98 # one config per line, short match strings match longer strings
99 # vendor=string[,model=string],options=<per-device scsi_id command line options>
100 vendor="ATA",options=-p 0x80
101
103 udev(7)
104
106 Developed by Patrick Mansfield <patmans@us.ibm.com> based on SCSI ID
107 source included in earlier linux 2.5 kernels, sg_utils source, and SCSI
108 specifications.
109
110
111
112 December 2003 SCSI_ID(8)