tar*_*yte 53 partition ubuntu vmware
我正在使用 vmware fusion 在 Mac 上将 Ubuntu Desktop 14.04 作为 VM 运行。我遇到空间警告问题,现在想从 20GB 扩展到 200GB。
我关闭了虚拟机,在 vmware 端增加了分配的磁盘空间:
然后它警告我应该增加来宾 VM 中的分区大小,这很不幸,因为我希望这会是自动的。
查看 Ubuntu 内部的磁盘使用分析器,它目前只能看到原始的 20 GB。如何将其增加到我分配的 200 GB?
我正在寻找比这里发布的更好的方向。
从Disks应用程序中,我看到:

小智 38
您不需要 Live CD 即可使用此功能。我基本上总结了这里给出的其他答案:
sudo apt-get install gparted在终端中执行安装 gpartedsudo gparted从终端打开小智 37
从 Ubuntu(在 VM 中)gparted通过sudo apt-get install gparted在终端中执行安装。
gparted从终端或从破折号打开。然后扩展您的磁盘,也许您可能需要移动磁盘末尾的扩展分区。
MSS*_*MSS 12
您应该首先删除分区和可用空间之间的所有分区。您可以使用parted命令来完成。
如果您没有使用它们,请安装 parted:
sudo apt-get install cloud-guest-utils
Run Code Online (Sandbox Code Playgroud)关闭交换。我们要删除它的分区!
sudo swapoff -a
Run Code Online (Sandbox Code Playgroud)sudo parted。获取分区列表print all:
(parted) print all
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 752GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 528GB 528GB primary ext4 boot
2 528GB 537GB 8588MB extended
5 528GB 537GB 8588MB logical linux-swap(v1)
Run Code Online (Sandbox Code Playgroud)删除无根分区rm (part-index):
(parted) rm 5
Warning: Partition /dev/vda5 is being used. Are you sure you want to continue?
Yes/No? yes
Error: Partition(s) 5 on /dev/vda have been written, but we have been unable to
inform the kernel of the change, probably because it/they are in use. As a
result, the old partition(s) will remain in use. You should reboot now before
making further changes.
Ignore/Cancel? C
(parted) print all
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 752GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 528GB 528GB primary ext4 boot
2 528GB 537GB 8588MB extended
(parted) rm 2
Error: Partition(s) 5 on /dev/vda have been written, but we have been unable to
inform the kernel of the change, probably because it/they are in use. As a
result, the old partition(s) will remain in use. You should reboot now before
making further changes.
Ignore/Cancel? C
(parted) print all
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 752GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 528GB 528GB primary ext4 boot
Run Code Online (Sandbox Code Playgroud)这些命令适用于 ubuntu 16.04(NONE LVM)并且机器在 kvm 上运行:
sudo growpart /dev/vda 1
sudo resize2fs /dev/vda1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
240218 次 |
| 最近记录: |