在我们lvextend扩容完之后,想动态扩容时出现错误。我们可以用以下命令来进行操作。

若不是xfs我们可以用resize2fs,这里报错了
[root@Mysql01-213-66 ~]# resize2fs -f /dev/mapper/vg_mysql0121366-LogVol01
resize2fs 1.41.12 (17-May-2010)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/vg_mysql0121366-LogVol01
Couldn't find valid filesystem superblock.
[root@Mysql01-213-66 ~]# xfs_growfs /dev/mapper/vg_mysql0121366-LogVol01
meta-data=/dev/mapper/vg_mysql0121366-LogVol01 isize=256    agcount=4, agsize=524288 blks
         =                       sectsz=512   attr=2, projid32bit=0
data     =                       bsize=4096   blocks=2097152, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 2097152 to 7077888
[root@Mysql01-213-66 ~]# df -h
Filesystem                            Size  Used Avail Use% Mounted on
/dev/mapper/vg_mysql0121366-LogVol02  7.7G  2.6G  4.8G  35% /
tmpfs                                 495M     0  495M   0% /dev/shm
/dev/sda1                             194M   29M  155M  16% /boot
/dev/mapper/vg_mysql0121366-LogVol01   27G  3.1G   24G  12% /data