Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot LXC with mounted CIFS #125

Closed
Shotte opened this issue Apr 15, 2024 · 13 comments
Closed

Snapshot LXC with mounted CIFS #125

Shotte opened this issue Apr 15, 2024 · 13 comments
Assignees
Labels
Resolved Resolved PR or Issue

Comments

@Shotte
Copy link

Shotte commented Apr 15, 2024

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!

EDIT:
Fix by @Shotte

@BassT23
Copy link
Owner

BassT23 commented Apr 16, 2024

I will have a look ;)

@BassT23 BassT23 self-assigned this Apr 16, 2024
@BassT23 BassT23 added bug Something isn't working feature-request New feature or request labels Apr 16, 2024
@pythongod
Copy link
Contributor

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

@Shotte
Copy link
Author

Shotte commented Apr 23, 2024

@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
Copy link
Owner

BassT23 commented Apr 24, 2024

@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
Copy link
Contributor

pythongod commented Apr 24, 2024

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
Copy link
Author

Shotte commented Apr 24, 2024

@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
Copy link
Owner

BassT23 commented Apr 24, 2024

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

What we found out:

  • cifs mount in previligated lxc with fstab in the lxc, there is no problem.
  • if the storage is mounted in Proxmox conf, there are issues with snapshot.

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
Copy link
Author

Shotte commented Apr 24, 2024

@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 BassT23 added Medium Medium priority and removed bug Something isn't working labels Apr 24, 2024
@BassT23
Copy link
Owner

BassT23 commented Apr 24, 2024

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

This comment has been minimized.

@github-actions github-actions bot added the stale label Jun 24, 2024
@BassT23 BassT23 removed the stale label Jun 25, 2024
@github-actions github-actions bot added the stale label Aug 25, 2024
Repository owner deleted a comment from github-actions bot Sep 9, 2024
@BassT23 BassT23 removed the stale label Sep 9, 2024

This comment was marked as off-topic.

@github-actions github-actions bot added the stale label Nov 9, 2024
@BassT23 BassT23 removed the stale label Nov 12, 2024
@Shotte
Copy link
Author

Shotte commented Dec 9, 2024

@BassT23 meanwhile, I used the folling workaround:

  1. open your lxc containter conf file (e.g. at /etc/pve/lxc/.conf
  2. change any cifs mountpoint entry to the following:
lxc.mount.entry: /mnt/pve/nas-musik media/musik none bind,rw 0 0
lxc.mount.entry: /mnt/pve/nas-videos media/videos none bind,rw 0 0
...
  1. restart lxc container

This works for me witout any issues. Thus there is no need any more for me that "the ultimate updater" must be fixed.

@BassT23
Copy link
Owner

BassT23 commented Dec 9, 2024

Thanks for the hint 😉
Will tryout also 😎

@BassT23 BassT23 added Resolved Resolved PR or Issue and removed feature-request New feature or request Medium Medium priority labels Dec 9, 2024
@BassT23 BassT23 closed this as completed Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolved Resolved PR or Issue
Projects
None yet
Development

No branches or pull requests

3 participants