When DIB_IMAGE_SIZE is set creating a qcow its not using full size of a allocated flavor.

asked 2019-07-24 04:19:42 -0500

Hi All,

When I create a qcow2 with a DIB_IMAGE_SIZE my VM is getting caped to this size. I want it to be resized to my flavour size, btw I am using Centos 7 image. Below we can see 80G allocated as its the flavor in fdisk, but the partitions are based on 40GB which is the DIB_IMAGE_SIZE, any help on the same would be helpful. We want image to adapt to flavor disk size.

[root@balaj-dib-delete ~]# fdisk -l

Disk /dev/vda: 85.9 GB, 85899345920 bytes, 167772160 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0698b161

Device Boot Start End Blocks Id System /dev/vda1 * 2048 1050623 524288 83 Linux /dev/vda2 1050624 9333963 4141670 82 Linux swap / Solaris /dev/vda3 9334784 83884031 37274624 8e Linux LVM

Disk /dev/mapper/vg-lv_root: 15.3 GB, 15267266560 bytes, 29818880 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/vg-lv_opt: 22.9 GB, 22900899840 bytes, 44728320 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@balaj-dib-delete ~]# df -kh Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg-lv_root 14G 1.7G 11G 13% / devtmpfs 7.8G 0 7.8G 0% /dev tmpfs 7.8G 3.3G 4.6G 42% /dev/shm tmpfs 7.8G 17M 7.8G 1% /run tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/vda1 488M 134M 319M 30% /boot /dev/mapper/vg-lv_opt 21G 1.2G 19G 6% /opt tmpfs 1.6G 0 1.6G 0% /run/user/0 [root@balaj-dib-delete ~]#

rgds Balaji K

edit retag flag offensive close merge delete

Comments

Found the issue and fixed the same. Its unused space that was present and we need to resize the disk using linux disk resize options on bootup to include those space.

bkannada gravatar imagebkannada ( 2019-08-23 05:09:24 -0500 )edit