LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 07-07-2006, 10:10 AM   #1
Lenux78
Member
 
Registered: Jun 2006
Location: Venezuela
Distribution: A Lot
Posts: 40

Rep: Reputation: 15
Question 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...
 
Old 07-07-2006, 11:09 AM   #2
Lenux78
Member
 
Registered: Jun 2006
Location: Venezuela
Distribution: A Lot
Posts: 40

Original Poster
Rep: Reputation: 15
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
 
Old 07-12-2006, 01:46 PM   #3
Lenux78
Member
 
Registered: Jun 2006
Location: Venezuela
Distribution: A Lot
Posts: 40

Original Poster
Rep: Reputation: 15
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
 
Old 07-14-2006, 03:21 PM   #4
tells
Member
 
Registered: Jun 2003
Location: Peoria, IL
Distribution: Ubuntu (home) / RHEL (work)
Posts: 65

Rep: Reputation: 15
Typically we run this command:

echo "scsi scan-new-devices" > /proc/scsi/scsi
 
Old 07-19-2006, 02:36 PM   #5
Lenux78
Member
 
Registered: Jun 2006
Location: Venezuela
Distribution: A Lot
Posts: 40

Original Poster
Rep: Reputation: 15
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
 
Old 07-20-2006, 06:23 PM   #6
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
You should download scsiadd and scsidev. Both those are great programs for recognizing and display information (ie. serial numbers, etc) of LUNS.

-twantrd
 
Old 07-21-2006, 08:26 AM   #7
Lenux78
Member
 
Registered: Jun 2006
Location: Venezuela
Distribution: A Lot
Posts: 40

Original Poster
Rep: Reputation: 15
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
 
Old 07-21-2006, 10:50 AM   #8
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Try using scsidev -s. It will try to print information of the LUNS if available.

Quote:
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...
To create the block devices, use scsidev -l. Sometimes, I need to delete all the /dev/scsi entries first, scsidev -f, and then scsidev -l will be issued afterwards.

-twantrd
 
Old 11-08-2006, 01:42 PM   #9
One_brown_mous
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
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.
 
Old 11-09-2009, 01:43 AM   #10
m2mthu
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Rep: Reputation: 0
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.
 
Old 11-09-2009, 04:30 AM   #11
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
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?

Last edited by DrLove73; 11-09-2009 at 04:32 AM.
 
Old 11-09-2009, 09:34 PM   #12
m2mthu
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Rep: Reputation: 0
hi,
I found the other way to solve: here
Thanks so much!
 
  


Reply


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
red hat won't detect pcmcia card sparkac Linux - Newbie 7 11-16-2003 05:00 PM
BIOS does not detect hard disk after Red Hat installation !! samik Linux - Hardware 2 10-12-2003 05:38 AM
Red Hat doesnt detect my NIC OrganicX Linux - Networking 18 03-24-2003 01:40 PM
Why does Red Hat 7.2 not auto detect my connection as 7.1 does? AMDPwred Linux - Distributions 4 01-15-2002 05:17 PM
Red Hat 6.0 Can't detect filesystem to install on mkoukoullis Linux - Software 1 05-16-2001 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration