Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 12-14-2004, 06:57 AM   #1
LQ Newbie
Registered: Dec 2004
Location: Sydney
Distribution: Mandrake and RedHat
Posts: 2

Rep: Reputation: 0
Adding drives to Linux without reboot

More used to Solaris, but was wondering if you could add a disk "on the fly".

Say you start up your Linux box (with a connection to a SAN through a HBA).
Now you add more LUNs to the machine (you zone / LUN Mask) .

The next step is to get Linux to see the new disk (without rebooting)

In Solaris, I would have done a "devfsadm" . What do I do in Linux ?

Is it at all possible ? or not with the current /dev structure being build when the machine boots ?

Old 12-14-2004, 11:05 PM   #2
Registered: Feb 2004
Posts: 140

Rep: Reputation: 15
For one, /dev/ is not fixed, and most systems do not build dev at boot, as drivers are loaded they attach to devices nodes but this can happen at any time. Some newer distros use udev but this only extends the existing model. In Linux like solaris /dev/ exposes kernel services / resources as
FIFO's, block, or char devices. These special files may or may not have anything on the other side (Kernel Side). If the HBA is working correctly when you add the new device you can check if the lowlevel driver reported that addition of the device by running dmesg.
If all goes well you can access the device at the appropriate dev node /dev/sd? if there are not enough /dev/sd devices you can use mknod to make a new one.
Old 12-17-2004, 05:24 AM   #3
LQ Newbie
Registered: Dec 2004
Location: Sydney
Distribution: Mandrake and RedHat
Posts: 2

Original Poster
Rep: Reputation: 0

Now the big question.

A node (let's say /dev/sde) gets created when the machine starts up.

Now, something happens to the path that the disk (/dev/sde) points at (loss of switch). This path comes stale.

When you try and get anything on this device (fdisk, sfdisk, dd, ........), nothing works (does not want to read geometry, etc. ....).

You now know there is a fault on the path to the disk. You fix the switch, and now your path should come back (???). Guess what. It does not !!!!

You can use the HBA utilities to make sure the disk is there (yep, reads the WWNN), but as soon as you go to access the disk via the path (/dev/sde), you still have the same issues (as if the disk is not connected).

On Solaris, I would have doine "devfsadm" and the Solaris kernel will update the device tree to reflect the device as being available again.

What do I do in Linux ?

How can I get this disk back (without rebooting) ?

If I unload the SCSI driver, I might as well reboot the macihne. Should i remake the node ?



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
Adding new Disk attached from SAN with out reboot.? dcj1mmy Linux - Enterprise 4 10-28-2005 05:42 PM
Adding additional drives/resizing drives in RAID arrays kheldar Linux - Hardware 1 10-19-2005 02:21 PM
adding drives to fstab kurrupt Debian 1 08-09-2004 01:17 AM
Adding Hard drives from former XP o/s theonlylivinggo Linux - Hardware 8 02-09-2004 10:29 PM
redhat won't reboot also doesn't unmount drives Smerk Linux - Distributions 3 03-24-2003 01:21 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:34 AM.

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