Still playing with iSCSI, so needed to enlarge the logical volume now I am actually using it.
This post is just for my reference as for years I have been running resize2fs manually after resizing an LV, but I noticed in the man page the -r option will do it automatically now. So posted for my reference to try to override my habit of doing all the steps individually.
[root@falcon ~]# lvextend --size +10G -r /dev/VolGroup00/iSCSI01 fsck from util-linux 2.19.1 /dev/mapper/VolGroup00-iSCSI01: 17/983040 files (0.0% non-contiguous), 104105/3932160 blocks Extending logical volume iSCSI01 to 25.00 GiB Logical volume iSCSI01 successfully resized resize2fs 1.41.14 (22-Dec-2010) Resizing the filesystem on /dev/mapper/VolGroup00-iSCSI01 to 6553600 (4k) blocks. The filesystem on /dev/mapper/VolGroup00-iSCSI01 is now 6553600 blocks long.
Much easier than having to run resize2fs manually. Of course it always helps to know how to do it manually as some of the stuff I muck about with requires a lot of fiddling to fix once I break it :-).
I guess it may also manage shrinking an LV automatically as well; but as I generally only shrink a LV if I’m about to do something nasty with the PV(s) it’s hosted on I’ll keep doing that manually.