1752815 Members
6038 Online
108789 Solutions
New Discussion юеВ

lvextend

 
pratapvfr
Advisor

lvextend

Hello
i am having one vg which still have around 60gb free space (unallocated) i would like to extend existing lv which is in the same vg below is the correct way

1) umount the lvm

2)lvextend -L +61440 /dev/vg01/lvol10 /dev/sdk3
3)ext2online /dev/vg01/lvol10

4) mount back the lvm

thanks,
5 REPLIES 5
Kapil Jha
Honored Contributor

Re: lvextend

do you have online JFS, if yes then no need to umount the LV you can do it online.


which verious of lvm and Linux.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Michal Kapalka (mikap)
Honored Contributor

Re: lvextend

hi,

i'm using :

1. umount the LVMs-lvol

2. lvextend --size +2G -n /dev/.../LVMs-lvol

3. e2fsck -f /dev/.../LVMs-lvol

4. resize2fs /dev/.../LVMs-lvol

5. e2fsck -f /dev/.../LVMs-lvol

of course the fsck is depend what type of file system do you use.

PS : i think your way is correct.

mikap
pratapvfr
Advisor

Re: lvextend

file system type is ext3
i dont have online jfs lincese, can not use

in this lvm i am already having 50gb+ data so below is the correct way which is suggested by mikap,?

1) umount /data (which is /dev/vg01/lvol10
2)lvextend -L +61440 /dev/vg01/lvol10 /dev/sdk3
(need to extend 60gb i already verify free space is there in this vg)

3)e2fsck -f /dev/vg01/lvol10
4)resize2fs /dev/vg01/lvol10
5)e2fsck -f /dev/vg01/lvol10
6) mount back the file system

please advice,
Kapil Jha
Honored Contributor

Re: lvextend

Both would work fine.
ext2online (increase ext3 only)
resize2fs (inclrease both ext2 and 3)

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Hemmetter
Esteemed Contributor

Re: lvextend

hi,


No umount is needed while extension of lvols.
ext2online works as well while mounted ( in most cases )
Only if ext2online refuses to extend fs then Michal's offline solution is needed.


rgds
HGH