fdisk 刪除 vda5 及 vda6,重新產生 vda5 及 vda6,此例中新建的 vda5 大小為 80M。
[root@kvm7 ~]# fdisk /dev/vda
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/vda: 4294 MB, 4294967296 bytes, 8388608 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: 0x0009165e
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 411647 204800 83 Linux
/dev/vda2 411648 7579647 3584000 8e Linux LVM
/dev/vda3 7579648 7845887 133120 8e Linux LVM
/dev/vda4 7845888 8388607 271360 5 Extended
/dev/vda5 7847936 7888895 20480 82 Linux swap / Solaris
/dev/vda6 7890944 8388607 248832 8e Linux LVM
Command (m for help): d
Partition number (1-6, default 6):
Partition 6 is deleted
Command (m for help): d
Partition number (1-5, default 5):
Partition 5 is deleted
Command (m for help): p
Disk /dev/vda: 4294 MB, 4294967296 bytes, 8388608 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: 0x0009165e
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 411647 204800 83 Linux
/dev/vda2 411648 7579647 3584000 8e Linux LVM
/dev/vda3 7579648 7845887 133120 8e Linux LVM
/dev/vda4 7845888 8388607 271360 5 Extended
Command (m for help): n
All primary partitions are in use
Adding logical partition 5
First sector (7847936-8388607, default 7847936):
Using default value 7847936
Last sector, +sectors or +size{K,M,G} (7847936-8388607, default 8388607): +80M
Partition 5 of type Linux and of size 80 MiB is set
Command (m for help): t
Partition number (1-5, default 5):
Hex code (type L to list all codes): 82
Changed type of partition 'Linux' to 'Linux swap / Solaris'
Command (m for help): n
All primary partitions are in use
Adding logical partition 6
First sector (8013824-8388607, default 8013824):
Using default value 8013824
Last sector, +sectors or +size{K,M,G} (8013824-8388607, default 8388607):
Using default value 8388607
Partition 6 of type Linux and of size 183 MiB is set
Command (m for help): t
Partition number (1-6, default 6): 8e
Partition number (1-6, default 6):
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): p
Disk /dev/vda: 4294 MB, 4294967296 bytes, 8388608 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: 0x0009165e
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 411647 204800 83 Linux
/dev/vda2 411648 7579647 3584000 8e Linux LVM
/dev/vda3 7579648 7845887 133120 8e Linux LVM
/dev/vda4 7845888 8388607 271360 5 Extended
/dev/vda5 7847936 8011775 81920 82 Linux swap / Solaris
/dev/vda6 8013824 8388607 187392 8e Linux LVM
Command (m for help): w