You are not logged in.

#1 2012-05-10 17:04:22

virati
Member
Registered: 2008-04-14
Posts: 83

Esata Hotplugging

I just noticed that my esata drives do not show up in /dev after hotplugging anymore. Not entirely sure after which upgrade, but it used to work like a charm. I'm at a loss as to how to trace the problem. No major changes to the system since the hotplugging worked, only arch updates. Is this a udev issue? Or is this a problem from HAL being phased out? Thanks.

Offline

#2 2012-05-11 10:50:03

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: Esata Hotplugging

Udev could have stalled because you have a faulty device (unlikely)
What does dmesg say when you plug them in?


since 2009

Offline

#3 2012-05-18 20:30:39

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Esata Hotplugging

I had the same (or similar?) problem. I have a Coolermaster CM690 II case, which has a SATA dock on top - here's a pic:

CM690-II_Advanced_Case_Top_SATA_Bay.jpg.

Hotplugging a drive into this dock used to work flawlessly, but sometime after upgrading to kernel 3.3 it stopped working. Inserting a drive gave no response, the kernel just didn't see that anything was happening, no message in dmesg.
But if I booted with the drive connected in the dock, the drive was seen as connected and normal and could be mounted etc.

My temporary fix: Downgrading the kernel to 3.2.13-1. That made it work again.

But good news, everyone! Today I upgraded to kernel 3.3.6-1, and now it seems to be working normally again! After upgrading I rebooted with no drive in the dock, then inserted a drive, and it showed up as expected and functioned normally!

Offline

#4 2012-05-18 21:50:28

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Esata Hotplugging

Do both of you guys have your SATA controllers set to AHCI?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2012-05-20 17:49:37

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Esata Hotplugging

Without rebooting to check the BIOS: Yes, I do.

Grepping dmesg for ahci gives me this:

[    1.680406] ahci 0000:00:11.0: version 3.0
[    1.680465] ahci 0000:00:11.0: irq 49 for MSI/MSI-X
[    1.680547] ahci 0000:00:11.0: AHCI 0001.0200 32 slots 6 ports 6 Gbps 0x3f impl SATA mode
[    1.680549] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part 
[    1.681198] scsi0 : ahci
[    1.681280] scsi1 : ahci
[    1.681344] scsi2 : ahci
[    1.681404] scsi3 : ahci
[    1.681469] scsi4 : ahci
[    1.681530] scsi5 : ahci
[    1.681726] ahci 0000:04:00.0: JMB361 has only one port
[    1.681739] ahci 0000:04:00.0: forcing port_map 0x3 -> 0x1
[    1.681793] ahci 0000:04:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x1 impl SATA mode
[    1.681796] ahci 0000:04:00.0: flags: 64bit ncq pm led clo pmp pio slum part 
[    1.682225] scsi6 : ahci
[    1.682410] scsi7 : ahci

That means my SATA controllers are set to AHCI, right?

Last edited by abstrakct (2012-05-20 17:50:18)

Offline

#6 2012-05-21 16:56:45

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Esata Hotplugging

Correction: It seems I was wrong. It's back to not working. The first time I inserted a drive after rebooting, it worked as it should. I removed the drive, inserted another - no reaction. Nothing in dmesg. The drive spins up, but linux doesn't want to see it.

Any ideas?

I see this in dmesg which might have something to do with my problem:

[252943.418381] ata4: exception Emask 0x10 SAct 0x0 SErr 0x90202 action 0xe frozen
[252943.418384] ata4: irq_stat 0x00400000, PHY RDY changed
[252943.418387] ata4: SError: { RecovComm Persist PHYRdyChg 10B8B }
[252943.418391] ata4: hard resetting link
[252944.138085] ata4: SATA link down (SStatus 0 SControl 300)
[252949.138061] ata4: hard resetting link
[252949.458083] ata4: SATA link down (SStatus 0 SControl 300)
[252949.458092] ata4: limiting SATA link speed to 1.5 Gbps
[252954.458058] ata4: hard resetting link
[252954.778069] ata4: SATA link down (SStatus 0 SControl 310)
[252954.778076] ata4.00: disabled
[252954.778087] ata4: EH complete
[252954.778101] ata4.00: detaching (SCSI 3:0:0:0)
[252954.778454] sd 3:0:0:0: [sdd] Synchronizing SCSI cache
[252954.778482] sd 3:0:0:0: [sdd]  Result: hostbyte=0x04 driverbyte=0x00
[252954.778485] sd 3:0:0:0: [sdd] Stopping disk
[252954.778490] sd 3:0:0:0: [sdd] START_STOP FAILED
[252954.778491] sd 3:0:0:0: [sdd]  Result: hostbyte=0x04 driverbyte=0x00

