BassT23 / Proxmox

Update your Proxmox VE
Other
143 stars 8 forks source link

Snapshot LXC with mounted CIFS #125

Open Shotte opened 2 months ago

Shotte commented 2 months ago

Currently I'm not able to Snapshot an LXC if a CIFS volume is mounted (but updates are still done, thus this part is fine).

A possible workaround is to unmount the CIFS volume, making a Snapshot and mount CIFS again. But this is pretty ugly work to do it maniually. Isn't it possible to change the script to this work automaically?

By the way: Thank you for this very good work!

BassT23 commented 2 months ago

I will have a look ;)

pythongod commented 2 months ago

I don't think i have this problem. Are your LXC Privileged?

Shotte commented 2 months ago

@pythongod No, they are not privileged. I have this problem. Only when I unmount CIFS mounts I can perform snapshots. Backups are no problem.

BassT23 commented 2 months ago

@pythongod No, they are not privileged. I have this problem. Only when I unmount CIFS mounts I can perform snapshots. Backups are no problem.

How did you mount the share? With fstab in container, or in cfg file from Proxmox?

pythongod commented 2 months ago

I mount with fstab and privileged lxc containers. I can double check if snapshots are being done. Edit: All LXC have 3 snapshots that are being created with this script.

Shotte commented 2 months ago

@BassT23 I mount it using the following steps:

  1. pvesm add cifs nas-software --server 192.168.xx.yy --share Software --username --password
  2. added in /etc/pve/storage.cfg for each mount "options file_mode=0777,dir_mode=0777" to make it writable for LXC
  3. pct set -mp0 /mnt/pve/nas-software,mp=/media/software

That's it. This gives me the advantage seeing the mounts in the PVE tree.

BassT23 commented 2 months ago

First thanks to @Shotte and @pythongod, all your inspiration and comments are great for failer search :)

What we found out:

I could try to unmount the mp (or better complete storage) in Proxmox, during run the updater, but now I see a problem: If the storeage is needed all the time in container, this could run in an big railure of the system #worstcase

So what I could try to do, I could ask the user during install for unmounting.

PS: I aslo use this form of mounting in an unprev container, but no snapshot support on this node for now ;)

Shotte commented 2 months ago

@BassT23 However, I'm now fine with your information because I konw now that I didn't do anything wrong regarding my configurations. Finally it is not a really big issue that you don't support it (where it is not your fault, so far as I undertstood). Many thankz to your very good work and your time. I will stay with your great piece of software ;-)

BassT23 commented 2 months ago

What I could make in the next few "days", I will build in an info, for more user information, during the updater run :)

github-actions[bot] commented 5 days ago

This issue has gone 60 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.