VMware Centos linux system expansion

Use the command

df  fdisk  pvcreate   pvdisplay    vgdisplay    vgextend    lvdisplay    lvextend  resize2fs

 When re-recognizing the size of the error: resize2fs / dev / mapper / centos-root  

[root@localhost ~]# resize2fs  /dev/mapper/centos-root
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/centos-root
Couldn't find valid filesystem superblock.
[root@localhost ~]# 

Check the file type, I was xfs type, you need to identify with xfs_drowfs

[root@localhost ~]# cat /etc/fstab | grep centos-root
/dev/mapper/centos-root /                       xfs     defaults        0 0
[root@localhost ~]# 
[Root @ localhost ~] # xfs_growfs / dev / mapper / centos-root # re-identify the size centos-root size

  

 

Reference article:    

 

Guess you like

Origin www.cnblogs.com/dafei4/p/11116268.html