LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Detecting new Disk with Red Hat without reboot... (https://www.linuxquestions.org/questions/linux-general-1/detecting-new-disk-with-red-hat-without-reboot-461771/)

Lenux78 07-07-2006 07:17 AM

Detecting new Disk with Red Hat without reboot...
 
Hi...

I have a little question... I have RedHat Advance Server 3 Update 3 with kernel 2.4.21-40.ELsmp installed on a HP Lxr8500 Server...

This server is connected to a Disk Array VA 7400 through FiberChannel and with this disk Array a can create LUNs dinamically. When I reboot the server the Operating System shows me the device file of this disk: For example: /dev/sda, /dev/sdb, .....

how can i detect those disks without rebooting the server????

Is there an utility that detect and make the device files on the fly??

Please Help me...

Lenux78 07-07-2006 11:09 AM

Hello everyone!!!.. I just discovered and I'm going to share with you to your knowledge....

My fiberchannel target is on the scsi2... so the first thing i did was see /proc/scsi/scsi this is the output...

Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: A6189A Rev: HP19
Type: Direct-Access ANSI SCSI revision: 03

Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: MegaRAID Model: LD0 RAID1 34731R Rev: H
Type: Direct-Access ANSI SCSI revision: 02


- As you see I have one Lun created and is 10GB of size.. So I create a new Luns of 2GB in the VirtualArray...

- After create the Lun.. I run this command:

echo "scsi remove-single-device 2 0 0 1" > /proc/scsi/scsi

This instruction tells the Operationg System to add an SCSI dinamically but instead of adding an Scsi drive i add a LUN... only what i need is Controller (2), Host ID (0), SCSI ID (0) and LUN ID (1)..

The Lun ID is 1 because is the new Lun that I'm going to add...

- I run dmesg to see the results. This is the output:

scsi singledevice 2 0 0 1
blk: queue f4220818, I/O limit 4294967295Mb (mask 0xffffffffffffffff)
Vendor: HP Model: A6189A Rev: HP19
Type: Direct-Access ANSI SCSI revision: 03
blk: queue f47dd018, I/O limit 4294967295Mb (mask 0xffffffffffffffff)
Attached scsi disk sdd at scsi2, channel 0, id 0, lun 1
SCSI device sdd: 4194304 512-byte hdwr sectors (2147 MB)
sdd: unknown partition table

As you see the new device file is /dev/sdd, As you observe is a 2GB disk.. and run cat/proc/scsi/scsi and see it

Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: A6189A Rev: HP19
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi2 Channel: 00 Id: 00 Lun: 01
Vendor: HP Model: A6189A Rev: HP19
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: MegaRAID Model: LD0 RAID1 34731R Rev: H
Type: Direct-Access ANSI SCSI revision: 02


- And to finish you can do anything with that disk... and create Many disks without rebooting..

Greetings...

Lenux78
__________________

XavierP 07-08-2006 05:44 PM

Thanks for posting the answer. I am closing this as it's the same as http://www.linuxquestions.org/questi...d.php?t=461814 which is more appropriately placed.


All times are GMT -5. The time now is 06:16 PM.