Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.

SOLVED Samba mounted storage cannot mount after kernel update

  • Hi,

    We have cloudron running on a hetzner VPS with attached block storage, all running fine with no problems. We also mount hetzner storage box space via a samba share for backups. As per the advice in the documentation this mounted via fstab using the provided info: //<samba url> /backups cifs uid=yellowtent,gid=yellowtent,user=<user>,pass=<pass>,iocharset=utf8 0 0.
    This would only work by manually installing the required kernel modules for the iocharset=utf8 option by using:

    sudo apt install --no-install-recommends linux-modules-extra-$(uname -r)

    This works fine but every time there is an automatic kernel update, updated modules are not installed automatically and as a result the samba mount fails. This results in failed backups.

    I have two questions

    1. Is there a way to automate the modules installation when kernel updates happen?
    2. Is there a way to receive failed (or even successful) backup email notifications to avoid not noticing that backups are not happening?
  • App Dev

    I have the same setup for some machines and solved it by installing apt-get install cifs-utils linux-generic instead of the extras modules. Since I've changed to that solution, the mounts never disappeared.

  • Staff

    From what I can tell the answer from @msbt is correct. The linux-generic is a meta package always pointing to the complete (including headers) latest kernel on ubuntu, so it will include and thus rebuild extra modules on update.
    The cifs-utils is simply the requirement for samba.
    I will add it to our base image installations script to ensure it is always installed, regardless what the VPS provider deems important.

    The change is at

  • App Dev

    nice, thanks @nebulon!

  • I will try to setup the samba storage box on a Hetzner Storage Box. To be on the safe side, 3 steps are necessary to get the samba storage box up and running:

    • on Ubuntu install: apt-get install cifs-utils linux-generic
    • on Ubuntu add to /etc/fstab: //<samba url> /backups cifs uid=yellowtent,gid=yellowtent,user=<user>,pass=<pass>,iocharset=utf8 0 0
    • on cloudron configure Backup storage:
      • Storage provider: Filesystem
      • Local backup directory: /backups
      • Check: Backup directory is an external EXT4 Disk
      • Check: Use hardlinks
      • Storage Format: Tarball (is rsync possible?)

    Do I miss something?

  • App Dev

    you might need to chown the /backups dir to yellowtent and reboot (or do a mount -a) to actually mount the dir before being able to back up on the remote storage. also, disable hardlinks - those do not work on the storageboxes since it's no regular ext4 fs (I think).

    update: rsync would be possible, but also without hardlinks, so not much use there to save space

  • Thanks for the answer!