LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Resize LVM in Vmware wheen 4 partitions (https://www.linuxquestions.org/questions/red-hat-31/resize-lvm-in-vmware-wheen-4-partitions-4175457174/)

cameleon666 04-06-2013 08:41 PM

Resize LVM in Vmware wheen 4 partitions
 
I need to add free space to LVM group. Most tutorials do tell about creating new partition but i can't create new one. How i would add all unlocated space in this situation ?

Code:

Filesystem            size  used  aval. %used. mounted on
/dev/mapper/VolGroup00-LogVol00
                      328G  293G  18G  95%    /
/dev/sda1              99M  13M  82M  14%    /boot
tmpfs                1006M    0 1006M  0%    /dev/shm

Disk /dev/sda: 590.5 GB, 590558003200 bytes
255 heads, 63 sectors/track, 71797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          13      104391  83  Linux
/dev/sda2              14      19581  157179960  8e  Linux LVM
/dev/sda3          19582      23497    31455270  8e  Linux LVM
/dev/sda4          23498      44384  167774827+  8e  Linux LVM

Nr  Begining      End    Size    Type  Filesystem    Flag   
 1    32,3kB    107MB  107MB    main  ext3          boot
 2    107MB    161GB  161GB    main                  lvm     
 3    161GB    193GB  32,2GB    main                  lvm     
 4    193GB    365GB  172GB    main                  lvm     
      365GB    591GB  225GB            Free space


Madhu Desai 04-07-2013 04:36 AM

Quote:

...creating new partition but i can't create new one. How i would add all unlocated space in this situation ?
Why cant you create new partition?

you should create a partition and set partition type as 8e, then initialize that partition as physical volume (pvcreate), and then only you can add it to volume group.

Code:

/dev/sda2              14      19581  157179960  8e  Linux LVM
/dev/sda3          19582      23497    31455270  8e  Linux LVM
/dev/sda4          23498      44384  167774827+  8e  Linux LVM

Do they all belong to same volume group? if yes, then whats the point in creating different partitions for same volume group? you could just create one physical volume and then create many LV from that.

show outputs of pvs, vgs and lvs

Also note that redhat strongly recommends to create single partition that covers whole disk and mark as PV for administrative convenience and to take advantage of striping. if you are using vmware to learn why not add some virtual hdd to it.

rknichols 04-07-2013 09:39 AM

Your problem is that you have filled all 4 slots in the primary partition table, and that is the limit. With the MS-DOS partition table that you have, the only way to have more than 4 partitions is to have one of the primary partitions be an extended partition. Within that extended partition you could create up to 11 logical partitions before hitting the Linux limit of 15 total partitions per drive.

You cannot simply convert an ordinary partition to an extended partition. What you can do is grow your existing sda4 partition to use the rest of the disk. You won't be able to do that with gparted since it doesn't know how to grow the LVM container, but you can simply use fdisk to delete the partition and then re-create it with the same starting point and extending to the end of the disk. After doing that (and rebooting, to get the kernel to read the new partition table), you can run "pvresize /dev/sda4" to expand the PV. The space will now be available to extend your present LVM logical volumes or create new ones.


All times are GMT -5. The time now is 12:13 PM.