VMware Cloud Community
Syruis
Contributor
Contributor

lvm on redhat guest

Hi,

i have the same problem than this guy:

http://communities.vmware.com/thread/137893?start=30&tstart=0

I can't create or resize lvm (lvm2) on redhat 5.3/5.7/6.1 i386 or x64 with a ESX 4.1 and it's the same with vmware tools installed or not.

If there is a solution for resize (see in the lastest post) i haven't any solution to recreate a lvm after the first installation of my red hat...

i have tested with system-config-lvm and same issues!!!

Thanks for help!

regards,

syruis

0 Kudos
5 Replies
MKguy
Virtuoso
Virtuoso

Whether you install VMware tools or not is of no concern to your issue, as it is completely unrelated to virtualization and applies to physical systems as well.

There are various online guides on how to resize LVM volumes, like:

http://allaboutfedora.blogspot.com/2007/01/how-to-resize-or-expand-lvm-partitions.html#!/2007/01/how...

http://www.tcpdump.com/kb/os/linux/lvm-resizing-guide/expand.html

The bootable gparted live CD is also quite handy, supplies a GUI and can resize volumes more or less securely while your actual system remains offline:

http://gparted.sourceforge.net/download.php

-- http://alpacapowered.wordpress.com
0 Kudos
Syruis
Contributor
Contributor

Well.. i think you don't understand my problem.

I have several physical machines with redhat & lvm without any problem to create and resize my partition.

When i'm on my virtual machine with a redhat guest, i always have the same error if i make lvcreate/lvresize "ioctl: arguement failed", i have googled with sucess but there is no solution to my problems.

fdisk -l... ; pvextend; vgchange --refresh;

=> all sucess

umount /part

=> sucess

e2fsck -f /dev/VGSAN_TEST/LVoradatafile_TEST

=> sucess

lvresize -v -L+2g /dev/VGSAN_TEST/LVoradatafile_TEST

=> failed "ioctl: arguement failed", so

lvchange -an /dev/VGSAN_TEST/LVoradatafile_TEST

=> sucess

lvresize -v -L+2g /dev/VGSAN_TEST/LVoradatafile_TEST

=> sucess

lvchange -ay /dev/VGSAN_TEST/LVoradatafile_TEST

=>success

resize2fs /dev/VGSAN_GNXTST/LVoradatafile_GNXTST

=> failed partition lost, (it reproduce on 5 guest! with different version of red hat)

I have the bug RedHat version 5.3/5.4/5.7/6.1, but only with the "vmware guest", the only way i can test is to unuse the auto-aprovisioning disk...

Regards,

0 Kudos
MKguy
Virtuoso
Virtuoso

Well, I still doubt the root of the issue is simply because they're virtualized or because a VMware-component is actively interfering. Anything that happens on the disks of a guest, including basic partitioning etc. is transparent and of no concern to the hypervisor. Everything happens just inside the GuestOS.

Did you hot-add diskspace while the Guest was running or did you turn the VM off, extend the VMDK file and then turn it back on?

I myself remember having successfully extended an LVM volume on a CentOS5 guest (which is pretty much RHEL5) with this guide:

http://communities.vmware.com/docs/DOC-10501?tstart=3390 (start around step 5)

This guide for example uses lvextend instead of lvresize but a couple of other tools.

-- http://alpacapowered.wordpress.com
0 Kudos
Syruis
Contributor
Contributor

Well, i make the auguementation of the VMDK when the VM was turn on.

The pv (with pvdisplay) show successfully the new space and the vg to, the lv show it right, but it doesn't works...

I have tested to reboot... but it doessn't work better.

I have to test the same thing with Gparted ISO...

0 Kudos
Syruis
Contributor
Contributor

Fun screenshot!

0 Kudos