resize2fs Bad magic number in super-block while trying open


resize2fs Bad magic number in super-block while trying open



You may get an error as below when you are trying to resize a logical volume on linux. Even after you extended the filesystem using lvextend. But when we do lvdisplay it will shows the correct size as you extended, but we will be getting an error as below.
[root @linux ~]# resize2fs /dev/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.

Possible reason is, the mounted filesystem would be XFS filesystem. SO resize2fs wont work for xfs filesystem, we should use xfs_growfs instead of resize2fs.
[root @linux ~]# xfs_growfs /dev/centos/root

Lets do a final check.
[root @linux ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  115G  7.0G  108G   7% /

Hope this post is useful to fix the error "resize2fs Bad magic number in super-block while trying open"


Related Content on Linux might be useful to you to improve your Linux Skills.








Keep practicing and have fun. Leave your comments if any.





Support Us: Share with your friends and groups.


Stay connected with us on social networking sites, Thank you.

resize2fs bad magic number in super-block while trying open, bad magic number in super-block, resize2fs error in linux, bad magic number in superblock linux

Post a Comment

0 Comments