You are not logged in.

#1 2011-09-03 11:43:56

Atronach
Member
From: Czech Republic
Registered: 2010-11-13
Posts: 48

[SOLVED] Hard Drive not detected

Hi,
I've bought Hitachi Touro Desk Pro 2TB USB 3.0 external drive recently, however there's a problem using it in Linux. I can fully see it in Win7 x64 disk manager, but running sudo fdisk -l or parted -l gives me only my internal sda drive. Additionaly, having connected the drive to pc when arch linux booting - it just stucks on "Waiting on UDev uevents to be processed" for approximetaly 20-30 secs and the continues with booting leaving the UDev uevents status failed. Dmesg then gives me this:

[david@David-ArchLinux ~]$ dmesg | grep sd
[    3.423524] sd 0:0:0:0: [sda] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[    3.423582] sd 0:0:0:0: [sda] Write Protect is off
[    3.423585] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.423610] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.466205]  sda: sda1 sda2 sda3
[    3.466422] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.756021] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    4.865240] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    8.029066] sdhci: Secure Digital Host Controller Interface driver
[    8.029069] sdhci: Copyright(c) Pierre Ossman
[    8.070180] sdhci-pci 0000:15:00.2: SDHCI controller found [1180:0822] (rev 21)
[    8.070206] sdhci-pci 0000:15:00.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[    8.071247] sdhci-pci 0000:15:00.2: Will use DMA mode even though HW doesn't fully claim to support it.
[    9.055685] sd 4:0:0:0: Attached scsi generic sg2 type 0
[   37.654097] EXT4-fs (sda2): re-mounted. Opts: user_xattr
[   39.440050] sd 4:0:0:0: uas_eh_abort_handler tag 1
[   39.440052] sd 4:0:0:0: uas_eh_abort_handler tag 0
[   39.440057] sd 4:0:0:0: uas_eh_device_reset_handler tag 1
[   39.440059] sd 4:0:0:0: uas_eh_target_reset_handler tag 1
[   39.440062] sd 4:0:0:0: uas_eh_bus_reset_handler tag 0
[   39.671415] sd 4:0:0:0: Device offlined - not ready after error recovery
[   39.671417] sd 4:0:0:0: Device offlined - not ready after error recovery
[   39.671434] sd 4:0:0:0: rejecting I/O to offline device
[   39.671468] sd 4:0:0:0: rejecting I/O to offline device
[   39.671495] sd 4:0:0:0: rejecting I/O to offline device
[   39.671526] sd 4:0:0:0: rejecting I/O to offline device
[   39.671554] sd 4:0:0:0: [sdb] READ CAPACITY failed
[   39.671556] sd 4:0:0:0: rejecting I/O to offline device
[   39.671582] sd 4:0:0:0: [sdb]  Result: hostbyte=0x01 driverbyte=0x00
[   39.671585] sd 4:0:0:0: [sdb] Sense not available.
[   39.671590] sd 4:0:0:0: rejecting I/O to offline device
[   39.671619] sd 4:0:0:0: [sdb] Write Protect is off
[   39.671622] sd 4:0:0:0: [sdb] Mode Sense: 00 00 00 00
[   39.671624] sd 4:0:0:0: rejecting I/O to offline device
[   39.671651] sd 4:0:0:0: [sdb] Asking for cache data failed
[   39.671679] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[   39.671860] sd 4:0:0:0: [sdb] Attached SCSI disk
[   40.133479] Adding 3867644k swap on /dev/sda3.  Priority:-1 extents:1 across:3867644k
[   67.060794] EXT4-fs (sda2): re-mounted. Opts: user_xattr,acl,barrier=1,data=ordered,commit=15

However i can see the drive in /sys/block or /dev/disk/by-id. In another opensuse machine the drive is accessible but only when connected during boot up, connecting it when the system is already on does nothing.
Having the drive formatted/unformatted,gpt or mbr type doesn't change a thing.

Last edited by Atronach (2012-04-03 02:24:10)

Offline

#2 2011-09-03 17:13:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,120

Re: [SOLVED] Hard Drive not detected

I may be confused here, there are some weird things in dmesg....
But I bet the drive is available.

Did you try fdisk /dev/sdb   ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-09-03 18:02:14

Atronach
Member
From: Czech Republic
Registered: 2010-11-13
Posts: 48

Re: [SOLVED] Hard Drive not detected

"fdisk: unable to open /dev/sdb: No such device or address"
The same with parted.
It's quiet a new drive, maybe the kernel needs to create special support for the drive's crippled non-standard firmware designed to work with non-standard windows as well as in the case of some bioses?

Last edited by Atronach (2011-09-03 18:03:00)

Offline

#4 2011-09-12 04:40:14

1LordAnubis
Member
Registered: 2008-10-10
Posts: 252
Website

Re: [SOLVED] Hard Drive not detected

And I was about to purchase one yikes


Any society that would give up a little liberty to gain a little security will deserve neither and lose both.
-Benjamin Franklin
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
-George Bernard Shaw

Offline

#5 2011-09-26 19:15:52

hschwartz
Member
Registered: 2011-09-26
Posts: 1

Re: [SOLVED] Hard Drive not detected

Hi Atronach,

I am going through the same problem. Did you find a way to resolve this or is it something that needs to wait for a kernel update?

Thanks

Offline

#6 2011-09-29 08:05:04

Atronach
Member
From: Czech Republic
Registered: 2010-11-13
Posts: 48

Re: [SOLVED] Hard Drive not detected

