2 Star 1 Fork 0

zhrun8899 / learning-notes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
centos7通过增加硬盘扩大root分区.md 836 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhrun8899 提交于 2019-08-15 14:35 . 20190815 commit

centos7通过增加硬盘扩大root分区

http://www.360doc.com/content/18/0719/14/14679766_771661433.shtml

1.df -lh 2.fdisk -l 3.pvdisplay 4.vgdisplay 5.通过vmsphere-client向虚拟机增加硬盘

6.不重新启动识别新加的硬盘.

echo "- - -" >  /sys/class/scsi_host/host0/scan
注意,3个 - 之间要有空格,log 可以查看 /var/log/messages。

查看: fdisk -l

6.fdisk /dev/sdb

  • m:help

  • n:create new partition

​ 选择分区类型:P:主;E:扩展分区. 选择 P

​ 输入大小:start,end

  • p:察看分区类型 83 需要转换为 8e

  • t: 输入新分区类型 8e

  • w:保存退出

7.reboot

  1. pvcreate /dev/sdb1

  2. pvdisplay

10.vgdisplay

  1. lvextend -L +2.3G /dev/centos/roo
  2. df -lh
  3. xfs_growfs /dev/centos/root
  4. df -lh
1
https://gitee.com/zhrun8899/learning-notes.git
git@gitee.com:zhrun8899/learning-notes.git
zhrun8899
learning-notes
learning-notes
master

搜索帮助