使用 fdisk 实用程序管理磁盘

使用 fdisk 实用程序管理磁盘

我是 Fedora 新手,我想创建 8GB 磁盘,然后创建三个不同大小的分区。

-第一个分区为 8MB

-第二个分区有192MB

-第三个分区有7.8GB

但它显示磁盘大小只有 192KB。我知道 qcow2 映像会随着数据的插入而扩大到其最大大小。但我想创建上面提到的分区布局。请帮助我......!!

[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): 

相关内容