Samba mounted storage cannot mount after kernel update
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
- Is there a way to automate the modules installation when kernel updates happen?
- Is there a way to receive failed (or even successful) backup email notifications to avoid not noticing that backups are not happening?
I have the same setup for some machines and solved it by installing
apt-get install cifs-utils linux-genericinstead of the extras modules. Since I've changed to that solution, the mounts never disappeared.
From what I can tell the answer from @msbt is correct. The
linux-genericis 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.
cifs-utilsis 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.
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?
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!