alpine虚拟机扩容

  • 关机 + 删除快照
  • 设置-硬盘-扩展-新容量值
  • 开机
  • 分配

    -------------- 手撸 ------------------
    sudo fdisk -l /dev/sda		# 查看所有分区
    sudo fdisk /dev/sda			# 分区编辑模式
    p		# 打印分区
    d		# 删除分区
    n		# 新建分区
    w		# 保存退出
    --------------- 上工具 ----------------
    https://gist.github.com/andrewnk/ecba8448b5009eaa3ae1433c549d881d
    # after the virtual disk has already been expanded (e.g. in proxmox)
    apk add --no-cache cfdisk e2fsprogs-extra
    
    # choose partition then "Resize" > "Write" (to finalize)
    cfdisk
    
    # replace sda3 with partition you are resizing
    resize2fs /dev/sda3
  • 检查

    df -h /