Offline

#7 2012-05-22 20:03:02

don_crissti
Member
Registered: 2009-03-17
Posts: 35

Re: Esata Hotplugging

Assuming sdd is your (unmounted) esata disk, try running as root:

echo 1 > /sys/block/sdd/device/delete

before swaping the drive.

Offline

#8 2012-05-24 21:14:18

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Esata Hotplugging

Uh.

My detailed reply got lost in an unintended history-back-forward-session...

Anywho - thanks for the suggestion, don_crissti, but it didn't work sad

Any other ideas, or should I just go back to kernel 3.2.x?
I'm using the dock on top of my case quite a lot, for backups and for copying stuff to a drive which I connecct to my tv. I can just use an USB enclosure, that works fine, but it's very convenient to just plug a drive into the top of my computer!

Offline

#9 2012-05-25 10:42:57

don_crissti
Member
Registered: 2009-03-17
Posts: 35

Re: Esata Hotplugging

Wait for 3.4 to hit stable or try it from testing:

https://bugs.archlinux.org/task/29612

Offline

#10 2012-05-26 20:20:34

SaVVa
Member
Registered: 2010-03-18
Posts: 6

Re: Esata Hotplugging

install "scsiadd" (from AUR)
# scsiadd -s
then:
# scsiadd {-a|-r} <host> <channel> <id> <lun> (see output of previous command)
or man scsiadd

you may also use this bash script

Offline

#11 2012-05-28 22:05:55

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Esata Hotplugging

Thanks a lot! I tried "scsiadd" first, but that didn't work for me - it only saw the other drives, not the hotplugged one..

But then I installed 3.4 from testing, and now it's working perfectly again!

Offline

#12 2012-05-31 02:09:55

SaVVa
Member
Registered: 2010-03-18
Posts: 6

Re: Esata Hotplugging

abstrakct wrote:

Thanks a lot! I tried "scsiadd" first, but that didn't work for me - it only saw the other drives, not the hotplugged one..

Sorry to did not clarify - supposing that is clear - for future using  of hot-plugging by <# scsiadd -a > you need to reboot your computer, external device of course had to be connected before, in order to see attributes of newly detected (now!) device (using scsiadd -s ), i.e. <host> <channel> <id> <lun>, and already then you may use (for example): # scsiadd -a 0 0 1 0 (mount) or # scsiadd -r 0 0 1 0 (umount)

Last edited by SaVVa (2012-05-31 02:14:29)

Offline

#13 2012-05-31 02:21:32

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: Esata Hotplugging

don_crissti wrote:

Wait for 3.4 to hit stable or try it from testing:

https://bugs.archlinux.org/task/29612


If you use NFS you probably want to wait for kernel 3.4 to be officially released.  It has issues with NFS: Right Now which I'm certain is the reason it is so delayed at this point.

Offline

#14 2012-05-31 16:31:24

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Esata Hotplugging

If you don't mind sticking with the LTS kernel, that works fine as well - I've needed eS-ATA recently, and NFS is used on a daily basis here. Server runs the LTS kernel.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#15 2012-06-15 18:52:51

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Esata Hotplugging

Anybody tried with 3.4 yet?

Edit: nm, forgot abstrackt had success with 3.4 when it was in [testing].

Last edited by alphaniner (2012-06-15 18:55:06)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#16 2012-09-11 05:16:23

linutic
Member
Registered: 2012-09-11
Posts: 1

Re: Esata Hotplugging

Sorry I am late to the party, but I had this same problem today on ubuntu 12.04.   I checked several forums, but they were no help.

Anyway I have two possible work-arounds for you.   On ubuntu 12.04 or earlier check out the man page for rescan-scsi-bus:
      http://manpages.ubuntu.com/manpages/pre … bus.8.html

The following got me going:
      # apt-get install scsitools
      # rescan-scsi-bus

On other Linux systems there is apparently a program called scsiadd, which can manually add scsi devices.   I didn't find a package for ubuntu 12.04, but you may know how to find it yourself.

Good luck.

Offline

Board footer

Powered by FluxBB