1
i m new to fedora, I want to create 8GB disk and then want to make three partitions with different sizes.
-first partition with 8MB
-Second partition with 192MB
-Third partition with 7.8GB
but it showing disk size only 192KB. I know that qcow2 image expands as data is inserted into it upto its maximum size. but i want to create above mentioned partition layout. please help me to so .... !!
[root@localhost zzz]# qemu-img create -f qcow2 guest.qcow2 8G
Formatting 'guest.qcow2', fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 lazy_refcounts=off
[root@localhost zzz]# fdisk guest.qcow2
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xa70e1cb5.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (1-384, default 1):
Last sector, +sectors or +size{K,M,G,T,P} (1-384, default 384):
Created a new partition 1 of type 'Linux' and of size 192 KiB.
Command (m for help):
Fdisk operates on a disk, not on a disk image. You need to mount your qcow2 image as a block device. – user2313067 – 2015-08-29T13:39:39.527