1. kvm扩容根分区
  2. https://blog.csdn.net/weixin_43601042/article/details/121215004
  3. https://blog.csdn.net/fangfu123/article/details/117927656
  4. qemu-img resize 1804-llvm-wangchengquan-ip-107.qcow2 +500G
  5. cat > /etc/apt/sources.list << \EOF
  6. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  7. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  8. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  9. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  10. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  11. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  12. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  13. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  14. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  15. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  16. EOF
  17. apt update
  18. sudo apt install cloud-guest-utils xfsprogs -y
  19. growpart /dev/vda 1
  20. 这里的1就是指的,对/dev/vdb这个磁盘的第一个分区进行growpart操作。
  21. xfs_growfs /dev/vda1 xfs格式)
  22. resize2fs /dev/vda1 ext4格式)
  23. resize2fs /dev/sda1
  24. debian10出现的情况:
  25. You need to remove/move /dev/sdb2 and /dev/sdb5.
  26. Use sudo cfdisk /dev/sdb to select partitions and delete/modify them.
  27. Extend a partition in a partition table to fill available space: sudo growpart /dev/sdb 1.
  28. Enlarge the mounted file system: sudo resize2fs /dev/sdb 1.
  29. ########
文档更新时间: 2023-03-30 11:45   作者:admin