LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   SCSI Hotplug in Fedora Core 4 (https://www.linuxquestions.org/questions/linux-hardware-18/scsi-hotplug-in-fedora-core-4-a-483519/)

missfire4u 09-14-2006 02:36 PM

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).

Thanks,

Ethanz

Lenard 09-14-2006 02:45 PM

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

missfire4u 09-14-2006 03:02 PM

Thanks... but
 
Thanks for your reply.
I still have one question...
where would a scsi tape drive show up in /dev ?

Samoth 09-14-2006 03:11 PM

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


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