Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
and a few more after this. Now as this is a VM we allowed a bit of extra space etc for the partitions to grow, however on Disk 2, the physical disk allocated by the VM ended up not being big enough. I thought this would be a simple matter of increasing the HDD size in the VM manager and growing the partition, then group, then volume, but I can find no way to do this after a few hours searching. I see that it would be possible to add another partition into the free space and add it too the group etc but I would rather avoid this as over the next few months this may need to grow a fair amount and I would hate to end up with 50+ partitions everytime space was needed.
There are plenty of instructions and info on how to grow and shrink volumes and groups if the physical space has already been allocated in the LVM partition but not after that.
As always any help is greatly appreciated.
EDIT : Fdisk see's the space fine:
Disk /dev/sdc: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 5221 41937651 8e Linux LVM
Last edited by mhouston100; 06-06-2010 at 10:38 PM.
Distribution: openSUSE 11.2, (B)LFS, Mepis, Linux Mint 9
Hello MHouston !!
First, can you tell me which version of RHEL or Fedora (maybe) are you using ? Is it LVM1 or LVM2 ? As you said "[...]Now as this is a VM we allowed a bit of extra space etc for the partitions to grow[...]", which method did you use to add the extra space ? SAN ? adding more drives ? extending the raid ?
The machine is a VM which is located on the SAN (Plenty of space on the SAN at the moment). The change that I made size-wise is in the VM virtual HDD settings, increased the disk size so in essence:
Created the drive at 40 GB
Created LVM Partition 40GB
Created LVMGroup to cover whole partition
Created LV to fill whole group
Realised its supposed to be 50GB and increased the physical HDD to 50GB (through VM)
And now im stuck, obviously I can create a new partition and add that to the LVM group but this partition is likely to grow multiple times and I would rather not end up with a bunch of partitions IF there is a way to simply grow the LVM partition that is holding the group.
I have seen plenty of way to grow the groups and volumes IF the partition was created larger in the beginning, but nothing to indicate how to do what im asking.
Ok I think If have the process on what to do, i'm just waiting for the VM to clone again and getting it straight for when its complete.
From what I understand I need to :
Use fdisk to resize the actual partition to fill the physical space, this seems to be done by removing the partition and re-creating it in the same space (same start point and a later end point)
Use pvresize to resize the LVM partition
Use lvresize to resise the logical volume(s) i want to resize
fs2resize (or similar) to resize the filesystem thats to grow to the LV
Shouldnt be long for the cloning to finish and ill give it a shot!
Thanks again guys.
Yep, that should work. If you run into any problems, you might need to do some of that using a rescue disk, I'm not sure if the pvresize stuff can be done live since I've never done that before. Everything else can be done live. Also, the command is resize2fs. This is the kind of stuff that turned me onto using LVM almost exclusively, I love LVM.