Thursday, 11 February 2021

resize2fs: Bad magic number in super-block while trying to open lvm

 Note: While extending the LVM I got below errors

Case:-

 OS: CentOS 7.9

Error:-

resize2fs 1.42.9 (28-Dec-2013)

resize2fs: Bad magic number in super-block while trying to open /dev/mapper/zgroup-stf1

Couldn't find valid filesystem superblock.


FYI,








Now, I want to extend the LVM(mta1) +100MB.













As per the Centos 7 default filesystem is xfs.

xfs file system support only extend not reduce. So if you want to resize the filesystem use xfs_growfs rather than resize2fs.

xfs_growfs /dev/mapper/zgroup-stf1 

Note: 

For ext4 filesystem use, we can use the resize2fs

resize2fs /dev/mapper/zgroup-stf1 














Tuesday, 9 February 2021

osboxes VM:-(CentOS7) - Cannot find a valid baseurl for repo: base/7/x86_64

 I have observed this error on CentOS7 VM.  I have tried a couple of things and finally, I have fixed them with the below steps. 


FYI,








#yum update //i got below error








Then I will execute the below commands,

[root@osboxes]# ONBOOT=no

[root@osboxes]# dhclient

[root@osboxes]# yum update













I hope it will help you.