LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-16-2004, 05:50 PM   #1
mrgordonz
LQ Newbie
 
Registered: Jul 2004
Location: Brisbane, Australia
Distribution: CentOS
Posts: 10

Rep: Reputation: 0
Detect a hot swapped device without reboot.


Hi all,

I am a complete Linux Newbie, so please forgive me if this is a dumb question.

(This is is a re-post cos I didn't get any answers in the Linux Hardware forum - sorry).

I have a Dell Latitude D600 notebook, with Fedora Core 2 installed. It comes with a CD-RW/DVD+RW drive that can be ejected and replaced with a modular bay containing a second hard disk. I have no problems using either device, as long as I boot with the desired device already in the bay - eg: if I want to burn a CD/DVD, it works fine if I boot with the CD/DVD drive in the bay; similarly, I can mount the second hard disk fine if I boot with it in the bay.

But, I can't work out how to hot swap them, and get Linux to detect the swap without rebooting.

Just now I have booted with the CD/DVD drive in the bay. I now need to access files on the second hard disk, so I have ejected the CD/DVD drive and inserted the 2nd HDD.

When I execute fdisk -l, I get the following:

Quote:
[root@phobbs root]# fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 15 120456 83 Linux
/dev/hda2 16 4477 35841015 83 Linux
/dev/hda3 4478 7041 20595330 83 Linux
/dev/hda4 7042 7296 2048287+ f W95 Ext'd (LBA)
/dev/hda5 7042 7296 2048256 82 Linux swap

It doesn't detect the other drive. If I boot with the second hard disk already in the bay, I get the following from executing fdisk -l:

Quote:
[root@phobbs root]# fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 15 120456 83 Linux
/dev/hda2 16 4477 35841015 83 Linux
/dev/hda3 4478 7041 20595330 83 Linux
/dev/hda4 7042 7296 2048287+ f W95 Ext'd (LBA)
/dev/hda5 7042 7296 2048256 82 Linux swap

Disk /dev/hdc: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 7296 58605088+ c W95 FAT32 (LBA)

As you can see it has nicely detected the second disk (/dev/hdc).

After all that preamble, here come the questions:

1. How do I make Linux detect that the device has been swapped? This applies to either device being removed/inserted.

2. Also, is there some command I should execute before ejecting one of the devices?

Thanks,

Paul Hobbs
 
Old 08-16-2004, 07:52 PM   #2
gunter
Member
 
Registered: Jan 2003
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
I can't tell you exactly what you need to do, but here is a link to someone who as a dell laptop and they appear to have found a way to make this work. Hope it helps!

http://ltswww.epfl.ch/~dsanta/resour...ll-i8500-linux

Scroll to the bottom.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mandrake can't detect my wireless device joshknape Linux - Wireless Networking 9 09-07-2005 10:08 AM
SuSE 9.3 can't detect my wireless device jason.rohde Linux - Wireless Networking 1 08-30-2005 03:22 PM
suse 9.2 cant detect cd-rw device alaios Suse/Novell 1 07-15-2005 01:03 AM
How to detect hot swapped hard disk (in a modular bay). mrgordonz Linux - Hardware 0 08-15-2004 09:18 PM
Gnomemeeting Does Not Detect Video Device ROORTOKES Linux - Software 2 08-07-2003 01:24 AM


All times are GMT -5. The time now is 01:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration