Re: Growing a LVM filesystem

On Jan 1, 2008, at 10:31 AM, Joey Prestia wrote:

My question is this how do i grow the filesystem? Parted apparently cant handle it (I tried it by specifing parted /dev/VG_01/LV_01 )and it told me filesystem has an incompatible feature enabled. I dont know of another tool that is a command line tool that is available to use.

Here is the procedure we use:
This procedure assumes that the LUNs are already configured on the system with multipathing, made into physical volumes, and extended into the relavent volume group.

In the example below, all free space in the VG "nsvg" will be added to the filesystem "/nsfs03".

Resize the logical volume containing the filesystem
Obtain the amount of free space in the volume group via vgdisplay(8). It is best to use the actual number of extents (physical/logical) with the lvextend command, instead of specifing relative amounts. See the lvextend(8) man page for details.

[root@host ~]# lvextend -l +398260 /dev/nsvg/lvol2
Extending logical volume lvol2 to 2.45 TB
Logical volume lvol2 successfully resized
Grow the filesystem to use the full size of the expanded logical volume

• The filesystem has to be mounted while doing this; this is stupid, but fact. It is probably best to minimize activity while it is running.
• The ext2online(8) command can take a long time (like, an hour or two, for a multi-TB filesystem) to complete, depending on the size of the filesystem.
• It is probably a bad thing if this command gets interrupted, so you might want to run it under "nohup" or "at", or in a "screen" session.
[root@host ~]# ext2online -v /nsfs03
... snip ...
group 7629 inode table has offset 2, not 1027
using 964 reserved group descriptor blocks
creating group 20074 with 32768 blocks (rsvd = 867, newgd = 157)
cache direct hits: 12349, indirect hits: 97, misses: 100

Sandor W. Sklar, Unix Systems Administrator
Stanford University Libraries & Academic Information Resources (SULAIR)

redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe