System Administration
Showing results for 
Search instead for 
Did you mean: 

Extending File System on RHEL 5.5

Go to solution

Extending File System on RHEL 5.5

Hi all,

We need to extend file system /opt/pluto by 150 Gigs to a non root volume group assigned file system.

SAN team have provided LUNs on this server.
Can someone elaborate steps to be performed to extend file system here ?

Wouter Jagers
Honored Contributor

Re: Extending File System on RHEL 5.5

Basic steps would be:

Determine volume group + logical volume with df.
Add provided LUN(s) into VG with vgextend.
Enlarge logical volume with lvextend.
Enlarge filesystem with resize2fs.

..assuming that the provided LUN(s) are visible and ready for use.

an engineer's aim in a discussion is not to persuade, but to clarify.
Occasional Advisor

Re: Extending File System on RHEL 5.5

Check these articles out. It documents the process of expanding logical volumes very well.

I have used it and it's worked for me.

Hope that helps.
Honored Contributor

Re: Extending File System on RHEL 5.5


/dev/mapper/vgname-lvolname /data is at 99%

How to Increase Filesystem:

vgdisplay vgname
(check if there are free extents to extend the logical volume of the underlying "Filesystem)

lvextend -L +4GB /dev/vgname/volname

resize2fs /dev/vgname/lvolname

ALL done ONLINE without unmounting the filesystem/interrupting I/O.

Now to shrink filesystem ONLINE -- now that is another matter.

Hakuna Matata.

Re: Extending File System on RHEL 5.5

If new LUNs are added from HP's disk array to Linux Servers File Systems then how do we find which are new luns and not being used ?

So that we do not accidently use the LUNs which are already being used by the systems.
Honored Contributor

Re: Extending File System on RHEL 5.5

If a disk device is already in use by LVM, pvcreate won't run (unless you use -f or -ff, in which case it's your own fault).

# pvcreate /dev/sdc1
Can't initialize physical volume "/dev/sdc1" of volume group "vg00" without -ff
(Oops, it's already in use. No harm done...)

If you use legacy PC partition tables (= those created by fdisk and similar tools) on your disks, you should notice that the disk already has a partition of type "Linux", "Linux LVM", "Linux raid autodetect" or similar.

If you have multipathing, use whatever tool you have to list all multipathed disks ("multipath -l" for RHEL default device-mapper-multipath; "powermt display" for EMC PowerPath; etc.). Then run "pvs" to see all PVs managed by LVM, and look for disks that are in one list but not in the other.

NOTE: if your site is using any software that uses raw disks, look into the documentation of that software to find out how to identify that a disk is in use by that software. (Because raw disk formats are often proprietary, there is no all-encompassing tool for this.)
Make sure other sysadmins at your site know that identification procedure too.