You can Watch all our Tutorials and Training Videos on our YouTube Channel for Free! Subscribe Now!

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

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.