Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#46 closed defect (wontfix)

With two channels LSI Raid, smartctl check always the first one.

Reported by: pgx Owned by: Alex Samorukov
Priority: major Milestone:
Component: all Version: 5.39
Keywords: megaraid linux Cc: Doug Gilbert

Description

uname -a
Linux xforce 2.6.26-2-686 #1 SMP Fri Oct 23 23:43:53 UTC 2009 i686 GNU/Linux

smartctl -V
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

smartctl comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
the terms of the GNU General Public License Version 2.
See http://www.gnu.org for further details.

smartmontools release 5.39 dated 2009-12-09 at 21:00:32 UTC
smartmontools SVN rev 2995 dated 2009-12-09 at 21:01:43
smartmontools build host: i686-pc-linux-gnu
smartmontools build configured: 2010-01-11 23:51:52 UTC
smartctl compile dated Jan 11 2010 at 23:52:24
smartmontools configure arguments: '--prefix=/usr' '--sysconfdir=/etc' '--mandir=/usr/share/man' '--with-initscriptdir=/etc/init.d' '--with-docdir=/usr/share/doc/smartmontools' '--with-selinux' 'CXXFLAGS=-g -O2' 'LDFLAGS=' 'CPPFLAGS=' 'CFLAGS=-g -O2 -fsigned-char -Wall -O2'

02:0e.0 RAID bus controller [0104]: Dell PowerEdge Expandable RAID controller 4 [1028:0013] (rev 06)

Subsystem: Dell PowerEdge Expandable RAID Controller 4e/Di [1028:016d]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping+ SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 64 (32000ns min), Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 46
Region 0: Memory at f80f0000 (32-bit, prefetchable) [size=64K]
Region 2: Memory at fe9c0000 (32-bit, non-prefetchable) [size=256K]
Expansion ROM at fea00000 [disabled] [size=128K]
Capabilities: [c0] Power Management version 2

Flags: PMEClk- DSI- D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/1 Enable-

Address: 0000000000000000 Data: 0000

Capabilities: [e0] PCI-X non-bridge device

Command: DPERE- ERO- RBC=512 OST=4
Status: Dev=02:0e.0 64bit+ 133MHz+ SCD- USC- DC=bridge DMMRBC=1024 DMOST=4 DMCRS=16 RSCEM- 266MHz- 533MHz-

Kernel driver in use: megaraid
Kernel modules: megaraid_mbox

/usr/sbin/smartctl -a -d megaraid,0 -H /dev/sda : Disk Serial number: 3HW2DAL6
/usr/sbin/smartctl -a -d megaraid,1 -H /dev/sda : Disk Serial number: 3HW2DAP9
/usr/sbin/smartctl -a -d megaraid,0 -H /dev/sdb : Disk Serial number: 3HW2DAL6
/usr/sbin/smartctl -a -d megaraid,1 -H /dev/sdb : Disk Serial number: 3HW2DAP9

/usr/sbin/megactl -v
a0 PERC 4e/Di bios:H418 fw:513O chan:2 ldrv:2 rbld:30% batt:good
a0d0 68GiB RAID 1 1x2 optimal

row 0: a0c0t0 a0c0t1

a0d1 136GiB RAID 5 1x3 optimal

row 0: a0c1t2 a0c1t3 a0c1t4

a0c0t0 SEAGATE ST373453LC 68GiB a0d0 online
a0c0t1 SEAGATE ST373453LC 68GiB a0d0 online
a0c1t2 SEAGATE ST373453LC 68GiB a0d1 online
a0c1t3 SEAGATE ST373453LC 68GiB a0d1 online
a0c1t4 SEAGATE ST373453LC 68GiB a0d1 online

/usr/sbin/smartctl -d megaraid,2 -H /dev/sdb
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl open device: /dev/sdb [megaraid_disk_02] failed: INQUIRY failed

Change History (16)

comment:1 by Christian Franke, 15 years ago

See also ticket #26.

comment:2 by pgx, 15 years ago

Yes, but it's not the same bug.
I can only check disks status on the first LSI Raid channel (channel 0) :
# /usr/sbin/smartctl -a -d megaraid,0 -H /dev/sda
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

Device: SEAGATE ST373453LC Version: DX10
Serial number: 3HW2DAL6
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Feb 1 15:49:53 2010 CET
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

Current Drive Temperature: 34 C
Drive Trip Temperature: 68 C
Elements in grown defect list: 0
Vendor (Seagate) cache information

