Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How do you mount hetzner storage boxes?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How do you mount hetzner storage boxes?

drdrakedrdrake Member

I am trying to mount one at boot using webdav with the instructions given at the page (https://wiki.hetzner.de/index.php/Backup/en) but my server fails to boot.
Any help?

Comments

  • BochiBochi Member
    edited June 2016

    Maybe there are some hints in your dmesg or syslog, start looking there.

    /EDIT/
    And btw, are you sure the storage boxes are handled the same as the backup storage?!
    Maybe there is another way of authentication, as they are reachable from outside of the Hetzner network.

  • @Bochi said:
    Maybe there are some hints in your dmesg or syslog, start looking there.

    /EDIT/
    And btw, are you sure the storage boxes are handled the same as the backup storage?!
    Maybe there is another way of authentication, as they are reachable from outside of the Hetzner network.

    I think i am doing something wrong when adding this file at fstab:

    https://.your-backup.de /MOUNTPOINT davfs
    rw,uid=,gid=,file_mode=0660,dir_mode=0770 0 0

    I replaced the link, the mount point, System account with my username, system group with my username.

  • BochiBochi Member

    And again, what do the logs tell?

  • @Bochi said:
    And again, what do the logs tell?

    Where do I read the logs? Sorry for being a newbie

  • BochiBochi Member

    @Arjon said:

    @Bochi said:
    And again, what do the logs tell?

    Where do I read the logs? Sorry for being a newbie

    Check out /var/log/dmesg and /var/log/syslog at first and keep us updated.

  • FalzoFalzo Member

    did you try to mount manually before adding this to /etc/fstab to see if it works at all or gives some error messages?

    have you read the next part of the howto at hetzner?

    So that the WebDAV directory can mount automatically, you need to add the following line in the /etc/davfs2/secrets file:
    https://.your-backup.de < username >  < password >
    
  • @Falzo said:
    did you try to mount manually before adding this to /etc/fstab to see if it works at all or gives some error messages?

    have you read the next part of the howto at hetzner?

    So that the WebDAV directory can mount automatically, you need to add the following line in the /etc/davfs2/secrets file:
    > https://.your-backup.de < username >  < password >
    > 

    Yeah i have added it.

    @Bochi said:

    @Arjon said:

    @Bochi said:
    And again, what do the logs tell?

    Where do I read the logs? Sorry for being a newbie

    Check out /var/log/dmesg and /var/log/syslog at first and keep us updated.

    dmesg contains nothing. syslog contains come mail stuff. nothing else

    when i add this at fstab

    https://username.your-storagebox.de /mnt/storagebox davfs
    rw,uid=,gid=,file_mode=0660,dir_mode=0770 0 0

    my vps doesn't come online. I need to make a emergency console connect to fix it.

    note: myusername is not root.

  • BochiBochi Member
    edited June 2016

    Then now do what @Falzo told you: Try it manually and check for errors first.

    /EDIT/
    Just noticed, that you said you replaced uid and gid with your username.
    You know those parameters are for the respective IDs of the user and the group, do you?

    Thanked by 1v3ng
  • FalzoFalzo Member

    @Bochi said:
    You know those parameters are for the respective IDs of the user and the group, do you?

    which can lookup in etc/passwd if you don't exactly know ;-)

    also note that the credentials which have to be provided in secrets file has to be those for that storage box ;-)

  • @Bochi said:
    Then now do what @Falzo told you: Try it manually and check for errors first.

    /EDIT/
    Just noticed, that you said you replaced uid and gid with your username.
    You know those parameters are for the respective IDs of the user and the group, do you?
    @Falzo said:

    @Bochi said:
    You know those parameters are for the respective IDs of the user and the group, do you?

    which can lookup in etc/passwd if you don't exactly know ;-)

    also note that the credentials which have to be provided in secrets file has to be those for that storage box ;-)

    here is what i wrote on fstab:

    https://username.your-storagebox.de /mnt/storagebox davfs user,auto,uid=1000,file_mode=600,dir_mode=700 0 0

    And still the vps doesn't boot. Maybe it asks for root password while booting, i can't see because it's a vps. when i run "mount /mnt/storagebox" as the regular user (not root), it mounts just fine without any error or password.

    This is driving me crazy. I don't know how to fix it. I have tried literally everything.

  • FalzoFalzo Member

    Arjon said: when i run "mount /mnt/storagebox" as the regular user (not root), it mounts just fine without any error or password.

    thanks for telling, that might clarify that at least your settings should be right so far to begin with.

    do you have access to something like novnc for your vps where you can have at look at the startup progress?

    at which position this entry is in fstab?
    if the root-system containing the mountpoint isn't up and running before, your storagebox can not become mounted at all.

    maybe you could share the rest of your fstab to have us make further suggestions, what's going wrong?

    if you can't get over it at all, you could try some dirty workaroung like cut down on that fstab entry and add manual mount command to something like rc.local instead...

  • drdrakedrdrake Member
    edited June 2016

    @Falzo said:

    Arjon said: when i run "mount /mnt/storagebox" as the regular user (not root), it mounts just fine without any error or password.

    thanks for telling, that might clarify that at least your settings should be right so far to begin with.

    do you have access to something like novnc for your vps where you can have at look at the startup progress?

    at which position this entry is in fstab?
    if the root-system containing the mountpoint isn't up and running before, your storagebox can not become mounted at all.

    maybe you could share the rest of your fstab to have us make further suggestions, what's going wrong?

    if you can't get over it at all, you could try some dirty workaroung like cut down on that fstab entry and add manual mount command to something like rc.local instead...

    here is the full fstab:

    proc /proc proc defaults 0 0

    none /dev/pts devpts rw,gid=5,mode=620 0 0

    none /run/shm tmpfs defaults 0 0

    https://username.your-storagebox.de /mnt/storagebox davfs user,auto,uid=1000,file_mode=600,dir_mode=700 0 0

    When i remove the last entry, the system boots fine.

    edit:formatting

  • FalzoFalzo Member
    edited June 2016

    so this is an openvz container where the rootfs is mounted from outside the container and without fstab involved but directly from the hostnode.

    according to official documentation https://openvz.org/Physical_to_container#.2Fetc.2Ffstab that should be fine/intentional

    that may harden the point your fstab is worked through while your mountpoint isn't available yet, which causes the issues.

    depending on your distro you might try and have a look at /etc/rcS.d and watch out for mountall.sh which should have a prefix like S10 or something alike.
    you may try to change this to S20 or S40 or whatever makes it being running later...

    if that doesn't work as said above mount your share via rc.local instead of fstab ;-)

  • @Falzo said:
    so this is an openvz container where the rootfs is mounted from outside the container and without fstab involved but directly from the hostnode.

    according to official documentation https://openvz.org/Physical_to_container#.2Fetc.2Ffstab that should be fine/intentional

    that may harden the point your fstab is worked through while your mountpoint isn't available yet, which causes the issues.

    depending on your distro you might try and have a look at /etc/rcS.d and watch out for mountall.sh which should have a prefix like S10 or something alike.
    you may try to change this to S20 or S40 or whatever makes it being running later...

    if that doesn't work as said above mount your share via rc.local instead of fstab ;-)

    So i edited "auto" to "noauto" at fstab and added mount /mnt/storagebox to rc.local. This seems to work and file is mounted at boot. without your help and @bochi i wouldn't make it work. Thank you both! :)

    Thanked by 2Falzo Bochi
  • FalzoFalzo Member

    you're welcome, glad to hear you found a way to get it working ^^

    Thanked by 1drdrake
  • tommytommy Member

    Dont playing with fstab :) if something broken you'll thrown to recovery mode.

    Better put that script on cronjob to check every x minute

Sign In or Register to comment.