Archive for March, 2017

RHEL increasing size of LVOL after LUN expansion

March 6, 2017 Leave a comment

Quick steps (validated on RHEL 5.x) on expanding your lvol when the underlining LUN has been expanded.

Ensure first you have rescanned the scsi devices to pick up on the physical changes to the LUNs. Next, from multipath you should be able to see that the LUN indeed have been expanded. In this case, the new size is 3.5T, original size was 3.0T.

# multipath -ll

vgnetapp1 (3600a09803830344a503f464a4d302f41) dm-3 NETAPP,LUN C-Mode
size=3.5T features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw

Next, the pv has to be resized:
# pvresize /dev/mapper/vgnetapp1

Now, resize the lvol:
# lvresize /dev/mapper/vgnetapp1-lvol1 -l +100%FREE

Finally, resize the underlying filesystem on the lvol:
# resize2fs /dev/mapper/vgnetapp1-lvol1

Expect this to take several minutes depending on the size of your LUN. Run “df -h” to see this operation has indeed increased the lvol and filesystem size. Note, you can run these commands while the LUN is mounted. No need to “umount” at all.

Categories: Linux, Redhat