chiark / gitweb /
keymap: Fix rfkill button on Hewlett-Packard HP ProBook
[elogind.git] / src / extras / scsi_id / scsi_id.8
1 .TH SCSI_ID 8 "December 2003" "" "Linux Administrator's Manual"
2 .SH NAME
3 scsi_id \- retrieve and generate a unique SCSI identifier
4 .SH SYNOPSIS
5 .BI scsi_id
6 [\fIoptions\fP]
7 .SH "DESCRIPTION"
8 .B scsi_id
9 queries a SCSI device via the SCSI INQUIRY vital product data (VPD) page 0x80 or
10 0x83 and uses the resulting data to generate a value that is unique across
11 all SCSI devices that properly support page 0x80 or page 0x83.
12
13 If a result is generated it is sent to standard output, and the program
14 exits with a zero value. If no identifier is output, the program exits
15 with a non\-zero value.
16
17 \fBscsi_id\fP is primarily for use by other utilities such as \fBudev\fP
18 that require a unique SCSI identifier.
19
20 By default all devices are assumed black listed, the \fB\-\-whitelisted\fP option must
21 be specified on the command line or in the config file for any useful
22 behaviour.
23
24 SCSI commands are sent directly to the device via the SG_IO ioctl
25 interface.
26
27 In order to generate unique values for either page 0x80 or page 0x83, the
28 serial numbers or world wide names are prefixed as follows.
29
30 Identifiers based on page 0x80 are prefixed by the character 'S', the SCSI
31 vendor, the SCSI product (model) and then the the serial number returned
32 by page 0x80. For example:
33
34 .sp
35 .nf
36 # /usr/lib/udev/scsi_id \-\-page=0x80 \-\-whitelisted \-\-device=/dev/sda
37 SIBM     3542           1T05078453
38 .fi
39 .P
40
41 Identifiers based on page 0x83 are prefixed by the identifier type
42 followed by the page 0x83 identifier. For example, a device with a NAA
43 (Name Address Authority) type of 3 (also in this case the page 0x83
44 identifier starts with the NAA value of 6):
45
46 .sp
47 .nf
48 # /usr/lib/udev/scsi_id \-\-page=0x83 \-\-whitelisted \-\-device=/dev/sda
49 3600a0b80000b174b000000d63efc5c8c
50 .fi
51 .P
52
53 .SH OPTIONS
54 .TP
55 .BI \-\-blacklisted
56 The default behaviour \- treat the device as black listed, and do nothing
57 unless a white listed device is found in the scsi_id config\-file.
58 .TP
59 .BI \-\-device=\| device\^
60 Send SG_IO commands to \fBdevice\fP, such as \fB/dev/sdc\fP.
61 .TP
62 .BI \-\-config=\| config\-file
63 Read configuration and black/white list entries from
64 .B config\-file
65 rather than the default
66 .B /etc/scsi_id.config
67 file.
68 .TP
69 .BI \-\-whitelisted
70 Treat the device as white listed. The \fB\-\-whitelisted\fP option must be specified
71 on the command line or in the scsi_id configuration file for
72 .B scsi_id
73 to generate any output.
74 .TP
75 .BI \-\-page=\| 0x80 | 0x83 | pre-spc3-83
76 Use SCSI INQUIRY VPD page code 0x80, 0x83, or pre-spc3-83.
77 .sp
78 The default
79 behaviour is to query the available VPD pages, and use page 0x83 if found,
80 else page 0x80 if found, else nothing.
81 .sp
82 Page pre-spc3-83 should only be utilized for those scsi devices which
83 are not compliant with the SPC-2 or SPC-3 format for page 83.  While this
84 option is used for older model 4, 5, and 6 EMC Symmetrix devices, its
85 use with SPC-2 or SPC-3 compliant devices will fallback to the page 83
86 format supported by these devices.
87 .TP
88 .BI \-\-replace-whitespace
89 Reformat the output : replace all whitespaces by underscores.
90 .TP
91 .BI \-\-export
92 Export all data in KEY=<value> format used to import in other programs.
93 .TP
94 .BI \-\-verbose
95 Generate verbose debugging output.
96 .TP
97 .BI \-\-version
98 Display version number and exit.
99 .RE
100
101 .SH "FILES"
102 .nf
103 .ft B
104 .ft
105 .TP
106 \fI/etc/scsi_id.config\fP
107 Configuration of black/white list entries and per device options:
108 # one config per line, short match strings match longer strings
109 # vendor=string[,model=string],options=<per-device scsi_id command line options>
110 vendor="ATA",options=-p 0x80
111 .RE
112 .fi
113 .LP
114 .SH "SEE ALSO"
115 .BR udev (7)
116 .SH AUTHORS
117 Developed by Patrick Mansfield <patmans@us.ibm.com> based on SCSI ID
118 source included in earlier linux 2.5 kernels, sg_utils source, and SCSI
119 specifications.