Search This Blog

Thursday 15 December 2016

resize2fs: Bad magic number in super-block or Couldn't find valid filesystem superblock.

Above error due to filesystem type is not EXT3/EXT4. Its belonging to xfs file type.

To see the info of your block device, use xfs_info.

$ xfs_info /dev/mapper/centos-root  meta-data=/dev/mapper/centos-root isize=256    agcount=4, agsize=1210880 blks           =                       sectsz=512   attr=2, projid32bit=1           =                       crc=0  data     =                       bsize=4096   blocks=4843520, imaxpct=25           =                       sunit=0      swidth=0 blks  naming   =version 2              bsize=4096   ascii-ci=0 ftype=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  

$  xfs_growfs /dev/mapper/centos-root  meta-data=/dev/mapper/centos-root isize=256    agcount=4, agsize=1210880 blks           =                       sectsz=512   attr=2, projid32bit=1           =                       crc=0  data     =                       bsize=4096   blocks=4843520, imaxpct=25           =                       sunit=0      swidth=0 blks  naming   =version 2              bsize=4096   ascii-ci=0 ftype=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


Using just xfs_growfs, the filesystem will be increased to its maximum available size. If you want to only increase for a couple of blocks, use the -D option.

No comments:

Post a Comment