我调整了一个 qcow2 图像的大小以增加它的大小,在这个过程中我传递了错误的设备来扩展,现在 virt-filesystems 显示:
[root@node3 35]# virt-filesystems --long --parts --blkdevs -h -a disk.0
Name Type MBR Size Parent
/dev/sda1 partition 83 243M /dev/sda
/dev/sda2 partition 05 1.0K /dev/sda
/dev/sda5 partition 8e 9.8G /dev/sda
/dev/sda device - 40G -
我想调整 /dev/sda5 的大小以从 /dev/sda 中取出所有 40G,但在虚拟机 fdisk、lv 工具中,parted 没有显示该空间,我有点迷路了。
任何帮助或指导表示赞赏。
磁盘输出:
root@ubuntu:~# fdisk -l
Disk /dev/vda: 42.9 GB, 42949672960 bytes
16 heads, 63 sectors/track, 83220 cylinders, total 83886080 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 identifier: 0x000bd79d
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 499711 248832 83 Linux
/dev/vda2 499712 83883647 41691968 5 Extended
/dev/vda5 499714 20967425 10233856 8e Linux LVM
Disk /dev/mapper/ubuntu--vg-root: 9940 MB, 9940500480 bytes
255 heads, 63 sectors/track, 1208 cylinders, total 19415040 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 identifier: 0x00000000
Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table
Disk /dev/mapper/ubuntu--vg-swap_1: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders, total 1048576 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 identifier: 0x00000000
Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table