Cent OS 7 Re-partition of allocated disk

0

I was trying to install SolusVM KVM slave on centos 7, the Datacenter provided me operating system having partition as I explained below, for installing KVM Slave I need PE Size 32MB from default size of 4MB. The whole disk in the pre-config server has been allocated and there is no free space left.

Is there any option using which I can change the PE from 4MB of default volume group vg to 32MB?

These are my system partition details:

Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/vg-root  2.7T  3.7G  2.6T   1% /
devtmpfs              12G     0   12G   0% /dev
tmpfs                 12G     0   12G   0% /dev/shm
tmpfs                 12G   50M   12G   1% /run
tmpfs                 12G     0   12G   0% /sys/fs/cgroup
/dev/mapper/vg-tmp   976M  2.8M  906M   1% /tmp
/dev/sda2            243M  166M   64M  73% /boot
tmpfs                2.4G     0  2.4G   0% /run/user/0

and volume groups as:

 --- Volume group ---
 VG Name               vg
 System ID
 Format                lvm2
 Metadata Areas        1
 Metadata Sequence No  4
 VG Access             read/write
 VG Status             resizable
 MAX LV                0
 Cur LV                3
 Open LV               3
 Max PV                0
 Cur PV                1
 Act PV                1
 VG Size               2.73 TiB
 PE Size               4.00 MiB
 Total PE              715333
 Alloc PE / Size       715317 / 2.73 TiB
 Free  PE / Size       16 / 64.00 MiB
 VG UUID               efYAtj-6gT5-42wf-7xyH-pQoD-Rxjf-xK5eaS

and fdisk -l as:

Disk /dev/sda: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/vg-root: 2986.5 GB, 2986499637248 bytes, 5833007104 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/vg-swap: 12.7 GB, 12683575296 bytes, 24772608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/vg-tmp: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

I also have the option of sysrcd 4.3.1 from the data center, If resizing is not possible from the current CentOS then can I do so using sysrcd 4.3.1 and how?

centos
kvm-virtualization
centos7
partition
asked on Server Fault Jan 28, 2018 by Sanjeet Pal Singh

1 Answer

1

If you would have done some research, you might find existing questions such as How important is PE Size for KVM virtualization? That was also in a VM host workload, it fact it also was SolusVM. The reason for doing so was the limit on LVM1 extents, which is not a limitation anymore with LVM2. 32MB is probably still a good size, but it may not be strictly necessary.

Also see How to change Volumegroup PE size? Basically, re-create the VG with the desired size.

I recommend asking for separate LUNs for data and creating additional volume groups. When your data is not on the OS VG it is possible to re-create the VGs as desired. It also is easier to swing the data to a different host, you can even change the OS distribution this way if they both can use LVM.

answered on Server Fault Jan 28, 2018 by John Mahowald

User contributions licensed under CC BY-SA 3.0