Hot Plug SATA HDD

Hello,
My new case (Raidmax Scropio V) has an “external” SATA connection. It’s not an e-SATA. It’s a normal SATA that takes power from the PSU and is connected to a normal SATA connector on the M/B.
So, I connected my old HDD on it.
System was notified about it:


 3452.360729] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
 3452.362549] ata6.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
 3452.362552] ata6.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
 3452.362554] ata6.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
 3452.366138] ata6.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
 3452.366140] ata6.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
 3452.366142] ata6.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
 3452.367166] ata6.00: configured for UDMA/100
 3452.367567] ata6: EH complete

But I cannot see it, since fdisk -l displays only the SSD and the internal HDD.


Disk /dev/sda: 64.0 GB, 64023257088 bytes, 125045424 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
Disk label type: dos
Disk identifier: 0x0006b7f8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1028095      513024   83  Linux
/dev/sda2         1028096    17799167     8385536   82  Linux swap / Solaris
/dev/sda3        17799168   125044735    53622784   8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes, 976773168 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
Disk label type: dos
Disk identifier: 0x000e382f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   976773119   488385536   8e  Linux LVM

Disk /dev/mapper/DskSysVG-LVRoot: 54.9 GB, 54899245056 bytes, 107225088 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


Disk /dev/mapper/DskHomeVG-LVHome: 500.1 GB, 500099448832 bytes, 976756736 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


I don’t want to auto-mount the external HDD. I just want to have it recognized in order to manually mount it. Is it possible?

On 2014-07-17 13:46 (GMT) tpe composed:

> My new case (Raidmax Scropio V) has an “external” SATA connection. It’s
> not an e-SATA. It’s a normal SATA that takes power from the PSU and is
> connected to a normal SATA connector on the M/B.
> So, I connected my old HDD on it.

> I don’t want to auto-mount the external HDD. I just want to have it
> recognized in order to manually mount it. Is it possible?

eSATA can be attached to a running system same as USB. SATA cannot. Every
SATA connected and powered at boot time should be recognized, but not if not
powered or not connected at boot time. If connected and powered at boot time
but still not recognized, check the specs on that particular “old” HDD, which
may have a compatibility problem with newer SATA controllers that can be
worked around using special instructions, possibly setup software or a jumper.

Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata *** http://fm.no-ip.com/

I don’t think so.
It seems that the difference is on the connector not the protocol:

http://en.wikipedia.org/wiki/Serial_ATA#eSATA

On 2014-07-17 15:59, Felix Miata wrote:

>> I don’t want to auto-mount the external HDD. I just want to have it
>> recognized in order to manually mount it. Is it possible?
>
> eSATA can be attached to a running system same as USB. SATA cannot.
> Every SATA connected and powered at boot time should be recognized, but
> not if not powered or not connected at boot time. If connected and
> powered at boot time but still not recognized, check the specs on that
> particular “old” HDD, which may have a compatibility problem with newer
> SATA controllers that can be worked around using special instructions,
> possibly setup software or a jumper.

Some work, some don’t.

Some of the SATA ports on my main computer work fine when a disk is
hoplugged, be it on an internal caddy, be it on an external SATA socket,
or be it external eSATA socket.

But the pair of connectors that the motherboard names as “raid”, and
which have a different chipset, absolutely refuse to hot detect disks.
They only work at boot.

Even if using the internal HD caddy, which is not eSATA, but plain SATA.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

On 2014-07-17 17:06, tpe wrote:
>
> I don’t think so.
> It seems that the difference is on the connector not the protocol:
>
> http://en.wikipedia.org/wiki/Serial_ATA#eSATA

That’s so, but some chipsets simply do not support hotplug, and thus are
invalid for eSATA.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I need to point that we do not talk about eSATA, but for normal SATA connectors.

So far I have found that the absolute requirement is to have ahci, and it is OK:


