1T的SSD, proxmox 安装完后默认分配给了 local 目录100G,local-lvm 是900G
由于虚拟机备份文件VZDump默认是存储到local目录的,再加上上传的IOS镜像,100G很经常不够用,那怎么扩容增加空间呢?
首先 fdisk -l 命令,查看/dev/mapper/pve-root大小,下边这个是我的
Disk /dev/mapper/pve-root: 96 GiB, 103079215104 bytes, 201326592 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
然后对 /dev/mapper/pve-root 扩容,命令如下,即增加1G的空间
lvextend -L +1G /dev/mapper/pve-root
root@xxx:/# lvextend -L +1G /dev/mapper/pve-root
Size of logical volume pve/root changed from 96.00 GiB (24576 extents) to 97.00 GiB (24832 extents).
Logical volume pve/root successfully resized.
执行后实际大小其实是还不会变化的,还需要下边的命令, 作用是执行上边的扩容操作
resize2fs /dev/mapper/pve-root
root@xxx:/# resize2fs /dev/mapper/pve-root
resize2fs 1.44.5 (15-Dec-2018)
Filesystem at /dev/mapper/pve-root is mounted on /; on-line resizing required
old_desc_blocks = 12, new_desc_blocks = 13
The filesystem on /dev/mapper/pve-root is now 25690112 (4k) blocks long.
以上操作结束,就可以在pve的web ui上看到空间的增加了
哈哈。我是反过来,32G的PVE,娱乐性质。发现第一个local分区太大,只放几个linux,1G就够。不过我看到网上有合并分区的,楼主可以研究下