Blocks sent to initiator = 295022220
Blocks received from initiator = 1183607668
Blocks read from cache and sent to initiator = 70415571
Number of read and write commands whose size <= segment size = 83533017
Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information

number of hours powered up = 41795.23
number of minutes until next internal SMART test = 34

Error counter log:

Errors Corrected by Total Correction Gigabytes Total

ECC rereads/ errors algorithm processed uncorrected

fast | delayed rewrites corrected invocations [109 bytes] errors

read: 4255345 0 0 4255345 4255345 1815.056 0
write: 0 0 0 0 0 893.400 0

Non-medium error count: 21

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']

SMART Self-test log
Num Test Status segment LifeTime LBA_first_err [SK ASC ASQ]

Description number (hours)

# 1 Background long Completed - 26449 - [- - -]
# 2 Background long Completed - 3 - [- - -]
# 3 Background short Completed - 2 - [- - -]

Long (extended) Self Test duration: 1280 seconds [21.3 minutes]

If I check disk on the second LSI Raid channel (channel1).
It's still the same disk than above (Serial number):

# /usr/sbin/smartctl -a -d megaraid,0 -H /dev/sdb
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

Device: SEAGATE ST373453LC Version: DX10
Serial number: 3HW2DAL6
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Mon Feb 1 15:50:57 2010 CET
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

Current Drive Temperature: 34 C
Drive Trip Temperature: 68 C
Elements in grown defect list: 0
Vendor (Seagate) cache information

Blocks sent to initiator = 295022220
Blocks received from initiator = 1183608204
Blocks read from cache and sent to initiator = 70415571
Number of read and write commands whose size <= segment size = 83533050
Number of read and write commands whose size > segment size = 0

Vendor (Seagate/Hitachi) factory information

number of hours powered up = 41795.25
number of minutes until next internal SMART test = 34

Error counter log:

Errors Corrected by Total Correction Gigabytes Total

ECC rereads/ errors algorithm processed uncorrected

fast | delayed rewrites corrected invocations [109 bytes] errors

read: 4255345 0 0 4255345 4255345 1815.056 0
write: 0 0 0 0 0 893.401 0

Non-medium error count: 21

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']

SMART Self-test log
Num Test Status segment LifeTime LBA_first_err [SK ASC ASQ]

Description number (hours)

# 1 Background long Completed - 26449 - [- - -]
# 2 Background long Completed - 3 - [- - -]
# 3 Background short Completed - 2 - [- - -]

Long (extended) Self Test duration: 1280 seconds [21.3 minutes]

comment:3 by Christian Franke, 14 years ago

Keywords: megaraid linux added

comment:4 by ralston, 14 years ago

Guys, while I really appreciate all of the effort that went into making smartmontools able to look at the physical drives behind LSI/PERC RAID controllers, this is a nasty bug, because it's not immediately obvious what's going on. You really don't notice it until you start looking closely at the individual devices. E.g.:

$ smartctl -i -d megaraid,0 /dev/sda | grep Serial
Serial number: 3JR4LK23M

$ smartctl -i -d megaraid,0 /dev/sdb | grep Serial
Serial number: 3JR4LK23M

To make it worse, there is absolutely no warning about this bug whatsoever: it's not mentioned in the man page, it's not mentioned in the CHANGELOG, and it's not even mentioned in the source.

