Centos 6.5 root expansion

1. Add a hard disk
2. fdisk -l (view the location of the newly added hard disk)
3. fdisk /dev/sdb (create partition)
4. mkfs -t ext4 -c /dev/sdb1 (format partition)
5. pvcreate /dev/sdb1 (create pv)
6. vgextend /dev/VolGroup /dev/sdb1 (extended vg)
7. lvextend -L +4096M /dev/VolGroup/lv_root (extend the lv where the root partition is located)
8. resize2fs /dev/VolGroup/lv_root (refresh root partition)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325281651&siteId=291194637