# PC Case Hotplugging



## rusty (Dec 30, 2010)

I've just built a new pc using this case. On the top of the case is a dock with male power + SATA connectors for hotplugging a HDD.

I currently use 2x WD 250GB RE3's in a mirror setup (ada0 + ada1)


```
pool: tank
 state: ONLINE
 scrub: scrub in progress for 0h12m, 90.74% done, 0h1m to go
config:

        NAME             STATE     READ WRITE CKSUM
        tank             ONLINE       0     0     0
          mirror         ONLINE       0     0     0
            label/disk0  ONLINE       0     0     0
            label/disk1  ONLINE       0     0     0
```

If I try plugging an HDD in this dock with my system running it knocks ada0 offline, and appears to be syncing data to ada1 (well, the HDD light on the case is lit constantly in any case).

There aren't any problems if I attach all the drives prior to booting.

Is there anything I need to do especially for hotplugging?


----------



## mav@ (Dec 30, 2010)

Difficult to say what's going on there without seeing any logs and any information about controller/driver. Problem may be not software related. On some my tests I've seen cases when hot-plugging drive makes other drive on the same power cable to be dropped and reprobed back, probably due to powers pike.


----------



## rusty (Dec 30, 2010)

After my post I tried moving the SATA cable to a different header on the motherboard, when the external drive was plugged in the dock it was ada1 that went offline instead. Also the power to the hotplug connection is also from the cable that feeds the mirrored drives.
I'll play around a bit more.

It's not truly a big deal if I can't connect it this way as I can get an external eSATA enclosure and only use the dock if I need to boot an alternative OS or whatever.


----------



## rusty (Dec 30, 2010)

Switching to a different power lead unfortunately results in the same action to the 640GB drive on that lead.
Plugging in the drive,


```
(ada2:ahcich3:0:0:0): lost device
ada3 at ahcich3 bus 0 scbus3 target 0 lun 0
ada3: <WDC WD6401AALS-00L3B2 01.03B01> ATA-8 SATA 2.x device
ada3: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada3: Command Queueing enabled
ada3: 610479MB (1250261615 512 byte sectors: 16H 63S/T 16383C)
```

Unplugging it,


```
(ada3:ahcich2:0:0:0): lost device
(ada3:ahcich2:0:0:0): remving device entry
```

Neither ada2 or ada3 exist in /dev/ at this point.
The HDD LED comes on after the drive is plugged in, and remains on after it is unplugged.

Attempting to reboot,

```
some processes would not die
ps axl advised
```

At which the system freezes and I have to hit the reboot button.


----------

