Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2011 09:29:52 +0100
From:      "Patrick M. Hausen" <hausen@punkt.de>
To:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Hot-changing a failed HDD with ahci.ko
Message-ID:  <B0A139EC-F6A3-48DA-A347-21A5ED0507BF@punkt.de>

next in thread | raw e-mail | index | archive | help
Hi, all,

while most cheap servers with SATA disks are not really hot-plug
capable, changing a failed disk (either gmirror or zfs) was possible
without a reboot by executing e.g. if ad4 failed:

atacontrol detach ata2
<change disks>
atacontrol attach ata2

What is the proper equivalent for ahci, ada0 and camcontrol?
Stop unit commands seem not to work with SATA disks, so I
tried:

<forcefully unplug "broken" disk>
-> system logs about lost device, so far so good
<insert new disk>
camcontrol reset 1
camcontrol devlist
-> disk still not there
camcontrol rescan 1
-> command hangs
<login to a second session, system still responsive>
shutdown -r now
-> system panics, eventually reboots

I can provide details about the panic if someone is interested,
but maybe there is a proper procedure already, which I simply missed.

System is RELENG_8_2 amd64.
ahci0: <Intel Cougar Point AHCI SATA controller> port =
0xf090-0xf097,0xf080-0xf083,0xf070-0xf077,0xf060-0xf063,0xf020-0xf03f =
mem 0xfb921000-0xfb9217ff irq 19 at device 31.2 on pci0
ada0 at ahcich0 bus 0 scbus1 target 0 lun 0
ada0: <ST31000340NS SN05> ATA-8 SATA 1.x device
ada0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada1 at ahcich1 bus 0 scbus2 target 0 lun 0
ada1: <ST31000340NS SN05> ATA-8 SATA 1.x device
ada1: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)

Thanks,
Patrick
--=20
punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
Tel. 0721 9109 0 * Fax 0721 9109 100
info@punkt.de       http://www.punkt.de
Gf: J=FCrgen Egeling      AG Mannheim 108285






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B0A139EC-F6A3-48DA-A347-21A5ED0507BF>