Jul 4, 2013

HOWTO: Attach new lun without reboot on linux

I have a CentOS box with an almost full filesystem so a new lun has been presented from an EMC SAN.

Find your hosts hba identifiers, you will need it:

#ls /sys/class/fc_host
host13  host14

Do this echo to force the scan:
echo "- - -" > /sys/class/scsi_host/host13/scan
echo "- - -" > /sys/class/scsi_host/host14/scan

Or faster:

ls -1 /sys/class/fc_host|while read line; do echo "- - -" > /sys/class/scsi_host/${line}/scan; done


After that you should be able to see your new disk and powerpath device:

fdisk -l|grep emcpower

Disk /dev/emcpowera: 214.7 GB, 214748364800 byte
Disk /dev/emcpowerf: 644.2 GB, 644245094400 byte
Disk /dev/emcpowerh: 209 MB, 209715200 byte
Disk /dev/emcpowerg: 32.2 GB, 32212254720 byte

# ls -l /dev/emcpower*
crw-r--r-- 1 root root  10,  62 31 mag 04:32 /dev/emcpower
brw-r----- 1 root disk 120,   0  4 lug 23:03 /dev/emcpowera
brw-r----- 1 root disk 120,  80  4 lug 23:03 /dev/emcpowerf
brw-r----- 1 root disk 120,  96 31 mag 04:30 /dev/emcpowerg
brw-r----- 1 root disk 120, 112  4 lug 23:22 /dev/emcpowerh


Check it with:

# powermt display dev=emcpowera
Pseudo name=emcpowera
VPLEX ID=CKM00131200661  
Logical device ID=6000144000000010207C908698B31DCB
state=alive; policy=ADaptive; queued-IOs=0
==============================================================================
--------------- Host ---------------   - Stor -  -- I/O Path --   -- Stats ---
###  HW Path               I/O Paths    Interf.  Mode     State   Q-IOs Errors
==============================================================================
  14 qla2xxx                sdaa        04       active   alive      0      0
  14 qla2xxx                sdz         00       active   alive      0      0
  13 qla2xxx                sdy         05       active   alive      0      0
  13 qla2xxx                sdx         01       active   alive      0      0

No comments:

Post a Comment