dmesg | grep -i ahci
    0.611061] ahci 0000:00:1f.2: version 3.0
    0.611146] ahci 0000:00:1f.2: irq 40 for MSI/MSI-X
    0.611191] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 4 ports 6 Gbps 0x33 impl SATA mode
    0.611193] ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part ems 
    0.611196] ahci 0000:00:1f.2: setting latency timer to 64
    0.616499] scsi0 : ahci
    0.616554] scsi1 : ahci
    0.616593] scsi2 : ahci
    0.616633] scsi3 : ahci
    0.616670] scsi4 : ahci
    0.616712] scsi5 : ahci

Also, the SATA ports are provided by the Intel H81 chipset (Intel’s site does not mention the support or not of hotplug).
On the other hand the fact is that kernel was informed about the new hardware. But something is not set and thus hot plug is not working. And what is really strange is that the rescan-scsi-bus.sh script did not find the HDD, while /var/log/messages said the opposite!

On 2014-07-17 21:06, tpe wrote:
>
> I need to point that we do not talk about eSATA, but for normal SATA
> connectors.

I know.

> Also, the SATA ports are provided by the Intel H81 chipset (Intel’s site
> does not mention the support or not of hotplug).
> On the other hand the fact is that kernel was informed about the new
> hardware. But something is not set and thus hot plug is not working.

Well, it happened to me. My board has several sata chips, and one works
with hotplug, the other does not - despite reporting something on
connection. And being one board, the configuration is the same, that is,
none.

I can not tell you right now what hardware it is, I’m not home.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

On 2014-07-17 19:18 (GMT+0200) Carlos E. R. composed:

> On 2014-07-17 17:06, tpe wrote:

>> I don’t think so.
>> It seems that the difference is on the connector not the protocol:

>> http://en.wikipedia.org/wiki/Serial_ATA#eSATA

> That’s so, but some chipsets simply do not support hotplug, and thus are
> invalid for eSATA.

I pretty sure the better description is that most chipsets for motherboard
SATA ports actually in use do not support hotplug. I have yet to encounter
even one among many Intel, and very few other. I’ve seen more than once the
kernel recognize a hot attach via motherboard port but no availability of the
attached eSATA device. The few motherboards I’ve ever encountered with eSATA
advertised and a physical eSATA port provided have had the eSATA support via
non-Intel chip independent of the chip supporting the SATA ports.

Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata *** http://fm.no-ip.com/

On 2014-07-18 02:08, Felix Miata wrote:
> On 2014-07-17 19:18 (GMT+0200) Carlos E. R. composed:
>
>> On 2014-07-17 17:06, tpe wrote:
>
>>> I don’t think so.
>>> It seems that the difference is on the connector not the protocol:
>
>>> http://en.wikipedia.org/wiki/Serial_ATA#eSATA
>
>> That’s so, but some chipsets simply do not support hotplug, and thus are
>> invalid for eSATA.
>
> I pretty sure the better description is that most chipsets for
> motherboard SATA ports actually in use do not support hotplug. I have
> yet to encounter even one among many Intel, and very few other. I’ve
> seen more than once the kernel recognize a hot attach via motherboard
> port but no availability of the attached eSATA device. The few
> motherboards I’ve ever encountered with eSATA advertised and a physical
> eSATA port provided have had the eSATA support via non-Intel chip
> independent of the chip supporting the SATA ports.

Maybe I have been lucky, it worked on most boards I handled :slight_smile:

I can not verify, but my desktop board has different chips, and it may
be well that the sata ports on the Intel chip do not hotplug, whereas
the other ports, on another chipset, work. I’ll verify the chipsets when
I get back home (jmicron?)Yes, my board specs mentions eSATA, and it has
two eSATA ports. But it also has 6 or 8 normal SATA ports that accept
hotplug nicely. It is just two ports, the two named “raid” that do not.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

On 2014-07-18 00:53 (GMT) Carlos E. R. composed:

