Access zfs-snapshots inside lxc container

Hi,

Maybe you could try (I do not know if it work or not) to add a new bindmount disk to your CT using the snapshot path: /export/data/.zfs/snapshot/zfs-auto-snap_05-2019-02-22-.....

Good luck / Bafta !
Got it,when will be on PC will try,thx
 
  • Like
Reactions: guletz
I cant add it. Making error


run_buffer: 314 Script exited with status 2
lxc_init: 798 Failed to run lxc.hook.pre-start for container "107"
__lxc_start: 1945 Failed to initialize container "107"
TASK ERROR: startup for container '107' failed

Any ideas how to test it differently? i see the snapshots on the host and in the CT. Should i idk try a new CT with new installation? thx
 
I don't know why,but it seems that one of the snapshot is broken. Cant open on samba and error on enter in host:
I could be because of the USB HDD MIRROR that is on the pool. It reported some errors before. I need to reformat i guess and try again.
Bash:
root@neo:/hoax_bck/hoax_bck_data/.zfs/snapshot# ls -la
total 1
drwxrwxrwx 2 root root 2 May 26 00:36 .
drwxrwxrwx 1 root root 0 May 25 19:31 ..
drwxrwxrwx 1 root root 0 May 26 00:31 zfs-auto-snap_frequent-2021-5-25-2239
drwxr-xr-x 4 root root 4 May 25 21:23 zfs-auto-snap_frequent-2021-5-25-2241
drwxrwxrwx 1 root root 0 May 26 14:21 zfs-auto-snap_frequent-2021-5-25-2242
root@neo:/hoax_bck/hoax_bck_data/.zfs/snapshot# chmod 777 &
[1] 484
root@neo:/hoax_bck/hoax_bck_data/.zfs/snapshot# chmod: missing operand after ‘777’
Try 'chmod --help' for more information.
^C
[1]+  Exit 1                  chmod 777
root@neo:/hoax_bck/hoax_bck_data/.zfs/snapshot# chmod 777 *
chmod: changing permissions of 'zfs-auto-snap_frequent-2021-5-25-2241': Read-only file system
root@neo:/hoax_bck/hoax_bck_data/.zfs/snapshot# ls -la
total 1
drwxrwxrwx 2 root root 2 May 26 00:36 .
drwxrwxrwx 1 root root 0 May 25 19:31 ..
drwxrwxrwx 1 root root 0 May 26 00:31 zfs-auto-snap_frequent-2021-5-25-2239
drwxr-xr-x 4 root root 4 May 25 21:23 zfs-auto-snap_frequent-2021-5-25-2241
drwxrwxrwx 1 root root 0 May 26 14:21 zfs-auto-snap_frequent-2021-5-25-2242
 
it seems i loose access to the snapshots which are made before the reboot of the container.
samba then of course also has no more previous snapshots beyond the ones made after the reboot

the dateformat ist:
( excerpt from smb.conf )
Code:
    shadow: snapdir = .zfs/snapshot
    shadow: localtime = no
    shadow: sort = desc
    shadow: format = ly_%y%m%d%H%M%S
    shadow: snapprefix = ^auto_\(manual\)\{0,1\}\(month\)\{0,1\}\(week\)\{0,1\}\(dai\)\{0,1\}\(hour\)\{0,1\}$
    shadow: delimiter = ly_


listing from the proxmox host
Bash:
root@pve0:/rpool/ssd-1/subvol-450-disk-1/.zfs/snapshot# ls -l
total 8
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_daily_211114000351
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_daily_211115000154
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_daily_211116000147
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_daily_211117000212
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_daily_211118000139
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_daily_211119000130
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211118090132
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211118120146
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211118150209
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211118180126
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211118210149
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211119030146
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211119060124
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_manually_211104174228
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_weekly_211107000159
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_weekly_211114000137
root@pve0:/rpool/ssd-1/subvol-450-disk-1/.zfs/snapshot#

Listing from inside the Container where the pve0:/rpool/ssd-1/subvol-450-disk-1/ fs is mounted as /tank
Bash:
root@lxfs:/tank/.zfs/snapshot# ll
ls: cannot access 'auto_daily_211115000154': Too many levels of symbolic links
ls: cannot access 'auto_hourly_211118090132': Too many levels of symbolic links
ls: cannot access 'auto_daily_211117000212': Too many levels of symbolic links
ls: cannot access 'auto_weekly_211107000159': Too many levels of symbolic links
ls: cannot access 'auto_hourly_211118180126': Too many levels of symbolic links
ls: cannot access 'auto_hourly_211118210149': Too many levels of symbolic links
ls: cannot access 'auto_daily_211116000147': Too many levels of symbolic links
ls: cannot access 'auto_daily_211118000139': Too many levels of symbolic links
ls: cannot access 'auto_daily_211114000351': Too many levels of symbolic links
ls: cannot access 'auto_hourly_211118150209': Too many levels of symbolic links
ls: cannot access 'auto_hourly_211118120146': Too many levels of symbolic links
ls: cannot access 'auto_manually_211104174228': Too many levels of symbolic links
ls: cannot access 'auto_weekly_211114000137': Too many levels of symbolic links
total 2
d????????? ? ?    ?    ?            ? auto_daily_211114000351
d????????? ? ?    ?    ?            ? auto_daily_211115000154
d????????? ? ?    ?    ?            ? auto_daily_211116000147
d????????? ? ?    ?    ?            ? auto_daily_211117000212
d????????? ? ?    ?    ?            ? auto_daily_211118000139
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_daily_211119000130
d????????? ? ?    ?    ?            ? auto_hourly_211118090132
d????????? ? ?    ?    ?            ? auto_hourly_211118120146
d????????? ? ?    ?    ?            ? auto_hourly_211118150209
d????????? ? ?    ?    ?            ? auto_hourly_211118180126
d????????? ? ?    ?    ?            ? auto_hourly_211118210149
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211119030146
drwxr-xr-x 3 root root 3 Oct 28 17:00 auto_hourly_211119060124
d????????? ? ?    ?    ?            ? auto_manually_211104174228
d????????? ? ?    ?    ?            ? auto_weekly_211107000159
d????????? ? ?    ?    ?            ? auto_weekly_211114000137


the dateformat ist:
( excerpt from smb.conf )
Code:
    shadow: snapdir = .zfs/snapshot
    shadow: localtime = no
    shadow: sort = desc
    shadow: format = ly_%y%m%d%H%M%S
    shadow: snapprefix = ^auto_\(manual\)\{0,1\}\(month\)\{0,1\}\(week\)\{0,1\}\(dai\)\{0,1\}\(hour\)\{0,1\}$
    shadow: delimiter = ly_
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!