如何在Homestead Vagrant上增加存储空间?

时间:2019-03-22 20:42:01

标签: ubuntu vagrant virtualbox homestead

我需要学习如何在我的宅基地流浪者系统上增加Ubuntu的所有分区的存储大小。

目前,我在Homestead / Vagrant / VMBox安装中遇到了一个令人烦恼的存储空间不足的问题。在阅读了一些在线教程之后,我相信我已经收集了一些有关我需要做什么的证据。

直到现在,我已经可以执行以下操作:

  1. 通过“ clonehd”功能的“ .vdi”扩展区,创建文件“ C:\ Users \ MyUser \ VirtualBox VMs \ homestead-7 \ ubuntu-18.04-amd64-disk001.vmdk”的副本使用以下命令在CMD上选择“ VBoxManage”:
C:\Program Files\Oracle\VirtualBox> VBoxManage clonehd "C:\Users\MyUser\VirtualBox VMs\homestead-7\ubuntu-18.04-amd64-disk001.vmdk" "C: \BKP_HD_VAGRANT\cloned.vdi" --format vdi
  1. 使用以下命令通过CMD增加VDI复制的容量:
C:\Program Files\Oracle\VirtualBox> VBoxManage modifyhd "C:\bkp_hd_vagrant\cloned.vdi" --resize 209715
  1. 将VMBox中的Sata Controller存储引用更改为新文件“ cloned.vdi”

很遗憾,从现在开始,我一直无法继续。 我尝试执行以下教程中列出的步骤,但是没有任何效果。

https://laracasts.com/discuss/channels/guides/a-guide-to-extending-homestead-storage-capacity

但是,我的配置与本指南中的图像所显示的非常不同,如下所示。

Disk /dev/sda: 195.3 GiB, 209715200000 bytes, 409600000 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
Disklabel type: dos
Disk identifier: 0xeb0a5011

Device     Boot Start       End   Sectors Size Id Type
/dev/sda1  *     2048 134215679 134213632  64G 8e Linux LVM


Disk /dev/mapper/vagrant--vg-root: 63 GiB, 67687677952 bytes, 132202496 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 /dev/mapper/vagrant--vg-swap_1: 980 MiB, 1027604480 bytes, 2007040 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
Filesystem                     1K-blocks      Used Available Use% Mounted on
udev                             4053320         0   4053320   0% /dev
tmpfs                             816832      6504    810328   1% /run
/dev/mapper/vagrant--vg-root    64800356  10692068  50786844  18% /
tmpfs                            4084152         8   4084144   1% /dev/shm
tmpfs                               5120         0      5120   0% /run/lock
tmpfs                            4084152         0   4084152   0% /sys/fs/cgroup
vagrant                        109370364  97896548  11473816  90% /vagrant
home_vagrant_code              976629756 146938732 829691024  16% /home/vagrant/code
home_vagrant_backup            976629756 146938732 829691024  16% /home/vagrant/backup
home_vagrant_backup_importacao 976629756 146938732 829691024  16% /home/vagrant/backup_importacao
tmpfs                             816828         0    816828   0% /run/user/1000

Welcome to fdisk (util-linux 2.31.1).
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/sda: 195.3 GiB, 209715200000 bytes, 409600000 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
Disklabel type: dos
Disk identifier: 0xeb0a5011

Device     Boot Start       End   Sectors Size Id Type
/dev/sda1  *     2048 134215679 134213632  64G 8e Linux LVM

我需要扩展分区的大小,以便流浪汉可以使用新的“ cloned.vdi”文件上可用的所有大小。

有人会知道我应该怎么做才能适应本指南,以便能够考虑到我目前的情况来解决我的问题?

0 个答案:

没有答案