Operating System - Linux
1753307 Members
6620 Online
108792 Solutions
New Discussion юеВ

Re: How to extend Logical Volume in RHEL AS 3

 
SOLVED
Go to solution
Danesh Qureshi
Regular Advisor

How to extend Logical Volume in RHEL AS 3

I have a server running RHEL AS 3 update 4.

What is the procedure for extending a logical volume in RHEL AS 3?

I know how to extend a logical volume in RHEL AS4 using lvm commands lvextend and ext2online but there is no ext2online command in RHEL AS 3.

Can anyone advise me how to this?
6 REPLIES 6
Steven McCoy
Valued Contributor

Re: How to extend Logical Volume in RHEL AS 3

Hello Danesh,

I typically use resize2fs:

lvextend -L +1G /dev/vg00/lvol8
resize2fs /dev/vg00/lvol8

You never have to even unmount the filesystem, it does it all live.

Hope this helps :)
Kranti Mahmud
Honored Contributor

Re: How to extend Logical Volume in RHEL AS 3

Matti_Kurkela
Honored Contributor
Solution

Re: How to extend Logical Volume in RHEL AS 3

We're talking about RHEL 3 AS, which uses 2.4.21 kernel and is rather old.

I don't think the 2.4.21 kernel originally supported on-line filesystem resizing. Maybe it has been added as a back-ported kernel patch in later errata kernels, but I would not assume that.

As Danesh already mentioned, the command-line tools for on-line extension are not available, which would seem to indicate that RedHat won't support on-line extension in RHEL 3 version.

If the kernel support for on-line filesystem extension is missing, even compiling the ext2online/resize2fs command-line tools yourself won't help. (I think I tried this once: if the kernel is too old, the tools will just report "kernel does not support on-line resizing" and exit.)

RedHat System Administration Guide for RHEL 3 refers to LVM-HOWTO, which offers this procedure:

http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html

After extending the LV using the lvextend command:

# umount /dev/myvg/somevol
# resize2fs /dev/myvg/somevol
# mount /dev/myvg/somevol

MK
MK
skt_skt
Honored Contributor

Re: How to extend Logical Volume in RHEL AS 3

version 3 (lvm-1) does not support online extend . Just want to second
Danesh Qureshi
Regular Advisor

Re: How to extend Logical Volume in RHEL AS 3

Just to let you know you this is how I did it:-

I found a very useful Red Hat article id:5502 which explained how to use e2fsadm to grow or extend a partition on an existing logical volume on RHEL AS 3.

This is how I extended /data1 partition by 6400 physical extents on RHEL AS 3 from root:-

# vgdisplay (check you have enough free physical extents)
# umount /data1 (unmount the filesystem in my /data1)
# e2fsadm -l +6400 /dev/volgroup/data1
The above command took quite a long time to complete so be patient
# vgdisplay (check again for physical and allocated extents)
# mount /data1 (remount the file system)

All done.

Thank you all for your help.

Danesh Qureshi
Regular Advisor

Re: How to extend Logical Volume in RHEL AS 3

I found a very useful Red Hat article id:5502 which explained how to use e2fsadm to grow or extend a partition on an existing logical volume on RHEL AS 3.