sata hotswap on Intel ICH7
Jeremy Chadwick
koitsu at FreeBSD.org
Mon Oct 20 17:25:17 UTC 2008
On Mon, Oct 20, 2008 at 10:18:50AM -0700, Steve Franks wrote:
> Just curious if this works, what I need to do, etc, good/bad
> experiences... Since I'm actually talking about internal drives, does
> cabling matter, is the power supposed to mate before/after data, etc?
Hot-swapping on SATA requires an actual hot-swap-capable SATA backplane.
You *cannot* just "yank a disk out of a PC" by removing the SATA data
or power cable.
It also requires that you be using SATA in "Enhanced" mode, or under
AHCI. Using SATA in "Emulation" or "Compatible" mode (e.g. a 2-channel
SATA controller will assign disks as ata0-master and ata0-slave) will
not work how you expect. AHCI is preferred, if available.
Assuming you meet these criteria, all you need to do on FreeBSD is:
- Unmount any filesystems using the disk (you may need to shut down
or kill off processes using files on those filesystems before you
can unmount). If you forget to do this, you will panic the box.
- atacontrol list, and determine what channel to detach (E.g. ata0)
- atacontrol detach <channel>
- Kernel should show the disk disappearing.
- Remove disk from machine, replace with new disk.
- Wait for disk to spin up (sometimes the drive LEDs will be lit; wait
for them to turn off)
- atacontrol attach <channel>
And that's all.
Note that there are known problems with this when using BIOS-level RAID
methods such as Intel MatrixRAID, so please do not use those.
> Doesn't seem to be much on the subject in the handbook or man
> atacontrol.
You can file a PR to get this added, if you'd like. :-)
> I assume we've had scsi hotswapping for quite some time, right?
Correct, but it requires similar hardware as above. SCA drives, for
example, are hot-swappable, while yanking a drive off a LVD cable
will probably not do what you expect.
camcontrol(8) is the utility you want to use for all that.
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
More information about the freebsd-hardware
mailing list