Monday, 6 September 2021

Tuesday, 16 February 2021

SAMBA:- How to fix CIFS Error Mount: wrong fs type, bad option, bad superblock

Test Case:- We have tried to mount the samba share from the Linux samba-client box.


 [root@san-client ~]# findsmb

                                *=DMB

                                +=LMB

IP ADDR         NETBIOS NAME     WORKGROUP/OS/VERSION

---------------------------------------------------------------------

192.168.1.113   ANSIBLE-CONTROL [       SAMBA         ]

[root@san-client ~]#


[root@san-client ~]# smbclient -L //192.168.1.113

Enter SAMBA\root's password:

Anonymous login successful

        Sharename       Type      Comment

        ---------       ----      -------

        print$          Disk      Printer Drivers

        noc             Disk      Printer Drivers

        IPC$            IPC       IPC Service (Samba 4.10.16)

Reconnecting with SMB1 for workgroup listing.

Anonymous login successful

        Server               Comment

        ---------            -------

        Workgroup            Master

        ---------            -------

        SAMBA


[root@san-client ~]# mount -t cifs //192.168.1.113/noc /mnt -o user=sai1

mount: wrong fs type, bad option, bad superblock on //192.168.1.113/noc,

       missing codepage or helper program, or other error

       (for several filesystems (e.g. nfs, cifs) you might

       need a /sbin/mount.<type> helper program)

       In some cases useful info is found in syslog - try

       dmesg | tail or so.

[root@san-client ~]#


Solution:-

[root@san-client ~]# rpm -qa |grep cifs

[root@san-client ~]#


[root@san-client ~]# yum install cifs-utils

.....

.....

  Installing : cifs-utils-6.2-10.el7.x86_64                                                                                          1/1

  Verifying  : cifs-utils-6.2-10.el7.x86_64                                                                                          1/1


Installed:

  cifs-utils.x86_64 0:6.2-10.el7


Complete!

[root@san-client ~]#mount -t cifs //192.168.1.113/noc /mnt -o user=sai1

Password for sai1@//192.168.1.113/noc:


[root@san-client ~]# cd /mnt

[root@san-client mnt]#ls -l

total 0

-rwxr-xr-x 1 root root 0 Feb 15 22:06 abc1

-rwxr-xr-x 1 root root 0 Feb 15 22:06 abc2

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam1

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam2

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam3

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam4

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam5

[root@san-client ~]#




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.