Closed stygge-ulv closed 8 years ago
Can you show the output with triple verbose?
Baruch
On Sat, Jan 16, 2016, 16:13 stygge-ulv notifications@github.com wrote:
Hi, as the subject line indicates diskscan does not recognize my SCSI disk which have a valid partion table and is mountable
I get the following output : /diskscan -v /dev/sdb diskscan version 019
V: Verbosity set I: Validating path /dev/sdb E: Can't identify disk for path /dev/sdb, errno=0: Success I: Closed disk
and dmesg says:
[88460672403] sdb: sdb1
output from lscpi is the following:
root@krypton:/home/jan# lspci 00:000 Host bridge: Intel Corporation 82850 850 (Tehama) Chipset Host Bridge (MCH) (rev 04) 00:010 PCI bridge: Intel Corporation 82850 850 (Tehama) Chipset AGP Bridge (rev 04) 00:1e0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 04) 00:1f0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 04) 00:1f1 IDE interface: Intel Corporation 82801BA IDE U100 Controller (rev 04) 00:1f2 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 https://github.com/baruch/diskscan/issues/1 (rev 04) 00:1f3 SMBus: Intel Corporation 82801BA/BAM SMBus Controller (rev 04) 00:1f4 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 https://github.com/baruch/diskscan/issues/1 (rev 04) 00:1f5 Multimedia audio controller: Intel Corporation 82801BA/BAM AC'97 Audio Controller (rev 04) 01:000 VGA compatible controller: Advanced Micro Devices, Inc [AMD/ATI] R420 [Radeon X800 AGP Series] 01:001 Display controller: Advanced Micro Devices, Inc [AMD/ATI] R420 Radeon X800 XT AGP http://Secondary 02:080 Ethernet controller: Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller (rev 03) 02:0a0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U 02:0d0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
and output from fdisk is :
Disk /dev/sdb: 684 GiB, 73407488000 bytes, 143374000 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 5CF4108D-DA5E-4691-8AA0-CAEEC16BBA2C
Device Start End Sectors Size Type /dev/sdb1 2048 143373966 143371919 684G Linux filesystem
I have downloaded the latest release and compiled it, since the version that comes with Debian 82 also fails
V: Verbosity set I: Validating path /dev/sdb E: IO failed with no sense: status=2 mask=1 driver=8 msg=0 host=0 E: Can't identify disk for path /dev/sdb: Success I: Closed disk
Any ideas ?
best regards
— Reply to this email directly or view it on GitHub https://github.com/baruch/diskscan/issues/54.
I assume it means -vvv option? If yes, here is the output. But not much more info. I was looking for a way to compile it with a higher debug level, but have not yet found any info on that.
root@krypton:/home/jan/Downloads/diskscan-master# ./diskscan -vvv /dev/sdbdiskscan version 0.19
V: Verbosity set V: High verbosity set V: Very high verbosity set I: Validating path /dev/sdb E: Can't identify disk for path /dev/sdb, errno=0: Success I: Closed disk
Strange, can you see if there are messages in dmesg about sense errors from the disk?
On Sat, Jan 16, 2016, 17:05 stygge-ulv notifications@github.com wrote:
I assume it means -vvv option? If yes, here is the output. But not much more info. I was looking for a way to compile it with a higher debug level, but have not yet found any info on that.
root@krypton:/home/jan/Downloads/diskscan-master# ./diskscan -vvv /dev/sdbdiskscan version 0.19
V: Verbosity set V: High verbosity set V: Very high verbosity set
I: Validating path /dev/sdb E: Can't identify disk for path /dev/sdb, errno=0: Success I: Closed disk
—
Reply to this email directly or view it on GitHub https://github.com/baruch/diskscan/issues/54#issuecomment-172214600.
dmesg does not make much of an effor to help. The last few entries from multiple attempts
[88460.672403] sdb: sdb1 [89869.814142] sdb: sdb1 [89881.850758] sdb: sdb1 [89898.961480] sdb: sdb1 [92312.411514] sdb: sdb1 [92708.925141] sdb: sdb1 [93066.670551] sdb: sdb1 [93289.521490] sdb: sdb1
I'll try to look at this later on. Can't do much just now.
Baruch
On Sat, Jan 16, 2016, 17:10 stygge-ulv notifications@github.com wrote:
dmesg does not make much of an effor to help. The last few entries from multiple attempts
[88460.672403] sdb: sdb1 [89869.814142] sdb: sdb1 [89881.850758] sdb: sdb1 [89898.961480] sdb: sdb1 [92312.411514] sdb: sdb1 [92708.925141] sdb: sdb1 [93066.670551] sdb: sdb1 [93289.521490] sdb: sdb1
— Reply to this email directly or view it on GitHub https://github.com/baruch/diskscan/issues/54#issuecomment-172214810.
ok.
I just downloaded lsscsi and got the following output. Have no idea if it is any help.
root@krypton:/home/jan# lsscsi -l -vvv sysfsroot: /sys [0:0:0:0] cd/dvd PLEXTOR DVDR PX-708A 1.12 /dev/sr0 state=running queue_depth=1 scsi_level=6 type=5 device_blocked=0 timeout=30 dir: /sys/bus/scsi/devices/0:0:0:0 [/sys/devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0] [2:0:0:0] disk IBM-ESXS MAP3735NP FN B109 /dev/sda state=running queue_depth=8 scsi_level=4 type=0 device_blocked=0 timeout=30 dir: /sys/bus/scsi/devices/2:0:0:0 [/sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0/host2/target2:0:0/2:0:0:0] [2:0:1:0] disk IBM-ESXS ST373405LW !# B243 /dev/sdb state=running queue_depth=8 scsi_level=4 type=0 device_blocked=0 timeout=30 dir: /sys/bus/scsi/devices/2:0:1:0 [/sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0/host2/target2:0:1/2:0:1:0] [2:0:2:0] disk IBM-ESXS ST3146807LW FN B258 /dev/sdc state=running queue_depth=8 scsi_level=4 type=0 device_blocked=0 timeout=30 dir: /sys/bus/scsi/devices/2:0:2:0 [/sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0/host2/target2:0:2/2:0:2:0] [4:0:0:0] cd/dvd TSSTcorp CDDVDW SE-208AB TS00 /dev/sr1 state=running queue_depth=1 scsi_level=0 type=5 device_blocked=0 timeout=30 dir: /sys/bus/scsi/devices/4:0:0:0 [/sys/devices/pci0000:00/0000:00:1f.4/usb2/2-1/2-1.1/2-1.1:1.0/host4/target4:0:0/4:0:0:0]
and some more detail from lsscsi
[2:0:1:0] disk IBM-ESXS ST373405LW !# B243 /dev/sdb device_blocked=0 iocounterbits=32 iodone_cnt=0x89a7dd ioerr_cnt=0x32 iorequest_cnt=0x89a7dd queue_depth=8 queue_type=ordered scsi_level=4 state=running timeout=30 type=0 dir: /sys/bus/scsi/devices/2:0:1:0 [/sys/devices/pci0000:00/0000:00:1e.0/0000:02:0a.0/host2/target2:0:1/2:0:1:0]
I pushed some code to add a little bit more information to why this fails for you. Can you please try it, use -vvv again too.
It would also help to have a run under strace and send me the system call log, as in:
strace -o /tmp/diskscan.strace.log ./diskscan /dev/sdb
and send the resulting /tmp/diskscan.strace.log
file.
It looks to be connected through an Adaptec Parallel SCSI device, I haven't seen one of those in a long time and obviously had no testing through such a device. I suspect the driver doesn't passes through the SCSI commands properly and there may be a need for an alternate ioctl to get through this.
I'd need some more details to try to figure it out:
smartctl -a /dev/sdb
Hi Baruch,
I have compiled the code in debug mode and ran it through with gdb and traced the problem to a function call parse_inquiry() which parse the result of a call to cdb_inquiry() where an ioctl() call apparently returns zero bytes so disk identity data such as vendor id etc. is missing. The ioctl call returns with a zero code so it apparently succeed, just without any data. Another earler ioctl call to determin block size and max LBA address succeed and so does the parsing of the result with correct values cheked by fdisk.
I will look into the recommendations you made and come back when I got the information you need.
stygge-ulv
I have tried downloading the code again, and also the debian branch and recompiled. There is no more output with -vvv verbose than in the earlier version. Am I doint something wrong (Newbie here)
The master branch is what you need. If there is no additional data than there is no new information to use. The dates indeed confess in empty, there is an error indication but no sense which is strange. I'll try to set what can be done.
Baruch
On Sat, Jan 16, 2016, 22:43 stygge-ulv notifications@github.com wrote:
I have tried downloading the code again, and also the debian branch and recompiled. There is no more output with -vvv verbose than in the earlier version. Am I doint something wrong (Newbie here)
— Reply to this email directly or view it on GitHub https://github.com/baruch/diskscan/issues/54#issuecomment-172256734.
I have created the strace log, but how do i send it ? (Newbie - sorry)
System is a Debian 8.2.0 i386
uname -a Linux krypton 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) i686 GNU/Linux
lspci -vvv
00:00.0 Host bridge: Intel Corporation 82850 850 (Tehama) Chipset Host Bridge (MCH) (rev 04) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx- Latency: 0 Region 0: Memory at f0000000 (32-bit, prefetchable) [size=128M] Capabilities: [a0] AGP version 2.0 Status: RQ=32 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW+ AGP3- Rate=x1,x2,x4 Command: RQ=1 ArqSz=0 Cal=0 SBA+ AGP+ GART64- 64bit- FW- Rate=x4 Kernel driver in use: agpgart-intel
00:01.0 PCI bridge: Intel Corporation 82850 850 (Tehama) Chipset AGP Bridge (rev 04) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort-
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 04) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort-
00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 04)
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 Controller (rev 04) (prog-if 80 [Master])
Subsystem: Intel Corporation Device 6d76
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
00:1f.2 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 04) (prog-if 00 [UHCI])
Subsystem: Intel Corporation Device 6d76
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
00:1f.3 SMBus: Intel Corporation 82801BA/BAM SMBus Controller (rev 04)
Subsystem: Intel Corporation Device 6d76
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
00:1f.4 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 04) (prog-if 00 [UHCI])
Subsystem: Intel Corporation Device 6d76
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
00:1f.5 Multimedia audio controller: Intel Corporation 82801BA/BAM AC'97 Audio Controller (rev 04)
Subsystem: Intel Corporation Device 6d76
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] R420 [Radeon X800 AGP Series](prog-if 00 [VGA controller])
Subsystem: PC Partner Limited / Sapphire Technology Device 13d0
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
01:00.1 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] R420 Radeon X800 XT AGP
Subsystem: PC Partner Limited / Sapphire Technology Device 13d1
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
02:08.0 Ethernet controller: Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller (rev 03)
Subsystem: Intel Corporation EtherExpress PRO/100 VM
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
02:0a.0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort-
02:0d.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
Subsystem: Intel Corporation PRO/1000 MT Server Adapter
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort-
I have made the strace file but sad to say, I don't know hot to send it to you :-) Please explain.
I made it work brute-force by putting a return 0 statment in arch-linux.c after line 460, in function disk_dev_identify() function, skipping the check for parsing of the inquiry. Ugly, but works. I don't know if there would be any ill effects. But it confirms the debug I made that it is the sg_ioctl() that get nothing back but with a return code 0.
I suspect it is an old SCSI device that wont accept a large buffer for inquiry data, I modified the code to only ask for what's needed. Can you please try the latest master now?
You can send the strace by email to me at baruch@ev-en.org
Hi Baruch,
that did the trick. I works fine now. Do you still want the strace file ?
And thanks a lot for you help. Great experience for a first encounter on a new site.
best
No need for the strace anymore.
I would appreciate getting an email from you and maybe trying a few things outside of this bug since I have no way to test behavior of such disks otherwise and it would be nice to get some data out of them. Shoot me an email if you are open to that.
The fix was to only request 32 bytes to avoid an issue with the old SCSI standard implementation. 32 bytes is too small to cover all data though, need to check if 64 bytes works too.
Hi Baruch
Just let me know how i can assist you with the troubleshooting of the old disks.
Jan On 17 Jan 2016 06:27, "Baruch Even" notifications@github.com wrote:
No need for the strace anymore.
I would appreciate getting an email from you and maybe trying a few things outside of this bug since I have no way to test behavior of such disks otherwise and it would be nice to get some data out of them. Shoot me an email if you are open to that.
— Reply to this email directly or view it on GitHub https://github.com/baruch/diskscan/issues/54#issuecomment-172293284.
If you can go into the code and change the 32 to 64 or even 128 and see if they work for you that would be nice.
Another thing I'd be happy to get is if you can check out libscsicmd latest master, compile it and run the test/collect_raw_data
script and send me the output, it will collect all possible outputs on all diagnostics commands and enable me to improve parsing of various scsi devices.
Hi Baruch, I assume it is the value of the second call argument of function call cdb_inquiry_simple() in function disk_dev_identify() that you want me to change from 32 to 64 and 128 ? In the last master it was already changed from yesterdays value of 32 to 64. I have checked both 64 and 128 and they both worked. However I noticed that the declaration of the cdb fuffer is cdb[32]. I would have expected it to be the same size as the lengh - i.e. 32, 64 or 128. It seems there could be a chance of going beyond the end of the buffer if not equal. I also checked 256 but that failed.
I will look into the other issue requested. Stay tuned.
I downloaded and compiled the libscsiscmd and ran the command collect_raw_data /dev/sdb but I get an error message saying Usage: collect_raw_data disk_device ?
Thanks for the update on the inquiry command, the size is for the buffer to be filled and not the CDB and the buffer is already defined to be 512 bytes so there is plenty of space in it.
The collect_raw_data script works only with sg devices so you need to look at lsscsi -g and see what is the sg device name for it, most likely /dev/sg1.
According to the following link, the default inquiry buffer length seems to be 96 characters ?
http://www.tldp.org/HOWTO/archived/SCSI-Programming-HOWTO/SCSI-Programming-HOWTO-9.html
Thanks. I've updated all my related programs to use 96 bytes as the default.
Hi, as the subject line indicates diskscan does not recognize my SCSI disk which have a valid partion table and is mountable.
I get the following output : ./diskscan -v /dev/sdb diskscan version 0.19
V: Verbosity set I: Validating path /dev/sdb E: Can't identify disk for path /dev/sdb, errno=0: Success I: Closed disk
and dmesg says:
[88460.672403] sdb: sdb1
output from lscpi is the following:
root@krypton:/home/jan# lspci 00:00.0 Host bridge: Intel Corporation 82850 850 (Tehama) Chipset Host Bridge (MCH) (rev 04) 00:01.0 PCI bridge: Intel Corporation 82850 850 (Tehama) Chipset AGP Bridge (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 04) 00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 04) 00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 Controller (rev 04) 00:1f.2 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 04) 00:1f.3 SMBus: Intel Corporation 82801BA/BAM SMBus Controller (rev 04) 00:1f.4 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 04) 00:1f.5 Multimedia audio controller: Intel Corporation 82801BA/BAM AC'97 Audio Controller (rev 04) 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] R420 [Radeon X800 AGP Series] 01:00.1 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] R420 Radeon X800 XT AGP 02:08.0 Ethernet controller: Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller (rev 03) 02:0a.0 SCSI storage controller: Adaptec AHA-2940U/UW/D / AIC-7881U 02:0d.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
and output from fdisk is :
Disk /dev/sdb: 68.4 GiB, 73407488000 bytes, 143374000 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 5CF4108D-DA5E-4691-8AA0-CAEEC16BBA2C
Device Start End Sectors Size Type /dev/sdb1 2048 143373966 143371919 68.4G Linux filesystem
I have downloaded the latest release and compiled it, since the version that comes with Debian 8.2 also fails
V: Verbosity set I: Validating path /dev/sdb E: IO failed with no sense: status=2 mask=1 driver=8 msg=0 host=0 E: Can't identify disk for path /dev/sdb: Success I: Closed disk
Any ideas ?
best regards