Extending a file system
Assumptions: VM server runnig RHEL 6 with SCSI drives /dev/sda and d/dev/sdb are already in use and a volume group named appvg which has logical volume, lv1 defined. A Virtual Disk 20G is size has been presented the the VM.
The current procedures I have for extending a ext3 file system is:
- Scan in the new LUN, say /dev/sdc
- Use fdisk to create a partition and type, say /dev/sdc1 as type 8e
- Create new physical volume, pvcreate /dev/sdc1
- Extend the volume group, vgextend appvg /dev/sdc1
- Extend the logical volume, lextend -L +20G /dev/appvg/lv1
- Extend the file system, resize2fs /dev/appvg/lv1
I hear rumor that under RHEL 6, creating a partition on the scanned LUNs is no longer necessary and that I can use vgextend appvg /dev/sdc without the need of running pvcreate first and that I can use the -r parm on lvextend to resize the file system.
Can I now just run the following commands?:
- Scan the new LUN, say /dev/sdc
- vgextend appvg /dev/sdc
- lvextend -L +20G -r /dev/appvg/lv1
If so why is a partition no longer needed on a LUN and is use of the lvextend -r only for ext4 file systems?