我已经搜索了论坛,但找不到合适的答案:
我有一个Ubuntu Server 10.04作为KVM主机和一个来宾系统,该系统也运行10.04。主机系统使用LVM,共有三个逻辑卷,它们作为虚拟块设备提供给来宾-一个用于/,一个用于/ home和一个用于交换。来宾已分区,没有LVM。
我已经扩大了主机系统中的逻辑卷-来宾成功看到了更大的虚拟磁盘。但是,该虚拟磁盘包含一个“旧的”分区,该分区仍然具有旧的小尺寸。
fdisk -l的输出是
me@produktion:/$ LC_ALL=en_US sudo fdisk -l
Disk /dev/vda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c8ce7
Device Boot Start End Blocks Id System
/dev/vda1 * 1 3917 31455232 83 Linux
Disk /dev/vdb: 2147 MB, 2147483648 bytes
244 heads, 47 sectors/track, 365 cylinders
Units = cylinders of 11468 * 512 = 5871616 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f2bf7
Device Boot Start End Blocks Id System
/dev/vdb1 1 366 2095104 82 Linux swap / Solaris
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 32, 33) logical=(0, 43, 28)
Partition 1 has different physical/logical endings:
phys=(260, 243, 47) logical=(365, 136, 44)
Disk /dev/vdc: 225.5 GB, 225485783040 bytes
255 heads, 63 sectors/track, 27413 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00027f25
Device Boot Start End Blocks Id System
/dev/vdc1 1 9138 73398272 83 Linux
分开打印的所有输出为
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 32.2GB 32.2GB primary ext4 boot
Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 2147MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 2146MB 2145MB primary linux-swap(v1)
Model: Virtio Block Device (virtblk)
Disk /dev/vdc: 225GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 75.2GB 75.2GB primary ext4
我想要实现的是简单地增加或调整分区/ dev / vdc1的大小,以便它使用虚拟块设备/ dev / vdc提供的整个空间。问题是,当我尝试分开时,它会抱怨:
(parted) select /dev/vdc
Using /dev/vdc
(parted) print
Model: Virtio Block Device (virtblk)
Disk /dev/vdc: 225GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 75.2GB 75.2GB primary ext4
(parted) resize 1
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted's file system manipulation code is not as robust as what you'll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Start? [1049kB]?
End? [75.2GB]? 224GB
Error: File system has an incompatible feature enabled. Compatible features are has_journal, dir_index, filetype, sparse_super and large_file. Use tune2fs
or debugfs to remove features.
那我该怎么办?这是一个无头生产系统。扩展此分区的安全方法是什么?不过,我可以卸下它-因此这不是问题。
编辑:Cfdisk显示了一个小的可用空间的未分区空间,然后是分区(标记为“ boot”和Linux / ext3),然后是其余的未分区空间。删除分区并使用cfdisk再次创建分区后-cfdisk显示了一个大分区区域(这对我来说很好),并且作为文件系统类型,仅“ Linux”
Resize2fs返回此错误
resize2fs 1.41.11 (14-Mar-2010) resize2fs: Bad magic number in super-block while trying to open /dev/vdc1 Couldn't find valid filesystem superblock