Monday, December 2, 2013

Linux Resize LUN Without Reboot

Try running following commands

Check OS using what devices for attached LUNs:

multipath -l

mpath5 (360060.......................) dm-15
[size=100G][features=1 queue_if_no_path][hwhandler=1 emc][rw]
\_ round-robin 0 [prio=0][active]
 \_ 1:0:0:14 sdb 66:192 [active][undef]
 \_ 0:0:0:14 sdc  8:224  [active][undef]
\_ round-robin 0 [prio=0][enabled]
 \_ 0:0:1:14 sdd 66:112 [active][undef]
 \_ 1:0:1:14 sde 67:176 [active][undef]

Rescan all paths:
echo 1 > /sys/block/sdb/device/rescan
echo 1 > /sys/block/sdc/device/rescan
echo 1 > /sys/block/sdd/device/rescan
echo 1 > /sys/block/sde/device/rescan

Then run:
       
partprobe
multipathd -k

resize map mpath5
If LVM is used, also required following:
#pvscan
Check Disk Changes detected under LVM:
#pvs
#vgscan
  Check VG Size is Increased:
#vgs
Now Extend the LV: 
#lvextend -L +G
Finally Extend the File System
#resize2fs
Thats it!!! 

No comments:

Post a Comment