Knowledgebase: Linux
Mouting SCSI Devices without rebooting the host
Posted by Gurpreet Singh on 16 August 2011 04:26 AM

Problem

How to mount SCSI devices without rebooting the machine.

Solution

WORKAROUND.

Working with (SCSI) devices;

/proc/scsi

/proc/scsi/scsi

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

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).