Help | Mounting error in Hetzner Storage Box

edited December 2022 in Help

Hey Folks,

I'm facing a issue while mounting the Hetzner box to my vps.actually the issue is it will automatically get unmounted if i restart the vps. I'll drop the exact steps that i followed when mounting the box.

Step 1
as usual install the cifs-utils
apt install cifs-utils

Step 2
*Mounting the storage box.
mount.cifs -o user=uxxxxx,pass=xxxxxx //uxxxxx.your-storagebox.de/backup /home/fsn

Step 3
*adding a line to /etc/fstab
//uxxxxx.your-storagebox.de/backup /home/fsn cifs cache=loose,iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,uid=0,gid=0,file_mode=0660,dir_mode=0770 0 0

But, It's all good untill the next reboot. I have to redo the step 2 once every reboot.

I'll drop the /var/log/syslog details as below

Dec 28 16:03:33 vps-[hostname] kernel: [    9.606965] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
Dec 28 16:03:33 vps-[hostname] kernel: [    9.609280] CIFS: VFS: \\uxxxxx.your-storagebox.de Send error in SessSetup = -13
Dec 28 16:03:33 vps-[hostname] mariadbd[610]: 2022-12-28 16:03:33 0 [Note] InnoDB: 128 rollback segments are active.
Dec 28 16:03:33 vps-[hostname] mariadbd[610]: 2022-12-28 16:03:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Dec 28 16:03:33 vps-[hostname] mariadbd[610]: 2022-12-28 16:03:33 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait .>
Dec 28 16:03:33 vps-[hostname] kernel: [    9.628950] CIFS: VFS: cifs_mount failed w/return code = -13
Dec 28 16:03:33 vps-[hostname] mariadbd[610]: 2022-12-28 16:03:33 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Dec 28 16:03:33 vps-[hostname] mount[483]: mount error(13): Permission denied
Dec 28 16:03:33 vps-[hostname] mount[483]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Dec 28 16:03:33 vps-[hostname] systemd[1]: home-fsn.mount: Mount process exited, code=exited, status=32/n/a
Dec 28 16:03:33 vps-[hostname] systemd[1]: home-fsn.mount: Failed with result 'exit-code'.
Dec 28 16:03:33 vps-[hostname] systemd[1]: Failed to mount /home/fsn.
Dec 28 16:03:33 vps-[hostname] systemd[1]: Dependency failed for Remote File Systems.

Can anyone suggest me a solution on this please?

PS : Got the file permissions as below

sudo ls -l /etc/backup-credentials.txt
-rw------- 1 root root 47 Dec 28 16:37 /etc/backup-credentials.txt

Comments

  • JabJab
    edited December 2022

    -13 should be permission denied, so maybe wrong login/password in /etc/backup-credentials.txt? Wrong format? Wrongly encoded? Some special chars that are getting split/parsed by CIFS/systemd scripts and you need to put it in quotation marks ""?

    Try manually mouting via mount.cifs and credentials=/etc/backup-credentials.txt rather than providing user/password and see what happens then, what it complains about, what is in logs etc :D

    Haven't bought a single service in VirMach Great Ryzen 2022 - 2023 Flash Sale.
    https://lowendspirit.com/uploads/editor/gi/ippw0lcmqowk.png

  • @Jab said:
    -13 should be permission denied, so maybe wrong login/password in /etc/backup-credentials.txt? Wrong format? Wrongly encoded? Some special chars that are getting split/parsed by CIFS/systemd scripts and you need to put it in quotation marks ""?

    username=uxxxxxxx
    password=xxxxxxxx

    entered as above format. nothing changed. they have mentioned that on their docs
    https://docs.hetzner.com/robot/storage-box/access/access-samba-cifs

  • edited December 2022

    EDIT- removed some wrong misleading comments from me.

    I'm reading it all wrong. My apologies.

    Can you see (after you boot) if mount /home/fsn works fine?

  • @Sanjue007 said:
    //uxxxxx.your-storagebox.de/backup /home/fsn cifs cache=loose,iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,uid=0,gid=0,file_mode=0660,dir_mode=0770 0 0

    Try with last field as 2. Also, make sure this line is at the end of /etc/fstab (or at least after / and /home).

  • @ralf said: last field as 2

    That's what I wrote first, then I realized that's only for fscking and so has no bearing here (or so I think anyways).

    @Sanjue007 - I'm very curious to see if things work WITHOUT the uid=0,gid=0 parts. That is what you're manually trying anyway. Can you test out a few iterations by removing options and see if things work?

  • @nullnothere said:

    @ralf said: last field as 2

    That's what I wrote first, then I realized that's only for fscking and so has no bearing here (or so I think anyways).

    @Sanjue007 - I'm very curious to see if things work WITHOUT the uid=0,gid=0 parts. That is what you're manually trying anyway. Can you test out a few iterations by removing options and see if things work?

    Sure.. why not. what should i remove or add?

  • skorupionskorupion Services Provider

    What's the OS?

    Crunchbits Technical Support, Technical Writer, and Sales
    Contact me at: +1 (509) 606-3569 or [email protected]

  • @skorupion said:
    What's the OS?

    Debian 11

  • @Sanjue007 said: what should i remove or add?

    Get rid of the uid=0 and gid=0 parts in the fstab entry. You don't have it in your manual command and the defaults for these parameters are 0 anyway. I suggest go the otherway from only the bare minimum essential (or nothing) to check if it works on reboot (without manual intervention) and to gradually tune/tweak with more parameters once things work.

Sign In or Register to comment.