This is what i've found out: Adding "usb" hook to initcpio removes the hang when booting and makes the disk being able to be accessible and detected by both fdisk and parted but sometimes after restart or rebooting to Win and back to Arch introduces the hang again, i have to unplug the disk from power and plug back to remove the hang on next boot. I think the usb hook shouldn't be required since it's meant for usb root devices or when connecting at early start which is not my case, USB sticks don't need the usb hook at all anyway. What more I still get some warnings (probably not harmfull) on boot with either usb stick or sata disk connected no matter what. I would prefer to connect it quietly (without warnings) or not trying to connect the disk at boot at all and then kde should take care of it when logged into user account - any idea?
The impossibility reconnecting the disk when system is on is caused by the missing hotswap/hotplug feature for the disk because udev device manager treats it as internal, you can verify it like this: "cat /sys/block/sdx/removable". Creating udev rule with UDISKS_SYSTEM_INTERNAL=0 as stated at http://lamarque-lvs.blogspot.com/2011/0 … art-2.html solved the problem only for few sessions, after some restarts and reboots to Win it fell back to removable=0, funny isn't it?
So IMHO waiting for kernel update is pointless since the problem lays in how udev treats sata external drives generally, creating a proper udev rule to force a disk to be removable is crucial or maybe waiting for a udev bugfix to make the udisks_system_internal=0 value work and optionally adding some grub kernel parameter to NOT probe for external block devices on boot (to get rid off the confusing warings and the need for the usb hook) would be preferable for me.

Last edited by Atronach (2011-09-29 08:26:17)

Offline

#7 2011-09-29 09:48:48

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,732

Re: [SOLVED] Hard Drive not detected

In the OP you said it was USB and now you say it is sata, which is it? If there is a usb bridge then it is usb, even so sata drives should be hot swappable if the chipset and drivers support it.

Judging by the messages you get when you plug the drive, my best guess is that the usb bridge may need some quick to work properly so you may want to start by "talking" to the kernel devs, look for bug reports of similar problems and if you find none submit a bug report yourself (well ... at least when kernel.org is up and running again).


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#8 2011-09-29 10:37:04

Atronach
Member
From: Czech Republic
Registered: 2010-11-13
Posts: 48

Re: [SOLVED] Hard Drive not detected

It is indeed USB, sorry. Maybe that's why the instructions from Lamarque's blog post doesn't reliably work for me since it's tailored for eSATA drives.

Last edited by Atronach (2011-09-29 10:37:41)

Offline

#9 2012-03-29 09:48:07

blipper
Member
Registered: 2012-03-29
Posts: 1

Re: [SOLVED] Hard Drive not detected

Did you ever work out the fix for this? Got exactly the same problem on my Ubuntu Server (same Hitachi drive)...

Offline

#10 2012-03-29 12:46:47

Atronach
Member
From: Czech Republic
Registered: 2010-11-13
Posts: 48

Re: [SOLVED] Hard Drive not detected

Well, some time ago i tried the old 2.6.32 lts kernel when it was in arch repos and the drive was being re-mounted just fine. Unfortunatelly the new 3.0 lts suffers from it as well as the last stable 3.2.x. When i re-attach the drive and it's not detected in kde i have to remove the "usb_storage" kernel module or "ehci_hcd" with modprobe -r or rmmod and load it again then the kde device notifier pops up from tray. The problem with the boot process being stuck can be eliminated by blacklisting the "uas" module in modprobe.d or adding the "usb" hook or "usb_storage" module to initcpio. The boot errors "Asking for cache data failed" and "Assuming drive cache: write through" are harmless and can be covered from sight by adding "loglevel=3" parameter to kernel. That's all i now.

Offline

#11 2012-04-03 02:17:04

Atronach
Member
From: Czech Republic
Registered: 2010-11-13
Posts: 48

Re: [SOLVED] Hard Drive not detected

Ok, i've finally figured it out.  If I understand it correctly, the problem lies in the slow initialization of the drive's firmware to be ready to be scanned by the usb_storage kernel module. If you look at the output of "cat /sys/module/usb_storage/parameters/delay_use" it shows the value "1" (second). The default value for the kernel 3.3 should be "5" as stated here: http://www.mjmwired.net/kernel/Document … s.txt#2713. So you can either add the parameter "usb-storage.delay_use=5" to the kernel or add "options usb_storage delay_use=5" to some custom .conf file in the modprobe.d directory. If you chose the latter method and have the module usb_storage put in the MODULES array in mkinitcpio.conf (because of the booting process being stuck while the drive is attached) at the same time, don't forget to also uncomment the FILES array and have the custom file from modprobe.d be incorporated there otherwise the delay_use option won't apply since the usb_storage module is already loaded by intiramfs with default options. Now I can re-attach the drive how many times i want and the drive is allways detected by fdisk, parted and thus by KDE device notifier too. And what more I don't have to have the drive attached during boot but I can do it later when system is already on and it still gets detected.

Last edited by Atronach (2012-04-03 02:29:01)

Offline

#12 2013-09-08 22:42:24

reed1
Member
Registered: 2011-01-14
Posts: 28

Re: [SOLVED] Hard Drive not detected

Atronach wrote:

.... "usb-storage.delay_use=5" to the kernel or add "options usb_storage delay_use=5" to some custom .conf file in the modprobe.d directory.....

Thanks, now my external disk is detected : )

Offline

#13 2013-09-08 23:52:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 25,758
Website

Re: [SOLVED] Hard Drive not detected

Please don't necrobump, especially with empty posts:
https://wiki.archlinux.org/index.php/Fo … Bumping.27



Closing


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB