Gentoo Archives: gentoo-user

From: "Stefan G. Weichinger" <lists@×××××.at>
To: gentoo-user@l.g.o
Subject: [gentoo-user] sg_map etc
Date: Wed, 01 Mar 2017 13:04:58
Message-Id: 428cbe76-9cfd-dc0b-d84e-179fc9d54c4a@xunil.at
1 could someone help me out?
2
3 I have this software-raid:
4
5 md3 : active raid6 sdi1[8] sdh1[6] sdg1[4] sdf1[5] sde1[3] sdd1[2] sdc1[0]
6 4391334912 blocks level 6, 64k chunk, algorithm 2 [8/6] [U_UUUUU_]
7 [====>................] recovery = 22.8% (167386900/731889152)
8 finish=196.6min speed=47837K/sec
9
10 and I would like to know which hard disk (vendor, serial) each /dev/sdX is.
11
12 (I have to tell the remote admin which physical disk to remove from the
13 server, and there are disks in the server which aren't part of the RAID yet)
14
15 Found sg_map and sg_scan:
16
17
18 # sg_map
19 /dev/sg0 /dev/nst0
20 /dev/sg1
21 /dev/sg2 /dev/sda
22 /dev/sg3 /dev/sdb
23 /dev/sg4 /dev/sdc
24 /dev/sg5 /dev/sdd
25 /dev/sg6 /dev/sde
26 /dev/sg7 /dev/sdf
27 /dev/sg8 /dev/sdg
28 /dev/sg9 /dev/sdh
29 /dev/sg10 /dev/sdi
30 /dev/sg11
31 /dev/sg12
32 /dev/sg13
33 /dev/sg14
34 /dev/sg15
35 /dev/sg16
36 /dev/sg17
37 /dev/sg18
38 /dev/sg19
39 /dev/sg20
40 /dev/sg21
41
42 --
43
44 The crux:
45
46 It seems I get two sg-devices per physical disk:
47
48 sda = sg2 = sg11 ...
49
50 sg11 is shown as SEAGATE, sg2 as ICP
51
52 (tried -d scsi and -d sat as well)
53
54 and I only get useful info from the sg-devices >10
55
56 ->
57
58
59 # smartctl -d auto -i /dev/sg11
60 smartctl 6.4 2015-06-04 r4109 [x86_64-linux-3.18.11-gentoo-smp] (local
61 build)
62 Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
63
64 === START OF INFORMATION SECTION ===
65 Vendor: SEAGATE
66 Product: ST373455SS
67 Revision: 0002
68 User Capacity: 73,407,868,928 bytes [73.4 GB]
69 Logical block size: 512 bytes
70 Rotation Rate: 15015 rpm
71 Logical Unit id: 0x5000c50002448407
72 Serial number: 3LQ11JWH00009748U10J
73 Device type: disk
74 Transport protocol: SAS (SPL-3)
75 Local Time is: Wed Mar 1 15:51:28 2017 CET
76 SMART support is: Available - device has SMART capability.
77 SMART support is: Enabled
78 Temperature Warning: Enabled
79
80 juno ~ # smartctl -d auto -i /dev/sg2
81 smartctl 6.4 2015-06-04 r4109 [x86_64-linux-3.18.11-gentoo-smp] (local
82 build)
83 Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
84
85 === START OF INFORMATION SECTION ===
86 Vendor: ICP
87 Product: SAS1
88 Revision: V1.0
89 User Capacity: 73,284,976,640 bytes [73.2 GB]
90 Logical block size: 512 bytes
91 scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
92 scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
93 >> Terminate command early due to bad response to IEC mode page
94 A mandatory SMART command failed: exiting. To continue, add one or more
95 '-T permissive' options.
96 juno ~ # smartctl -d auto -i /dev/sda
97 smartctl 6.4 2015-06-04 r4109 [x86_64-linux-3.18.11-gentoo-smp] (local
98 build)
99 Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
100
101 === START OF INFORMATION SECTION ===
102 Vendor: ICP
103 Product: SAS1
104 Revision: V1.0
105 User Capacity: 73,284,976,640 bytes [73.2 GB]
106 Logical block size: 512 bytes
107 scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
108 scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
109 >> Terminate command early due to bad response to IEC mode page
110 A mandatory SMART command failed: exiting. To continue, add one or more
111 '-T permissive' options.
112
113
114 ----//
115
116
117
118 # sg_scan -iv
119 /dev/sg0: scsi0 channel=0 id=1 lun=0
120 HP Ultrium 4-SCSI B12H [rmb=1 cmdq=1 pqual=0 pdev=0x1]
121 /dev/sg1: scsi0 channel=0 id=1 lun=1
122 OVERLAND NEO Series 0510 [rmb=1 cmdq=1 pqual=0 pdev=0x8]
123 /dev/sg2: scsi1 channel=0 id=0 lun=0 [em]
124 ICP SAS1 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
125 /dev/sg3: scsi1 channel=0 id=1 lun=0 [em]
126 ICP SAS2 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
127 /dev/sg4: scsi1 channel=0 id=2 lun=0 [em]
128 ICP Device 2 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
129 /dev/sg5: scsi1 channel=0 id=3 lun=0 [em]
130 ICP Device 3 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
131 /dev/sg6: scsi1 channel=0 id=4 lun=0 [em]
132 ICP Device 4 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
133 /dev/sg7: scsi1 channel=0 id=5 lun=0 [em]
134 ICP Device 5 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
135 /dev/sg8: scsi1 channel=0 id=6 lun=0 [em]
136 ICP Device 6 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
137 /dev/sg9: scsi1 channel=0 id=8 lun=0 [em]
138 ICP Device 8 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
139 /dev/sg10: scsi1 channel=0 id=12 lun=0 [em]
140 ICP Device 12 V1.0 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
141 /dev/sg11: scsi1 channel=1 id=0 lun=0 [em]
142 SEAGATE ST373455SS 0002 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
143 /dev/sg12: scsi1 channel=1 id=1 lun=0 [em]
144 SEAGATE ST373455SS 0002 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
145 /dev/sg13: scsi1 channel=1 id=3 lun=0 [em]
146 WDC WD7500AZEX-00RKK 0A80 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
147 /dev/sg14: scsi1 channel=1 id=4 lun=0 [em]
148 WDC WD7500AZEX-00RKK 0A80 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
149 /dev/sg15: scsi1 channel=1 id=5 lun=0 [em]
150 WDC WD7500AZEX-00RKK 0A80 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
151 /dev/sg16: scsi1 channel=1 id=6 lun=0 [em]
152 WDC WD7500AZEX-00BN5 1A01 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
153 /dev/sg17: scsi1 channel=1 id=7 lun=0 [em]
154 WDC WD7500AZEX-00BN5 1A01 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
155 /dev/sg18: scsi1 channel=1 id=9 lun=0 [em]
156 ST375052 8AS CC44 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
157 /dev/sg19: scsi1 channel=1 id=10 lun=0 [em]
158 WDC WD7500AZEX-00BN5 1A01 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
159 /dev/sg20: scsi1 channel=1 id=11 lun=0 [em]
160 WDC WD7500AZEX-00BN5 1A01 [rmb=0 cmdq=1 pqual=0 pdev=0x0]
161 /dev/sg21: scsi1 channel=1 id=15 lun=0 [em]
162 ST375052 8AS CC44 [rmb=0 cmdq=1 pqual=0 pdev=0x0]

Replies

Subject Author
Re: [gentoo-user] sg_map etc Neil Bothwick <neil@××××××××××.uk>