Latest LQ Deal: Latest LQ Deals
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 09-14-2006, 03:36 PM   #1
LQ Newbie
Registered: Sep 2006
Posts: 3

Rep: Reputation: 0
SCSI Hotplug in Fedora Core 4

I have a few scsi hard drives and a scsi tape drive hooked up to my server, and I only need the hard drives and tape drives on when I do a backup. I was wondering if I could hotplug these scsi devices, instead of rebooting the server (which puts my website down for a while).


Old 09-14-2006, 03:45 PM   #2
Senior Member
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Yep, gleamed this a few years ago from one of the IBM Linux sites (forget the link);

Working with USB(SCSI) devices;

One of the most useful things to learn as a system administrator is how to add more disk space if you have hot-swap drives available to you, without rebooting the system. Without using /proc, you could insert your drive, but you would then have to reboot in order to get the system to recognize the new disk. Here, you can get the system to recognize the new drive with the following command:

echo "scsi add-single-device w x y z" > /proc/scsi/scsi

For this command to work properly, you must get the parameter values w, x, y, and z correct, as follows:

* w is the host adapter ID, where the first adapter is zero (0)
* x is the SCSI channel on the host adaptor, where the first channel is zero (0)
* y is the SCSI ID of the device
* z is the LUN number, where the first LUN is zero (0)

Once your disk has been added to the system, you can mount any previously formatted filesystems or you can start formatting it, and so on. If you are not sure about what device the disk will be, or you want to check any pre-existing partitions, for example, you can use a command such as fdisk -l, which will report this information back to you.

Conversely, the command to remove a device from your system without a reboot would be:

echo "scsi remove-single-device w x y z" > /proc/scsi/scsi
Old 09-14-2006, 04:02 PM   #3
LQ Newbie
Registered: Sep 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks... but

Thanks for your reply.
I still have one question...
where would a scsi tape drive show up in /dev ?
Old 09-14-2006, 04:11 PM   #4
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
/dev/sdx, depending on how the devices appear. "dmesg" ought to tell you what device file tape drive got.


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
Fedora Core 3 And Scsi Troubles gunslinger77 Linux - Software 1 02-16-2005 12:17 PM
Help installing Fedora Core 3 on scsi jobless_joe Linux - General 3 11-11-2004 03:08 PM
Disable hotplug or USB device in Fedora Core 2 crashdum Fedora 1 09-03-2004 09:01 AM
Hotplug SCSI scanner or How to write to /proc/scsi/scsi from within a shell script. samac Linux - Hardware 1 08-30-2004 03:28 PM
Fedora Core 2 - LSI SCSI Jonasx Fedora 1 08-15-2004 06:14 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:21 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