Find the answer to your Linux question:
Results 1 to 5 of 5
Ok, I'm a little lost here. I have a vmware image of "Fedora Core 6" running on my windows xp host. I increased the allocated disk size using vmware. Now ...
  1. #1
    Just Joined! simpleton's Avatar
    Join Date
    Sep 2006
    Location
    Earth 2007
    Posts
    7

    Question Increase size of LVM on FC6 VMware image

    Ok, I'm a little lost here.

    I have a vmware image of "Fedora Core 6" running on my windows xp host. I increased the allocated disk size using vmware. Now I have to find a way to add the new space into my LVM. My new space is recognized as /dev/sda3 and I changed the type to "8e" (aka: LVM).

    I apparently have 2 Logical Volumes: "LogVol00" and "LogVol01" in my Volume Group: "VolGroup00". When i checked /etc/fstab I found that "LogVol00" was "/" and "ext3"... and that "LogVol01" was "swap".

    So I figure, i just have to extend my /dev/VolGroup00/LogVol00 using my newly created space on the vmware image.

    I've done some serious reading, and I know I have to use the pvcreate, vgextend, and lvextend commands, but I am very unsure of what parameters to use and how.

    How do I use these commands, what should I do from here?

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    It's pretty easy. You've already created the physical volume correct? So now in the lvm console do
    Code:
    vgextend VolGroup00 /dev/sda3
    Now that sda3 is in the volgroup you need to extend the logical volume to it. You have to give lvextend an option for size, I use the -l option to specify in physical extents because it makes life a lot easier. To see the PE's you have left, run
    Code:
    vgdisplay -v VolGroup00
    Note the Free PE line and then run
    Code:
    lvextend -l xxxx /dev/VolGroup00/LogVol00
    Where xxxx is the number of free pe's you have. Then at a regular command line run
    Code:
    resize2fs /dev/VolGroup00/LogVol00
    I've only had to resize a couple times, it was really easy.

  3. #3
    Just Joined! simpleton's Avatar
    Join Date
    Sep 2006
    Location
    Earth 2007
    Posts
    7
    Great! Doesn't look hard at all. Thanks for the info.

    I haven't used pvcreate yet, I just started the partition with "gparted"... left the type as "unknown", and set the flag as "8e".

    Also, (serious newbie question): How do I open an "lvm console"?

  4. #4
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    If you have set it to 8e, then you need to do
    Code:
    pvcreate /dev/sda3
    in lvm before all those other steps. To get into the interactive lvm console, just type
    Code:
     lvm
    at the command line.

  5. #5
    Just Joined! simpleton's Avatar
    Join Date
    Sep 2006
    Location
    Earth 2007
    Posts
    7
    Wow, that worked beautifully!
    Thanks so much!!

    I think I kept screwing it up before, because I was trying to run the commands outside of the lvm console.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...