我Ubuntu 14.04.2 LTS
在 中运行(32 位)VMware Workstation 10.0.3 build-1895310
。我刚刚修改了虚拟机设置,将硬盘从20 GB到30 GB。因此我想用这些额外的10 GB我刚刚补充道。
fdisk /dev/sda
当尝试使用和作为命令创建新分区时n
,我必须指定此新分区的大小。我尝试了以下值:
Last cylinder, +cylinders or +size{K,M,G} (2612-3916, default 3916): `10G`
Value out of range.
Last cylinder, +cylinders or +size{K,M,G} (2612-3916, default 3916): `9G`
Value out of range.
Last cylinder, +cylinders or +size{K,M,G} (2612-3916, default 3916): `1M`
Value out of range.
当被问及我想创建什么类型的分区时,我尝试了两个选项,e
(扩展)和p
(主),但都没有成功。因为甚至连1M
值都不起作用……一定是我遗漏了什么或做错了什么……需要做什么才能让它起作用?
fdisk /dev/sda返回此:
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): **p**
Disk /dev/sda: 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: 0x0000fba6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 2611 20458496 8e Linux LVM
还,DF-H返回:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_box0-lv_root
18G 4.4G 12G 27% /
tmpfs 503M 76K 503M 1% /dev/shm
/dev/sda1 477M 65M 387M 15% /boot
答案1
指定尺寸时必须使用 + 号。
因此对于 10 Gb
+10G