Hot Swap Ultrabay Devices?

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
systemparadox
Posts: 24
Joined: Mon Feb 14, 2005 6:40 am
Location: Tavistock, Devon, England
Contact:

Hot Swap Ultrabay Devices?

#1 Post by systemparadox » Tue Apr 05, 2005 2:54 pm

Hi all.
Does anyone know if hot swapping ultrabay devices is possible with Linux (I'm thinking of T23 mostly, but other info might be useful)?

Also, I know it should be possible to warm (suspend first) swap (I haven't tried it yet), is there anything you have to do before or afterwards? Is there any restriction on which devices you can swap between (on the thinkpad 600 you could only put the floppy in if it had booted up with it in or attached externally)?

Thanks
Simon
IBM Thinkpad T23 (2647-3QG): 1GHz, 512Mb RAM, 80Gb HDD, RTL8180 Cardbus WiFi.
Boots Win98SE, WinXP Pro, Slackware Linux 9.1 (kernel 2.6.8.1) and Linux From Scratch 6.0 (kernel 2.6.8.1).
Much experience with:
600, 760EL, 390X, 560, T20 and T23.

xtypestereotype
Freshman Member
Posts: 83
Joined: Sat May 15, 2004 10:17 am
Location: Melbourne, Australia

Hotswapping

#2 Post by xtypestereotype » Sat Apr 16, 2005 5:09 am

I've read somewhere in the hdparm docs that the source of hdparm contains a patch for the kernel to enable hotswapping on Thinkpad 600's Ultrabay... Hope this helps :)

CURRENT: X60s
PREVIOUSLY: 240 390E 560 560X 570 600 i1400 A21m A22m T21 T22 T23 T40 X20
BEST: 570 T40 X60s
WORST: 600 i1400 A2x

systemparadox
Posts: 24
Joined: Mon Feb 14, 2005 6:40 am
Location: Tavistock, Devon, England
Contact:

Re: Hotswapping

#3 Post by systemparadox » Wed Nov 23, 2005 1:30 pm

xtypestereotype wrote:I've read somewhere in the hdparm docs that the source of hdparm contains a patch for the kernel to enable hotswapping on Thinkpad 600's Ultrabay... Hope this helps :)
I found the hdparm doc you are reffering too. IBM-ACPI (http://ibm-acpi.sourceforge.net/)(Part of kernel as of 2.6.10) implements an 'eject' function which I think calls hdparm to do the same thing, as well as some ACPI stuff which helps the whole process.

However...
1. This only works for IDE devices. Any other devices show up as 'empty' in /proc/acpi/ibm/bay. This is fine for batteries, but what about the floppy? It seems that it's ok to just rip it out, so long as it's not mounted or in use. That might make sense- the floppy drive is always registered as present in the BIOS and in Win98. But something which will do the relevant ACPI stuff would be nice (the bay light flashes to tell me I shouldn't really be doing it).
2. My DVD/CD-RW drive is unable to read discs if inserted while the system is on. I have to reboot. Why? What's going on? Where can I find more info? How do I fix it?
3. Anything not registered to the IDE driver is not detected and appears as empty (like point 1 above). The big problem here: SCSI emulation for CD-burning. I know the latest cdrtools don't need this but I'm yet to find out how to install them.


The main problem I need fixing is number 2.

Could anyone who has ultrabay hotswapping working (by any method)(just being able to eject and insert an optical drive is enough- you don't need another device) in Linux on their 600X, T20, T21, T22, T23, T30, T4x, or X, R, A, G or Z series ThinkPad please post here!


Any help, advice, suggestions, info, pointers, hints or whatever would be greatly appreciated.
Thanks in advance
Simon
IBM Thinkpad T23 (2647-3QG): 1GHz, 512Mb RAM, 80Gb HDD, RTL8180 Cardbus WiFi.
Boots Win98SE, WinXP Pro, Slackware Linux 9.1 (kernel 2.6.8.1) and Linux From Scratch 6.0 (kernel 2.6.8.1).
Much experience with:
600, 760EL, 390X, 560, T20 and T23.

systemparadox
Posts: 24
Joined: Mon Feb 14, 2005 6:40 am
Location: Tavistock, Devon, England
Contact:

#4 Post by systemparadox » Mon Dec 19, 2005 10:47 am

It works!!!
The eject fuction from ibm_acpi doesn't seem to unregister the devices properly.
Using debian's "hotswap" package (I compiled from source and am using it on Slackware/LFS without difficulty) it all works fine.

I've added more info at the bottom of this page:
http://www.thinkwiki.org/wiki/UltraBay

Simon
IBM Thinkpad T23 (2647-3QG): 1GHz, 512Mb RAM, 80Gb HDD, RTL8180 Cardbus WiFi.
Boots Win98SE, WinXP Pro, Slackware Linux 9.1 (kernel 2.6.8.1) and Linux From Scratch 6.0 (kernel 2.6.8.1).
Much experience with:
600, 760EL, 390X, 560, T20 and T23.

kaiser
Freshman Member
Posts: 68
Joined: Sat Jul 09, 2005 2:59 am

#5 Post by kaiser » Tue Dec 20, 2005 3:10 am

there was something in IBM-ACPIs ReadMe.
the eject command just disconnects the ultrabay, it doesn't tell the system to disable the drive. So I think for the IDE drivers it is a situation as if you rip off the drive, therefore the ReadMe says you have to use idectl to safely shutdown the drive before ejecting it.
now mine: T42 2373-VMH - 1.5 GB RAM, 60 GB HDD, BT, WLAN, SXGA, 9cell
--
url=www.thinkwiki.org

systemparadox
Posts: 24
Joined: Mon Feb 14, 2005 6:40 am
Location: Tavistock, Devon, England
Contact:

#6 Post by systemparadox » Wed Dec 21, 2005 8:27 am

kaiser wrote:there was something in IBM-ACPIs ReadMe.
the eject command just disconnects the ultrabay, it doesn't tell the system to disable the drive. So I think for the IDE drivers it is a situation as if you rip off the drive, therefore the ReadMe says you have to use idectl to safely shutdown the drive before ejecting it.
That's worth knowing. Thanks.
I'll probably just tell hotswap to issue the eject command after it's shutdown the device.
Now why didn't I think of that?

Simon
IBM Thinkpad T23 (2647-3QG): 1GHz, 512Mb RAM, 80Gb HDD, RTL8180 Cardbus WiFi.
Boots Win98SE, WinXP Pro, Slackware Linux 9.1 (kernel 2.6.8.1) and Linux From Scratch 6.0 (kernel 2.6.8.1).
Much experience with:
600, 760EL, 390X, 560, T20 and T23.

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 2 guests