Hot swap of bay devices

Jesse Guardiani jesse at wingnet.net
Tue Aug 12 08:21:02 PDT 2003


Sean Welch wrote:

> I read your account of successfully swapping devices
> in an HP notebook and just had to give it a try on
> my Dell Inspiron 8000.  Unfortunately it didn't work
> so well.
> 
> Would you be so kind as to list out the exact steps you
> use?
> 
> Here is what I did (I normally use a second battery in
> the bay) under 4.8-RELEASE:
> 
>  1) Remove battery.
>  2) Plug in Sony CDRW unit
>  3) Run atacontrol info 1 and see CDRW unit
>  4) Run atacontrol mode 1 and see mode ???
>  5) Run atacontrol mode 1 WDMA2 0 and get hung xterm
>  6) Run atacontrol mode 1 and still see mode ???
>  7) Run atacontrol reinit 1 and get hung xterm
>  8) Run atacontrol mode 1 and still see mode ???
>  9) Run atacontrol detach 1 and get hung xterm
> 10) Run atacontrol info 1 and still see CDRW unit
> 11) Run atacontrol detach 1 and get hung xterm
> 12) Remove CDRW unit and replace battery
> 13) Run atacontrol list and still see CDRW listed
> 14) Check ps -ax | grep ata and see:
> 
>     17284  p2- D      0:17.51 atacontrol mode 1 WDMA2 0
>     16578  p5- D      0:17.77 atacontrol reinit 1
>     17068  p5- D      0:18.15 atacontrol detach 1
>     18837  p5- D      0:16.95 atacontrol detach 1

To remove and reattach my DVD-ROM on my IBM A30p, all I do is this:

1.) atacontrol info (to see channel)
2.) atacontrol detach 1 (to detach everything on channel 1)
3.) remove drive
4.) replace drive
5.) atacontrol attach 1 (to attach everythin on channel 1)

Done.

I've never tried to attach a different device before, but this
works great for the device I have.

NOTE: Make sure the drive isn't being used before you try to
      detach it. For example, my drive is /dev/acd0. I run:

fstat /dev/acd0

Then kill any programs that are using that device before detaching.

-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net




More information about the freebsd-mobile mailing list