How to detect a new disk with red hat advace server 3??
Hi everybody
I installed RedHat Advance Server 3 Update 3 with kernel 2.4.21-40.ELsmp installed on a HP Lxr8500 Server... Additionally a connect to it a Disk Array VA 7400 through FiberChannel and i can create LUNs dinamically. When I reboot the server Linux shows me the device file of this new disk: For example: /dev/sda, /dev/sdb, ..... but i need to reboot... and what happened if i want to create 60 LUNs??? so this is the question: how can i detect those disks (Luns) without rebooting the server???? Is there an utility that detect and make the device files on the fly in Redhat ?? or i need to install an special free software for this??? Please Help me... |
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 |
sorry.. instead of echo "scsi remove-single-device 2 0 0 1" > /proc/scsi/scsi is
echo "scsi add-single-device 2 0 0 1" > /proc/scsi/scsi |
Typically we run this command:
echo "scsi scan-new-devices" > /proc/scsi/scsi |
Hi tells!!! thanks for the suggestions... I tried to do it but for some reasons that I don't know i didn't work.. it doesn't insert any new device...
In fact, i was searching about echo "scan-new-devices" and found this link http://kbase.redhat.com/faq/FAQ_46_4011.shtm. why do you think is that??? Greetings.... Lenux78 |
You should download scsiadd and scsidev. Both those are great programs for recognizing and display information (ie. serial numbers, etc) of LUNS.
-twantrd |
Hi twantrd!!!..
I download scsidev and probe it.. but when i do an scsidev -v to see want he brings.. it throws the following message #scsidev -v scsidev 2.36 2005-08-16 /proc/scsi/scsi extensions not found. Fall back to scanning. Building list for sg (char dev major 015) Found /dev/scsi/sgh0-20c0i0l0 (Type 00) on LSI Logic MegaRAID H01.08 254 commands 15 targs 4 chans 7 luns Findscsidisk: 0 INQUIRY failed for /dev/scsi/sdh0-20c0i0l0 (0-0/008:00000)! scsidev: Strange: Could not get info from sdh0-20c0i0l0 Found /dev/scsi/sgh3-0c0i0l0 (Type 00) on Emulex LightPulse LP8000 1 Gigabit PCI Fibre Channel Adapter on PCI bus 01 device 20 irq 50 Findscsidisk: 1 INQUIRY failed for /dev/scsi/sdh3-0c0i0l0 (0-0/008:00010)! scsidev: Strange: Could not get info from sdh3-0c0i0l0 scsidev: What's going on? Dev sdh3-0c0i0l0 is different from sgh3-0c0i0l0 that sounds like the command cannot get the dev type, and when i do: ll /dev/scsi/* this is the output: brw-rw---- 1 root disk 8, 0 Jul 21 09:16 /dev/scsi/sdh0-20c0i0l0 brw-rw---- 1 root disk 8, 1 Jul 21 09:16 /dev/scsi/sdh0-20c0i0l0p1 brw-rw---- 1 root disk 8, 2 Jul 21 09:16 /dev/scsi/sdh0-20c0i0l0p2 crw-rw---- 1 root disk 21, 0 Jul 21 09:16 /dev/scsi/sgh0-20c0i0l0 crw-rw---- 1 root disk 21, 1 Jul 21 08:19 /dev/scsi/sgh3-0c0i0l0 As you see my operating system is in /dev/scsi/sdh0-20c0i0l0 that's ok... but my Lun is on /dev/scsi/sgh3-0c0i0l0 but doesn't create the block device and i can't use it... maybe you can help me to use this tool... because i didn't use it before but it seems that i could use it and resolve many problems... Greetings.. Lenux |
Try using scsidev -s. It will try to print information of the LUNS if available.
Quote:
-twantrd |
The first option below worked for me
From the release notes: @redhat.com /docs/manuals/enterprise/RHEL-4-Manual/release-notes/as-s390/RELEASE-NOTES-U3-s390-en.html Support for fabric rediscovery through sysfs is now available in Red Hat Enterprise Linux 4 Update 3. For the Qlogic (qla2xxx) and Emulex (lpfc) Fibre Channel HBA drivers, run the following commands to perform redisocvery and rescan for new storage: echo "1" > /sys/class/fc_host/host2/issue_lip echo "- - -" > /sys/class/scsi_host/host2/scan Where XYZ is the scsi host number of your HBA. # In some Fibre Channel configurations, an operating system will automatically detect the addition of a new target device while the system is running. In other configurations, it is necessary to issue the following command to detect a new target device: echo 1 > /sys/class/fc_host/hostn/issue_lip Where hostn corresponds to the appropriate adapter. When a new Logical Unit is created on a particular target, a command such as the following is required to detect and configure it: echo "b t l" > /sys/class/scsi_host/hostn/scan Where b is the bus, t is the target, and l is the LUN to be scanned on hostn. Wild cards can also be used, such as the following example: echo "- - -" > /sys/class/scsi_host/host2/scan Note that the device name (such as /dev/sdb) that is assigned when a device is added dynamically while the system is running may be different from the device name assigned the next time the system boots. |
hi,
why i submit comand: echo "scsi scan-new-devices" > /proc/scsi/scsi, raised error "bash: echo: write error: Invalid argument" Have other the way is possible about problem? Thanks. |
well, as far as I have read, that means you do not have that value in /proc/scsi/scsi, so that value is invalid.
Interesting links: http://bugzilla.kernel.org/show_bug.cgi?id=9685 and http://groups.google.com/group/linux...6c778bc8fab03b Have you tried scsiadd and scsidev as suggested earlier? And do you use RHEL AS 3 or some other version? |
|
All times are GMT -5. The time now is 12:23 AM. |