New LUN available on Linux without reboot

John Murtari jmurtari at thebook.com
Fri May 5 08:18:58 CDT 2006


Aaron,

> I made a new LUN on a SAN (EMC, Navisphere).  I gave the LUN to a
> storage group.  How can I get Linux to see the LUN as a disk
> (without a reboot) so that I can then get PowerPath to make a device
> and then add it to a LVM disk?

      I saw some of the suggestions.  We are not running LVM or a SAN
with our servers, but we do occasionally add a new disk (hot swap) to
our machines and want to start using it with a reboot, etc...  Not
really sure if our notes on the process will help you.

Here are some notes we have on adding/removing drives -- these
procedures worked on RHEL 4 systems. Obviously, we would recommend you
try it on a nonproduction server first --  Hope it helps!


################## TO REMOVE DRIVE

IN GENERAL - echo "scsi remove-single-device 0 1 2 3" > /proc/scsi/scsi
(replace "0 1 2 3" with your "Host Channel Id Lun")

-- for us:
(SU-recover1)/var/log>cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: FUJITSU  Model: MAS3184NC        Rev: 5B08
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 03 Lun: 00
  Vendor: SEAGATE  Model: ST336753LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 05 Lun: 00
  Vendor: SEAGATE  Model: ST336753LC       Rev: 0006
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: PE/PV    Model: 1x6 SCSI BP      Rev: 1.1
  Type:   Processor                        ANSI SCSI revision: 02

--- want to remove the first seagate,
--- MAKE SURE everything is unmounted

echo "scsi remove-single-device 0 0 3 0" > /proc/scsi/scsi

############## TO ADD DRIVE
After you replace the drive and restart it

IN GENERAL - echo "scsi add-single-device 0 1 2 3" > /proc/scsi/scsi
(replace "0 1 2 3" with your "Host Channel Id Lun")

######### FOR US

push drive in so power is on, then
gave command:  echo "scsi add-single-device 0 0 3 0" > /proc/scsi/scsi

Mar  4 10:55:55 recover1 kernel: scsi singledevice 0 0 3 0
Mar  4 10:55:55 recover1 kernel: blk: queue f6451418, I/O limit 4294967295Mb (mask 0xffffffffffffffff)
Mar  4 10:55:55 recover1 kernel: mptbase: ioc0: LogInfo(0x11010300): F/W: bug! MID not found
Mar  4 10:55:56 recover1 kernel: mptbase: ioc0: LogInfo(0x11010300): F/W: bug! MID not found
Mar  4 10:55:56 recover1 kernel:   Vendor: SEAGATE   Model: ST336753LC        Rev: 0006
Mar  4 10:55:56 recover1 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 03
Mar  4 10:55:56 recover1 kernel: blk: queue f64a5618, I/O limit 4294967295Mb (mask 0xffffffffffffffff)
Mar  4 10:55:56 recover1 kernel: Attached scsi disk sdb at scsi0, channel 0, id 3, lun 0
Mar  4 10:55:58 recover1 kernel: sdb: Spinning up disk.....SCSI Error: (0:0:0) Status=02h (CHECK CONDITION)
Mar  4 10:55:58 recover1 kernel:  Key=6h (UNIT ATTENTION); FRU=00h
Mar  4 10:55:58 recover1 kernel:  ASC/ASCQ=29h/02h "SCSI BUS RESET OCCURRED"
Mar  4 10:55:58 recover1 kernel:  CDB: 2A 00 00 B5 43 98 00 00 02 00
Mar  4 10:55:58 recover1 kernel:
Mar  4 10:56:03 recover1 kernel: .....ready
Mar  4 10:56:03 recover1 kernel: SCSI device sdb: 71687372 512-byte hdwr sectors (36704 MB)
Mar  4 10:56:03 recover1 kernel:  sdb: sdb1 sdb2 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 >


-- 
                                          John
___________________________________________________________________
John Murtari                              Software Workshop Inc.
jmurtari at thebook.com 315.635.1968(x-211)  "TheBook.Com" (TM)
http://www.thebook.com/



More information about the Linux-PowerEdge mailing list