gpt4 book ai didi

vagrant - 使用 Parallels 和 Vagrant 的 Laravel Homestead 无法扩展更多磁盘大小

转载 作者:行者123 更新时间:2023-12-02 14:29:45 27 4
gpt4 key购买 nike

我正在尝试在 Macbook 上使用 Parallels 提供程序为我的虚拟服务器 (Homestead) 扩展更多空间。

默认磁盘大小为18GB

vagrant@homestead:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 964M 0 964M 0% /dev
tmpfs 199M 7.7M 192M 4% /run
/dev/mapper/homestead--vg-root 18G 11G 5.9G 65% /
tmpfs 994M 8.0K 994M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 994M 0 994M 0% /sys/fs/cgroup
/dev/mapper/homestead--vg-mysql--master 9.8G 234M 9.1G 3% /homestead-vg/master
10.211.55.2:/Users/orange/code 234G 234G 165G 59% /home/vagrant/code
vagrant 234G 69G 165G 30% /vagrant
tmpfs 199M 0 199M 0% /run/user/1000

我不知道为什么VM默认空间是64G,但实际上Homestead服务器只有18GB

☁  homestead-7.pvm  prl_disk_tool resize --info --units G --hdd harddisk1.hdd
Operation progress 100 %
Disk information:
SectorSize: 512
Size: 64G
Minimum: 64G
Minimum without resizing the last partition: 64G
Maximum: 2047G

Warning! The last partition cannot be resized because its file system is either not supported or damaged.
Make sure that the virtual HDD is not used by another process.
Warning! The disk image you specified has snapshots.
You need to delete all snapshots using the prlctl command line utility before resizing the disk.

查了很多资料还是没解决。

如何解决?(抱歉我的英语不好)

最佳答案

基于 reported issue on GitHub 中的讨论以下命令将有所帮助:

lvextend -r -l +100%FREE /dev/mapper/homestead--vg-root

有一个commit应该可以解决这个问题,但它尚未在标记的 Vagrant 版本中发布。

整个舞蹈的原因是 Vagrant 将 VirtualBox 磁盘打包为 .vmdk,它没有与 .vdi 相同的大小调整选项。

关于vagrant - 使用 Parallels 和 Vagrant 的 Laravel Homestead 无法扩展更多磁盘大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55896689/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com