> Maybe I have been lucky, it worked on most boards I handled :slight_smile:

> I can not verify, but my desktop board has different chips, and it may
> be well that the sata ports on the Intel chip do not hotplug, whereas
> the other ports, on another chipset, work. I’ll verify the chipsets when
> I get back home (jmicron?)Yes, my board specs mentions eSATA, and it has
> two eSATA ports. But it also has 6 or 8 normal SATA ports that accept
> hotplug nicely. It is just two ports, the two named “raid” that do not.

Yours is a minority configuration. The vast majority of PCs with any SATA
motherboard ports have no more than 4 motherboard SATA ports, and no more
than one SATA controller. A huge number of OEM configurations have 2 or fewer
SATA ports. It’s the minority class like yours with more than 4 ports that
are the domain of eSATA on the motherboard.

Of the 15 functional systems under this roof with any SATA ports, only 1 has
more than 4, and only 2 profess hotpluggability. Several here have only 1 or
2 ports, so even trying with those are either impossible or problematic. Of
those that do not with a free port, I have just minutes ago after a fresh
13.1 installation found that my newest, a “server” board with 4 ICH7R
(manufactured after Intel released ICH8, ICH9 and possibly ICH10 successors)
ports, will recognize a hotplugged HD connected via an eSATA to SATA socket
converter with fdisk, and mounting its ext2 partition succeeds. The rest
attempted produce kernel messages, but do not become accessible.

Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata *** http://fm.no-ip.com/

Grrrrr.

OK. Did you run the rescan-scsi-bus.sh script in either case?

On 2014-07-18 15:26, tpe wrote:
>
> Grrrrr.
>
> OK. Did you run the rescan-scsi-bus.sh script in either case?

I don’t remember… it was a year ago when I found out. I’m not at that
location now, so I can’t test, till a week or two.

Maybe I asked about the issue at the time, either here or on the mail list.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

A couple weeks ago,
I did some investigation on this prior to making a purchase.

Bottom line,
I looked for an external enclosure with an ATAPI bridge. These devices are not dependent on the capabilities of the SATA controller so has more reliable support for features like Hotplug/Hotswap. Typically both USB3.0 and eSATA3 connections are supported. If you use USB3.0, it has higher theoretical speed but requires USB<>SATA translation overhead which likely drops actual speed to around the same as eSATA3.0. BTW- I noticed in this thread a reference to “regular SATA.” AFAIK there is no diff between eSATA and SATA except for the mechanical plug connection and shielding. Although SATA (like USB) can be extended externally, it’s just better to use “external” connections… The hardware will last longer and if the connections are locking won’t come apart accidentally.

If you purchase external storage with multiple SATA bays, you may also want to consider getting an enclosure either with an embedded SATA controller or investigate whether your existing SATA enclosure supports port replication, this is essential for setting up hardware SATA RAID. As always, if you have any foresight always avoid software RAID in favor of hardware RAID. When you actually have a disk issue, you’ll be thankful for the decision.

If you just buy an el cheapo external enclosure, you’re likely purchasing an enclosure, possibly with an embedded hub. This type of enclosure has no “smarts” so is entirely dependent on the capabilities of the SATA controller on your motherboard so nothing is guaranteed… hotplug, RAID, anything.

HTH,
TSU

OK, finally, I found the “solution”.
The problem was wrong BIOS/UEFI settings. My motherboard supports hot-plug. But, the default option was “Disabled”, so, someone has to enable it per port.

After that, everything was OK.

After plugging your SATA drive, try to run this command:

rescan-scsi-bus.sh

It may “force” the system to recognize the drive without booting.

On 2014-08-26 18:16, tpe wrote:
>
> OK, finally, I found the “solution”.
> The problem was wrong BIOS/UEFI settings. My motherboard supports
> hot-plug. But, the default option was “Disabled”, so, someone has to
> enable it per_port.

Wow!!!


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)