Actions: | Security

Navigation: Home | Services | Tools | Articles | Other

Grow a Netapp LUN managed by Device Mapper and LVM

Keep in mind all the different levels of storage abstraction we'll be working with

Take note of current configuration on netapp:

lun show

on linux host:

fdisk -l
multipath -ll

Grow lun on netapp:

lun resize <volname> <newsize>
lun resize /vol/db/db4_data 500g

Rescan devices:

echo 1 > /sys/block/sda/device/rescan
echo 1 > /sys/block/sdb/device/rescan
echo 1 > /sys/block/sdc/device/rescan
echo 1 > /sys/block/sdd/device/rescan

You should see the new size in fdisk for /dev/sda - /dev/sdd:

fdisk -l

Drop into multipath shell to resize multipath device (control-d to exit):

multipathd -k
multipathd> show paths
multipathd> show maps
multipathd> del path sda
multipathd> add path sda
multipathd> del path sdb
multipathd> add path sdb
multipathd> del path sdc
multipathd> add path sdc
multipathd> del path sdd
multipathd> add path sdd
multipathd> show paths
multipathd> show maps
multipathd> resize map <mapname from show maps earlier>

multipath should now show new size of multipath device:

multipath -ll

resize LVM physical volume (the argument will have been the sysfs column from show maps):

pvresize /dev/dm-4

vgdisplay should now show free space in the volume group:


resize LVM logical volume:

lvextend -L+50G /dev/vg-analysis/analysis1-data

grow filesystem:

resize2fs /dev/vg1/db4-data

restart multipathd:

/etc/init.d/multipathd restart