[VGLUG] how to extend / LVM partition--

410 views
Skip to first unread message

Kumar Shukla

unread,
Jul 19, 2010, 2:47:59 AM7/19/10
to vg...@googlegroups.com
Hi,

Can anybody help me to unmount / partition in order to run "resize2fs
command"? I am getting "device is busy" error.

Thanks,
Kumar Shukla

kaushal patel

unread,
Jul 19, 2010, 2:57:02 AM7/19/10
to vg...@googlegroups.com
Hi Kumar,

You need not to unmount partition to extend it. Follow the below steps :

1. lvextend --size +<size you want to extend> /dev/<VGNAME>/<PARTNAME>
2. resize2fs /dev/<VGNAME>/<PARTNAME>

EG.
I have 2GB space in / partition and want to extend more 500M in to it

# lvextend --size +500M /dev/vg001/root_part or #lvextend --size 2500M /dev/vg001/root_part
# resize2fs /dev/vg001/root_part

You can check your size of partitions by "df -kh" command

Regards,
Kaushal Patel
 


--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG-un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG



--
Regards,
Kaushal Patel
Network & Security Engineer,
Cyberoam QA
Elitecore Technologies Ltd.

Kumar Shukla

unread,
Jul 19, 2010, 3:11:03 AM7/19/10
to vg...@googlegroups.com

I am getting error “ you can’t resize on mounted file system” error while I run resize2fs command.

 

Thanks & regards,

 

Kumar

Murtuza Barodwala

unread,
Jul 19, 2010, 5:00:47 AM7/19/10
to vg...@googlegroups.com
hii

if u want to unmount lvm partition unmount the directory on which u have mounted the partition e.g /data or ...

thanks

On Mon, Jul 19, 2010 at 12:17 PM, Kumar Shukla <ksh...@imany.com> wrote:
--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG-un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG



--
Murtuza .I. Barodawala
Red Hat Certified Security Specialist (R.H.C.S.S)
+919879399921

Ahmedabad,India

kaushal patel

unread,
Jul 19, 2010, 5:18:49 AM7/19/10
to vg...@googlegroups.com
We had on chat and resolved the issue.

Problem : Kumar has VM with RHEL 4.6 Version. Resize2FS was not working on it.

Solution : In RHEL 4 version there is another command instead off Resize2fs which has to run after lvextend command.

                   # ext2online -d /dev/vg0/lv1

The partition was extended online and working as per kumar's confirmation on change.

Courtesy : http://ajeetraina.blogspot.com/2009/05/how-to-extend-lvm-partition-online.html


Regards,
Kaushal Patel
Reply all
Reply to author
Forward
0 new messages