Help | Mounting error in Hetzner Storage Box
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
-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
andcredentials=/etc/backup-credentials.txt
rather than providing user/password and see what happens then, what it complains about, what is in logs etcHaven't bought a single service in VirMach Great Ryzen 2022 - 2023 Flash Sale.
https://lowendspirit.com/uploads/editor/gi/ippw0lcmqowk.png
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
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?Try with last field as 2. Also, make sure this line is at the end of /etc/fstab (or at least after / and /home).
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?
What's the OS?
Crunchbits Technical Support, Technical Writer, and Sales
Contact me at: +1 (509) 606-3569 or [email protected]
Debian 11
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.