Hoy vamos a ver un error que me encontrado al intentar montar un share de Azure: mount: wrong fs type, bad option, bad superblock on xxxxxxxxxxx
Cuando crear un file Share en Azure, de forma automática te deja las instrucciones o un script para poder hacer el montaje del share.
1 2 3 4 5 6 7 8 9 10 11 12 |
sudo mkdir /mnt/backupbbdd if [ ! -d "/etc/smbcredentials" ]; then sudo mkdir /etc/smbcredentials fi if [ ! -f "/etc/smbcredentials/fileshare01.cred" ]; then sudo bash -c 'echo "username=fileshare01" >> /etc/smbcredentials/fileshare01.cred' sudo bash -c 'echo "password=lNYsKGKZtTeEeuMRykaO27tNI0jQInd9O2KwRivuanP6dl7E40/44SulaW25pw8NnyBAyA==" >> /etc/smbcredentials/fileshare01.cred' fi sudo chmod 600 /etc/smbcredentials/fileshare01.cred sudo bash -c 'echo "//fileshare01.file.core.windows.net/backupbbdd /mnt/backupbbdd cifs nofail,vers=3.0,credentials=/etc/smbcredentials/fileshare01.cred,dir_mode=0777,file_mode=0777,serverino" >> /etc/fstab' sudo mount -t cifs //fileshare01.file.core.windows.net/backupbbdd /mnt/backupbbdd -o vers=3.0,credentials=/etc/smbcredentials/fileshare01.cred,dir_mode=0777,file_mode=0777,serverino,nosharesock,actimeo=30 |
El problema ha venido al ejecutar el script, donde se podía ver el siguiente error: mount: wrong fs type, bad option, bad superblock on xxxxxxx
Al principio parece como que tiene algún problema con el fileSystem, pero si se lee bien, te dice que es posible que necesite algún otro tipo de programa.
1 2 3 4 5 6 |
mount: wrong fs type, bad option, bad superblock on //fileshare01.file.core.windows.net/backupbbdd, 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 |
Pues como lo que intento montar es un cifs, pues a instalar cifs-utils con apt install cifs-utils.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
root@vm02:~# sudo apt install cifs-utils Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: ruby-rgen ruby-safe-yaml Use 'apt-get autoremove' to remove them. Suggested packages: winbind The following NEW packages will be installed: cifs-utils 0 upgraded, 1 newly installed, 0 to remove and 64 not upgraded. Need to get 86.7 kB of archives. After this operation, 262 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main cifs-utils amd64 2:6.0-1ubuntu2 [86.7 kB] Fetched 86.7 kB in 0s (227 kB/s) Selecting previously unselected package cifs-utils. (Reading database ... 98599 files and directories currently installed.) Preparing to unpack .../cifs-utils_2%3a6.0-1ubuntu2_amd64.deb ... Unpacking cifs-utils (2:6.0-1ubuntu2) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up cifs-utils (2:6.0-1ubuntu2) ... |
Instalado, ejecutamos de nuevo el script y si hacemos un df -h, veremos el share montado.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
root@vm02:~# df -h Filesystem Size Used Avail Use% Mounted on udev 16G 12K 16G 1% /dev tmpfs 3.2G 536K 3.2G 1% /run /dev/dm-3 7.8G 2.4G 5.0G 33% / none 4.0K 0 4.0K 0% /sys/fs/cgroup none 5.0M 0 5.0M 0% /run/lock none 16G 0 16G 0% /run/shm none 100M 0 100M 0% /run/user /dev/mapper/vg_mysql-mysql_data 532G 356G 153G 70% /mysql/data /dev/mapper/vg_mysql_binlog-mysql_binlogs 148G 142G 8.0K 100% /mysql/binlog /dev/mapper/vg_01-tmp 7.3G 4.4M 7.0G 1% /tmp /dev/sda2 454M 40M 388M 10% /boot /dev/mapper/vg_01-opt 2.0G 575M 1.3G 31% /opt /dev/mapper/vg_01-srv 2.0G 3.0M 1.8G 1% /srv /dev/mapper/vg_01-var 7.8G 5.7G 1.8G 77% /var /dev/sdb1 64G 91M 64G 1% /mnt //fileshare01.file.core.windows.net/backupbbdd 5.0T 720G 4.3T 15% /mnt/backupbbdd |
Saludos y espero que os sirva.