Hi, Is there something OS related (CentOS 5.1) I would need to do for a CLI created array to become visible to the OS after the array is created and initialized? I don't want to reboot...
Thanks! jlc
Joseph L. Casale wrote:
Hi, Is there something OS related (CentOS 5.1) I would need to do for a CLI created array to become visible to the OS after the array is created and initialized? I don't want to reboot...
If your not currently using the array, you may be able to unload the module and reload it.
If the devices from that array show up as SCSI devices you may be able to interface with the /proc/scsi/scsi interface to add the new volume
cat /proc/scsi/scsi
and use
echo "scsi add-single-device X X X X" >/proc/scsi/scsi e.g.
/proc/scsi/scsi on one of my systems: Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 24 Vendor: 3PARdata Model: VV Rev: 0000 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: 3PARdata Model: VV Rev: 0000 Type: Unknown ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 24 Vendor: 3PARdata Model: VV Rev: 0000 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 00 Id: 00 Lun: 25 Vendor: 3PARdata Model: VV Rev: 0000 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 25 Vendor: 3PARdata Model: VV Rev: 0000 Type: Direct-Access ANSI SCSI revision: 05
Assuming I only had 1 controller, scsi0, and I created a new volume to export to the system, it's likely that volume would have a different LUN. I would do:
echo "scsi add-single-device 0 0 0 1" >/proc/scsi/scsi
assuming the array used LUN 1 to export to the system. Then if you cat /proc/scsi/scsi again the device will show up and will be accessible. If nothing shows up then that device doesn't exist.
Not knowing how megaraid exports a virtual disk I'm not sure what LUN it might assign, or maybe it presents it as a new ID number instead of a new LUN.
nate
nate wrote:
Joseph L. Casale wrote:
Hi, Is there something OS related (CentOS 5.1) I would need to do for a CLI created array to become visible to the OS after the array is created and initialized? I don't want to reboot...
If your not currently using the array, you may be able to unload the module and reload it.
If the devices from that array show up as SCSI devices you may be able to interface with the /proc/scsi/scsi interface to add the new volume
cat /proc/scsi/scsi
and use
echo "scsi add-single-device X X X X" >/proc/scsi/scsi
if I'm not mistaken, thats deprecated in kernel 2.6, the proc interface is no longer supposed to be used for that sort of thing, there's a new /sys mechanism. IIRC< that worked in RHEL3, but not in RHEL4, at least not with various system provided FC drivers I tried it with.
John R Pierce wrote:
if I'm not mistaken, thats deprecated in kernel 2.6, the proc interface is no longer supposed to be used for that sort of thing, there's a new /sys mechanism. IIRC< that worked in RHEL3, but not in RHEL4, at least not with various system provided FC drivers I tried it with.
Good to know, I use that interface all the time in RHEL4/5 CentOS 4/5, haven't heard of the new interface yet.
thanks
nate
Not knowing how megaraid exports a virtual disk I'm not sure what LUN it might assign, or maybe it presents it as a new ID number instead of a new LUN.
nate
Thanks for all that info! In this situation, I could unload and reload the driver but in future I won't be able to. Looking at that file gives me the following:
[root@host ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3160812AS Rev: 3.AA Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3160812AS Rev: 3.AA Type: Direct-Access ANSI SCSI revision: 05 Host: scsi2 Channel: 02 Id: 00 Lun: 00 Vendor: LSI Model: MegaRAID 8888ELP Rev: 1.12 Type: Direct-Access ANSI SCSI revision: 05
So I can see echo "scsi add-single-device 2 2 0 0" >/proc/scsi/scsi would have been what I needed, correct? In the future once I start using this system I won't be able to reboot it, so I will get a handle on how this controller adds virtual discs.
Shame there isn't a way to simply rescan the bus without knowing what you are expecting:)
Thanks! jlc
Joseph L. Casale wrote:
Host: scsi2 Channel: 02 Id: 00 Lun: 00 Vendor: LSI Model: MegaRAID 8888ELP Rev: 1.12 Type: Direct-Access ANSI SCSI revision: 05
So I can see echo "scsi add-single-device 2 2 0 0" >/proc/scsi/scsi would have been what I needed, correct?
I would try these combinations: 2 2 0 1 2 2 1 0 2 2 1 1
In the future once I start using this system I won't be able to reboot it, so I will get a handle on how this controller adds virtual discs.
Shame there isn't a way to simply rescan the bus without knowing what you are expecting:)
There was, and might still be, I recall a command in RHEL 3 I think it was but I don't see it in newer versions. Looking at one of my Debian Sarge systems running on a 2.4 kernel there is a scsiadd -s command to scan for new devices but I don't see a scsiadd command on my newer systems.
nate
ah.... for 2.6 systems (rhel5, etc)...
# echo “- - -” > /sys/class/scsi_host/hostH/scan
scans for all devices on channel hostH
# *echo “1” > /sys/class/scsi_host/hostH/device//H:B:T:L//delete deletes device H:B:T:L from channel hostH
*
**
* # echo “/B T L/” > /sys/class/scsi_host/hostH/scan*
adds device B T L to hostH ...
this is for scsi or fiberchannel, AFAIK.
some more stuff about this here -> http://www.linuxjournal.com/article/7321
*
*