Ideally, this bug could be fixed. (Unfortunately, I've looked briefly at the source code, and it's clear I don't have the necessary driver expertise to track this down and fix it.)

However, in the meantime, please update the documentation to mention this deficiency.

comment:5 by ralston, 14 years ago

One other thing I'll mention: we have multiple systems (one RHEL4 system, one RHEL5 system) that have multiple PERC controllers in them, and I'm well-practiced in compiling and debugging programs. If there's any way I can assist in debugging this problem, let me know...

in reply to:  4 comment:6 by Christian Franke, 14 years ago

Cc: Doug Gilbert added
Component: smartctlall

Recent megaraid drivers may require sg or bsd devices to access physical drives (e.g. /dev/sg1 or /dev/bsg/1:0:0:1).

Please provide output of lsscsi -g if possible.

comment:7 by pgx, 14 years ago

xforce:~# lsscsi -g
[0:0:6:0] process PE/PV 1x2 SCSI BP 1.0 - /dev/sg0
[0:1:6:0] process PE/PV 1x4 SCSI BP 1.0 - /dev/sg1
[0:2:0:0] disk MegaRAID LD 0 RAID1 69G 513O /dev/sda /dev/sg2
[0:2:1:0] disk MegaRAID LD 1 RAID5 139G 513O /dev/sdb /dev/sg3

in reply to:  7 comment:8 by Christian Franke, 14 years ago

Replying to pgx:

[0:2:0:0] disk MegaRAID LD 0 RAID1 69G 513O /dev/sda /dev/sg2
[0:2:1:0] disk MegaRAID LD 1 RAID5 139G 513O /dev/sdb /dev/sg3

Please try smartctl -d megaraid,N .../dev/sg2 and ... /dev/sg3.

comment:9 by pgx, 14 years ago

xforce:~# smartctl -id megaraid,0 /dev/sg2
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

Device: SEAGATE ST373453LC Version: DX10
Serial number: 3HW2DAL6
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Tue Nov 9 10:10:35 2010 CET
Device supports SMART and is Enabled
Temperature Warning Enabled


xforce:~# smartctl -id megaraid,1 /dev/sg2
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

Device: SEAGATE ST373453LC Version: DX10
Serial number: 3HW2DAP9
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Tue Nov 9 10:10:42 2010 CET
Device supports SMART and is Enabled
Temperature Warning Enabled


xforce:~# smartctl -id megaraid,0 /dev/sg3
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

Device: SEAGATE ST373453LC Version: DX10
Serial number: 3HW2DAL6
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Tue Nov 9 10:10:49 2010 CET
Device supports SMART and is Enabled
Temperature Warning Enabled


xforce:~# smartctl -id megaraid,1 /dev/sg3
smartctl 5.39 2009-12-09 r2995 [i686-pc-linux-gnu] (local build)
Copyright (C) 2002-9 by Bruce Allen, http://smartmontools.sourceforge.net

Device: SEAGATE ST373453LC Version: DX10
Serial number: 3HW2DAP9
Device type: disk
Transport protocol: Parallel SCSI (SPI-4)
Local Time is: Tue Nov 9 10:10:55 2010 CET
Device supports SMART and is Enabled
Temperature Warning Enabled

comment:10 by Alex Samorukov, 13 years ago

Owner: changed from somebody to Alex Samorukov
Status: newassigned

I think i know the reason. Please provide 2 outputs:

# smartctl -id megaraid,0 /dev/sg3 -r ioctl,10
# ls /dev

I can try to fix this bug if my idea is correct.

comment:11 by johnlepikhin, 13 years ago

It seems we have the same bug.

List of devices:

# MegaCli -pdlist -aall -NoLog | grep 'Device Id'
Device Id: 11
Device Id: 7
Device Id: 16
Device Id: 17
Device Id: 12
Device Id: 8
Device Id: 9
Device Id: 10
Device Id: 13
Device Id: 14
Device Id: 15
Device Id: 5
Device Id: 21
Device Id: 22

Smartctl calls:

# smartctl -a -d megaraid,22 /dev/sda |grep Model
(Nothing found, HDD is on the second channel)

# smartctl -a -d megaraid,5 /dev/sda |grep Model
Device Model: WDC WD2001FASS-00U0B0
(HDD is on the first channel)

Information that you requested:

# ./smartctl -id sat+megaraid,22 /dev/sda -r ioctl,10
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-2.6.35.7-c-s-m-1gb] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

Creating /dev/megaraid_sas_ioctl_node = 17

REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY DEVICE
 Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xec IN
 [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
sat_device::ata_pass_through: scsi_pass_through() failed, errno=5 [megasas_cmd: Device 22 does not exist
]
REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY DEVICE returned -1 errno=5 [megasas_cmd: Device 22 does not exist
]

===== [IDENTIFY DEVICE] DATA START (BASE-16) =====
000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
===== [IDENTIFY DEVICE] DATA END (512 Bytes) =====


REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY PACKET DEVICE
 Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=...., CMD=0xa1 IN
 [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 a1 00 ]
sat_device::ata_pass_through: scsi_pass_through() failed, errno=5 [megasas_cmd: Device 22 does not exist
]
REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY PACKET DEVICE returned -1 errno=5 [megasas_cmd: Device 22 does not exist
]

===== [IDENTIFY PACKET DEVICE] DATA START (BASE-16) =====
000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
===== [IDENTIFY PACKET DEVICE] DATA END (512 Bytes) =====

Smartctl: Device Read Identity Failed: megasas_cmd: Device 22 does not exist


A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

# ls /dev/
ataraid     fd0u3520   hdb6   hdf2       isdnctrl7                ptyb3  ptyq2  ptyv1  radio    ram6    sdc8       sr5     tty8   ttye8  ttyt7  ttyy6    vcs25   vcsa38   video50
atibm       fd0u360    hdb7   hdf20      isdninfo                 ptyb4  ptyq3  ptyv2  radio0   ram7    sdc9       sr6     tty9   ttye9  ttyt8  ttyy7    vcs26   vcsa39   video51
audio       fd0u3840   hdb8   hdf3       jbm                      ptyb5  ptyq4  ptyv3  radio1   ram8    sdd        sr7     ttyS0  ttyea  ttyt9  ttyy8    vcs27   vcsa4    video52
audio1      fd0u720    hdb9   hdf4       kmem                     ptyb6  ptyq5  ptyv4  radio10  ram9    sdd1       sr8     ttyS1  ttyeb  ttyta  ttyy9    vcs28   vcsa40   video53
audio2      fd0u800    hdc    hdf5       lmscd                    ptyb7  ptyq6  ptyv5  radio11  random  sdd10      sr9     ttyS2  ttyec  ttytb  ttyya    vcs29   vcsa41   video54
audio3      fd0u820    hdc1   hdf6       log                      ptyb8  ptyq7  ptyv6  radio12  rd      sdd11      st0     ttyS3  ttyed  ttytc  ttyyb    vcs3    vcsa42   video55
audioctl    fd0u830    hdc10  hdf7       logibm                   ptyb9  ptyq8  ptyv7  radio13  rmidi0  sdd12      st0a    ttyS4  ttyee  ttytd  ttyyc    vcs30   vcsa43   video56
aztcd0      fd1        hdc11  hdf8       loop0                    ptyba  ptyq9  ptyv8  radio14  rmidi1  sdd13      st0l    ttya0  ttyef  ttyte  ttyyd    vcs31   vcsa44   video57
bpcd        fd1CompaQ  hdc12  hdf9       loop1                    ptybb  ptyqa  ptyv9  radio15  rmidi2  sdd14      st0m    ttya1  ttyp0  ttytf  ttyye    vcs32   vcsa45   video58
cciss       fd1d360    hdc13  hdg        loop2                    ptybc  ptyqb  ptyva  radio16  rmidi3  sdd15      st1     ttya2  ttyp1  ttyu0  ttyyf    vcs33   vcsa46   video59
cdu535      fd1h1200   hdc14  hdg1       loop3                    ptybd  ptyqc  ptyvb  radio17  rtc     sdd2       st1a    ttya3  ttyp2  ttyu1  ttyz0    vcs34   vcsa47   video6
cgroups     fd1h1440   hdc15  hdg10      loop4                    ptybe  ptyqd  ptyvc  radio18  sbpcd   sdd3       st1l    ttya4  ttyp3  ttyu2  ttyz1    vcs35   vcsa48   video60
cm206cd0    fd1h1476   hdc16  hdg11      loop5                    ptybf  ptyqe  ptyvd  radio19  sbpcd0  sdd4       st1m    ttya5  ttyp4  ttyu3  ttyz2    vcs36   vcsa49   video61
console     fd1h1494   hdc17  hdg12      loop6                    ptyc0  ptyqf  ptyve  radio2   sbpcd1  sdd5       stderr  ttya6  ttyp5  ttyu4  ttyz3    vcs37   vcsa5    video62
core        fd1h1600   hdc18  hdg13      loop7                    ptyc1  ptyr0  ptyvf  radio20  sbpcd2  sdd6       stdin   ttya7  ttyp6  ttyu5  ttyz4    vcs38   vcsa50   video63
dac960_gam  fd1h360    hdc19  hdg14      lp0                      ptyc2  ptyr1  ptyw0  radio21  sbpcd3  sdd7       stdout  ttya8  ttyp7  ttyu6  ttyz5    vcs39   vcsa51   video7
dpti1       fd1h410    hdc2   hdg15      lp1                      ptyc3  ptyr2  ptyw1  radio22  scd0    sdd8       tty     ttya9  ttyp8  ttyu7  ttyz6    vcs4    vcsa52   video8
dpti2       fd1h420    hdc20  hdg16      lp2                      ptyc4  ptyr3  ptyw2  radio23  scd1    sdd9       tty0    ttyaa  ttyp9  ttyu8  ttyz7    vcs40   vcsa53   video9
dpti3       fd1h720    hdc3   hdg17      mapper                   ptyc5  ptyr4  ptyw3  radio24  scd10   sde        tty1    ttyab  ttypa  ttyu9  ttyz8    vcs41   vcsa54   vttuner
dpti4       fd1h880    hdc4   hdg18      mcd                      ptyc6  ptyr5  ptyw4  radio25  scd11   sde1       tty10   ttyac  ttypb  ttyua  ttyz9    vcs42   vcsa55   vtx
dpti5       fd1u1040   hdc5   hdg19      mcdx                     ptyc7  ptyr6  ptyw5  radio26  scd12   sdf        tty11   ttyad  ttypc  ttyub  ttyza    vcs43   vcsa56   vtx0
dpti6       fd1u1120   hdc6   hdg2       mcdx0                    ptyc8  ptyr7  ptyw6  radio27  scd13   sdg        tty12   ttyae  ttypd  ttyuc  ttyzb    vcs44   vcsa57   vtx1
dpti7       fd1u1440   hdc7   hdg20      mcdx1                    ptyc9  ptyr8  ptyw7  radio28  scd14   sdh        tty13   ttyaf  ttype  ttyud  ttyzc    vcs45   vcsa58   vtx10
dsp         fd1u1600   hdc8   hdg3       mcdx2                    ptyca  ptyr9  ptyw8  radio29  scd15   sdi        tty14   ttyb0  ttypf  ttyue  ttyzd    vcs46   vcsa59   vtx11
dsp1        fd1u1680   hdc9   hdg4       mcdx3                    ptycb  ptyra  ptyw9  radio3   scd16   sdj        tty15   ttyb1  ttyq0  ttyuf  ttyze    vcs47   vcsa6    vtx12
dsp2        fd1u1722   hdd    hdg5       mcdx4                    ptycc  ptyrb  ptywa  radio30  scd2    sdk        tty16   ttyb2  ttyq1  ttyv0  ttyzf    vcs48   vcsa60   vtx13
dsp3        fd1u1743   hdd1   hdg6       megaraid_sas_ioctl_node  ptycd  ptyrc  ptywb  radio31  scd3    sdl        tty17   ttyb3  ttyq2  ttyv1  urandom  vcs49   vcsa61   vtx14
eda         fd1u1760   hdd10  hdg7       mem                      ptyce  ptyrd  ptywc  radio32  scd4    sdm        tty18   ttyb4  ttyq3  ttyv2  vbi      vcs5    vcsa62   vtx15
eda1        fd1u1840   hdd11  hdg8       midi0                    ptycf  ptyre  ptywd  radio33  scd5    sdn        tty19   ttyb5  ttyq4  ttyv3  vbi0     vcs50   vcsa63   vtx16
eda2        fd1u1920   hdd12  hdg9       midi00                   ptyd0  ptyrf  ptywe  radio34  scd6    sdo        tty2    ttyb6  ttyq5  ttyv4  vbi1     vcs51   vcsa7    vtx17
eda3        fd1u2880   hdd13  hdh        midi01                   ptyd1  ptys0  ptywf  radio35  scd7    sdp        tty20   ttyb7  ttyq6  ttyv5  vbi10    vcs52   vcsa8    vtx18
eda4        fd1u3200   hdd14  hdh1       midi02                   ptyd2  ptys1  ptyx0  radio36  scd8    sdq        tty21   ttyb8  ttyq7  ttyv6  vbi11    vcs53   vcsa9    vtx19
eda5        fd1u3520   hdd15  hdh10      midi03                   ptyd3  ptys2  ptyx1  radio37  scd9    sdr        tty22   ttyb9  ttyq8  ttyv7  vbi12    vcs54   video    vtx2
eda6        fd1u360    hdd16  hdh11      midi1                    ptyd4  ptys3  ptyx2  radio38  sda     sds        tty23   ttyba  ttyq9  ttyv8  vbi13    vcs55   video0   vtx20
eda7        fd1u3840   hdd17  hdh12      midi2                    ptyd5  ptys4  ptyx3  radio39  sda1    sdt        tty24   ttybb  ttyqa  ttyv9  vbi14    vcs56   video1   vtx21
eda8        fd1u720    hdd18  hdh13      midi3                    ptyd6  ptys5  ptyx4  radio4   sda10   sdu        tty25   ttybc  ttyqb  ttyva  vbi15    vcs57   video10  vtx22
edb         fd1u800    hdd19  hdh14      mixer                    ptyd7  ptys6  ptyx5  radio40  sda11   sdv        tty26   ttybd  ttyqc  ttyvb  vbi16    vcs58   video11  vtx23
edb1        fd1u820    hdd2   hdh15      mixer1                   ptyd8  ptys7  ptyx6  radio41  sda12   sdw        tty27   ttybe  ttyqd  ttyvc  vbi17    vcs59   video12  vtx24
edb2        fd1u830    hdd20  hdh16      mixer2                   ptyd9  ptys8  ptyx7  radio42  sda13   sdx        tty28   ttybf  ttyqe  ttyvd  vbi18    vcs6    video13  vtx25
edb3        full       hdd3   hdh17      mixer3                   ptyda  ptys9  ptyx8  radio43  sda14   sdy        tty29   ttyc0  ttyqf  ttyve  vbi19    vcs60   video14  vtx26
edb4        gscd0      hdd4   hdh18      mkdev.sh                 ptydb  ptysa  ptyx9  radio44  sda15   sdz        tty3    ttyc1  ttyr0  ttyvf  vbi2     vcs61   video15  vtx27
edb5        hda        hdd5   hdh19      mpu401data               ptydc  ptysb  ptyxa  radio45  sda2    sequencer  tty30   ttyc2  ttyr1  ttyw0  vbi20    vcs62   video16  vtx28
edb6        hda1       hdd6   hdh2       mpu401stat               ptydd  ptysc  ptyxb  radio46  sda3    sg0        tty31   ttyc3  ttyr2  ttyw1  vbi21    vcs63   video17  vtx29
edb7        hda10      hdd7   hdh20      nst0                     ptyde  ptysd  ptyxc  radio47  sda4    sg1        tty32   ttyc4  ttyr3  ttyw2  vbi22    vcs7    video18  vtx3
edb8        hda11      hdd8   hdh3       nst0a                    ptydf  ptyse  ptyxd  radio48  sda5    sg10       tty33   ttyc5  ttyr4  ttyw3  vbi23    vcs8    video19  vtx30
fb0         hda12      hdd9   hdh4       nst0l                    ptye0  ptysf  ptyxe  radio49  sda6    sg11       tty34   ttyc6  ttyr5  ttyw4  vbi24    vcs9    video2   vtx31
fb1         hda13      hde    hdh5       nst0m                    ptye1  ptyt0  ptyxf  radio5   sda7    sg12       tty35   ttyc7  ttyr6  ttyw5  vbi25    vcsa    video20  vtx4
fb2         hda14      hde1   hdh6       nst1                     ptye2  ptyt1  ptyy0  radio50  sda8    sg13       tty36   ttyc8  ttyr7  ttyw6  vbi26    vcsa0   video21  vtx5
fb3         hda15      hde10  hdh7       nst1a                    ptye3  ptyt2  ptyy1  radio51  sda9    sg14       tty37   ttyc9  ttyr8  ttyw7  vbi27    vcsa1   video22  vtx6
fb4         hda16      hde11  hdh8       nst1l                    ptye4  ptyt3  ptyy2  radio52  sdb     sg15       tty38   ttyca  ttyr9  ttyw8  vbi28    vcsa10  video23  vtx7
fb5         hda17      hde12  hdh9       nst1m                    ptye5  ptyt4  ptyy3  radio53  sdb1    sg16       tty39   ttycb  ttyra  ttyw9  vbi29    vcsa11  video24  vtx8
fb6         hda18      hde13  i2o        null                     ptye6  ptyt5  ptyy4  radio54  sdb10   sg2        tty4    ttycc  ttyrb  ttywa  vbi3     vcsa12  video25  vtx9
fb7         hda19      hde14  ida        optcd                    ptye7  ptyt6  ptyy5  radio55  sdb11   sg3        tty40   ttycd  ttyrc  ttywb  vbi30    vcsa13  video26  winradio0
fd          hda2       hde15  initctl    par0                     ptye8  ptyt7  ptyy6  radio56  sdb12   sg4        tty41   ttyce  ttyrd  ttywc  vbi31    vcsa14  video27  winradio1
fd0         hda20      hde16  inportbm   par1                     ptye9  ptyt8  ptyy7  radio57  sdb13   sg5        tty42   ttycf  ttyre  ttywd  vbi4     vcsa15  video28  xda
fd0CompaQ   hda3       hde17  input      par2                     ptyea  ptyt9  ptyy8  radio58  sdb14   sg6        tty43   ttyd0  ttyrf  ttywe  vbi5     vcsa16  video29  xda1
fd0d360     hda4       hde18  ippp0      port                     ptyeb  ptyta  ptyy9  radio59  sdb15   sg7        tty44   ttyd1  ttys0  ttywf  vbi6     vcsa17  video3   xda2
fd0h1200    hda5       hde19  ippp1      psaux                    ptyec  ptytb  ptyya  radio6   sdb2    sg8        tty45   ttyd2  ttys1  ttyx0  vbi7     vcsa18  video30  xda3
fd0h1440    hda6       hde2   ippp2      ptmx                     ptyed  ptytc  ptyyb  radio60  sdb3    sg9        tty46   ttyd3  ttys2  ttyx1  vbi8     vcsa19  video31  xda4
fd0h1476    hda7       hde20  ippp3      pts                      ptyee  ptytd  ptyyc  radio61  sdb4    shm        tty47   ttyd4  ttys3  ttyx2  vbi9     vcsa2   video32  xda5
fd0h1494    hda8       hde3   ippp4      ptya0                    ptyef  ptyte  ptyyd  radio62  sdb5    sjcd       tty48   ttyd5  ttys4  ttyx3  vcs      vcsa20  video33  xda6
fd0h1600    hda9       hde4   ippp5      ptya1                    ptyp0  ptytf  ptyye  radio63  sdb6    smpte0     tty49   ttyd6  ttys5  ttyx4  vcs0     vcsa21  video34  xda7
fd0h360     hdb        hde5   ippp6      ptya2                    ptyp1  ptyu0  ptyyf  radio7   sdb7    smpte1     tty5    ttyd7  ttys6  ttyx5  vcs1     vcsa22  video35  xda8
fd0h410     hdb1       hde6   ippp7      ptya3                    ptyp2  ptyu1  ptyz0  radio8   sdb8    smpte2     tty50   ttyd8  ttys7  ttyx6  vcs10    vcsa23  video36  xdb
fd0h420     hdb10      hde7   isdn0      ptya4                    ptyp3  ptyu2  ptyz1  radio9   sdb9    smpte3     tty51   ttyd9  ttys8  ttyx7  vcs11    vcsa24  video37  xdb1
fd0h720     hdb11      hde8   isdn1      ptya5                    ptyp4  ptyu3  ptyz2  ram      sdc     sndstat    tty52   ttyda  ttys9  ttyx8  vcs12    vcsa25  video38  xdb2
fd0h880     hdb12      hde9   isdn2      ptya6                    ptyp5  ptyu4  ptyz3  ram0     sdc1    sonycd     tty53   ttydb  ttysa  ttyx9  vcs13    vcsa26  video39  xdb3
fd0u1040    hdb13      hdf    isdn3      ptya7                    ptyp6  ptyu5  ptyz4  ram1     sdc10   sr0        tty54   ttydc  ttysb  ttyxa  vcs14    vcsa27  video4   xdb4
fd0u1120    hdb14      hdf1   isdn4      ptya8                    ptyp7  ptyu6  ptyz5  ram10    sdc11   sr1        tty55   ttydd  ttysc  ttyxb  vcs15    vcsa28  video40  xdb5
fd0u1440    hdb15      hdf10  isdn5      ptya9                    ptyp8  ptyu7  ptyz6  ram11    sdc12   sr10       tty56   ttyde  ttysd  ttyxc  vcs16    vcsa29  video41  xdb6
fd0u1600    hdb16      hdf11  isdn6      ptyaa                    ptyp9  ptyu8  ptyz7  ram12    sdc13   sr11       tty57   ttydf  ttyse  ttyxd  vcs17    vcsa3   video42  xdb7
fd0u1680    hdb17      hdf12  isdn7      ptyab                    ptypa  ptyu9  ptyz8  ram13    sdc14   sr12       tty58   ttye0  ttysf  ttyxe  vcs18    vcsa30  video43  xdb8
fd0u1722    hdb18      hdf13  isdnctrl0  ptyac                    ptypb  ptyua  ptyz9  ram14    sdc15   sr13       tty59   ttye1  ttyt0  ttyxf  vcs19    vcsa31  video44  zero
fd0u1743    hdb19      hdf14  isdnctrl1  ptyad                    ptypc  ptyub  ptyza  ram15    sdc2    sr14       tty6    ttye2  ttyt1  ttyy0  vcs2     vcsa32  video45
fd0u1760    hdb2       hdf15  isdnctrl2  ptyae                    ptypd  ptyuc  ptyzb  ram16    sdc3    sr15       tty60   ttye3  ttyt2  ttyy1  vcs20    vcsa33  video46
fd0u1840    hdb20      hdf16  isdnctrl3  ptyaf                    ptype  ptyud  ptyzc  ram2     sdc4    sr16       tty61   ttye4  ttyt3  ttyy2  vcs21    vcsa34  video47
fd0u1920    hdb3       hdf17  isdnctrl4  ptyb0                    ptypf  ptyue  ptyzd  ram3     sdc5    sr2        tty62   ttye5  ttyt4  ttyy3  vcs22    vcsa35  video48
fd0u2880    hdb4       hdf18  isdnctrl5  ptyb1                    ptyq0  ptyuf  ptyze  ram4     sdc6    sr3        tty63   ttye6  ttyt5  ttyy4  vcs23    vcsa36  video49
fd0u3200    hdb5       hdf19  isdnctrl6  ptyb2                    ptyq1  ptyv0  ptyzf  ram5     sdc7    sr4        tty7    ttye7  ttyt6  ttyy5  vcs24    vcsa37  video5

comment:12 by Alex Samorukov, 12 years ago

Its possible that we are talking with a wrong device. Could you please send output of the
cat /proc/devices

command?

comment:13 by Alex Samorukov, 12 years ago

One more q:

# smartctl -a -d megaraid,22 /dev/sda |grep Model
(Nothing found, HDD is on the second channel)
# smartctl -a -d megaraid,5 /dev/sda |grep Model
Device Model: WDC WD2001FASS-00U0B0

Its unclear for me why are you using /dev/sda for the second controller.

comment:14 by johnlepikhin, 12 years ago

I used /dev/sdc instead of /dev/sda and it works. Thank you! But how can I get correct device path for the device number?

# cat /proc/devices 
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 21 sg
128 ptm
136 pts
180 usb
189 usb_device
253 megaraid_sas_ioctl
254 rtc

Block devices:
259 blkext
  7 loop
  8 sd
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
254 device-mapper

comment:15 by Alex Samorukov, 12 years ago

Resolution: wontfix
Status: assignedclosed

ok, thank you for reply, so at least smartmontools works correctly.

I think you should get it from lsscsi or dmesg output. Internally device name converted to the
bus number using SCSI_IOCTL_GET_BUS_NUMBER ioctl call.

comment:16 by jonbendtsen, 12 years ago

I stumbled upon this ticket when looking for how to do smartctl on megaraid devices. I have decided to document my findings, hope you find it useful.

I do get S.M.A.R.T information with this command: smartctl -i -d sat+megaraid,2 /dev/sda

If I let the ,2 run through a sequence like from 2-14 I do get individual information about all my 12 disks. The Serial Number is different depending on which ,# I ask about.

However, if I keep the ,# static, like ,2 then it does not make any difference if I ask /dev/sda, /dev/sdb, ..., /dev/sdl or /dev/bsg/* I still get the same disk information sole dependent on the ,# part.

This means I can not use smartctl to correlate which disk is sda, sdb, ..., sdl. But it is possible to use "megacli -LdPdInfo? -a0" because one of that commands output lines are "Virtual Drive: 11 (Target Id: 11)" which matches the lsscsi output "[0:2:11:0] disk SMC SMC2108 2.12 /dev/sdl". Another megacli output line is "Device Id: 14" which corresponds to the ,14 number above. The serial number from smartctl -i -d sat+megaraid,14 matches with the serial number from both "megacli -LdPdInfo? -a0" and "megacli -pdInfo -PhysDrv?[$encdeviceid:$slotnr] -a$controllernr".

However, I only have one megaraid controller. lsscsi -g gives no sg devices, lsscsi -H says [0] megaraid_sas. lspci gives 03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)

It is also possible to lookup the correlating information under /sys.
root@proxmoxve1:/sys/bus/scsi/devices/0:2:11:0# pwd
/sys/bus/scsi/devices/0:2:11:0
root@proxmoxve1:/sys/bus/scsi/devices/0:2:11:0# ls -la block/
total 0
drwxr-xr-x 3 root root 0 Jul 26 16:04 .
drwxr-xr-x 7 root root 0 Jul 26 16:04 ..
drwxr-xr-x 12 root root 0 Jul 26 16:04 sdl
root@proxmoxve1:/sys/bus/scsi/devices/0:2:11:0# ls -la bsg/
total 0
drwxr-xr-x 3 root root 0 Jul 26 16:04 .
drwxr-xr-x 7 root root 0 Jul 26 16:04 ..
drwxr-xr-x 3 root root 0 Jul 26 16:04 0:2:11:0

Note: See TracTickets for help on using tickets.