jimsalterjrs / sanoid

These are policy-driven snapshot management and replication tools which use OpenZFS for underlying next-gen storage. (Btrfs support plans are shelved unless and until btrfs becomes reliable.)
http://www.openoid.net/products/
GNU General Public License v3.0
3.13k stars 308 forks source link

Disabled snapshots are creating snapshots anyway #303

Closed bforpc closed 5 years ago

bforpc commented 5 years ago

Hi,

in the /etc/sanoid.conf i have amongst others this:

[store/proxmox/vm-nosnap] use_template = nosnap recursive = yes and

[template_nosnap] autosnap = no autoprune = no monitor = no But sanoid create snapshots anyway. Whats wrong?

Bfo

phreaker0 commented 5 years ago

Please post your full "sanoid.conf" and please post the full output of: sanoid --verbose --cron

bforpc commented 5 years ago

Hello,

here are the outputs of the target machine (it pulls the snapshots):

./sanoid --verbose --cron INFO: taking snapshots... INFO: pruning snapshots... and the config:

` cat /etc/sanoid/sanoid.conf [store/freigaben] use_template = freigaben recursive = yes

[store/proxmox/lxc] use_template = lxc recursive = yes process_children_only = yes

[store/proxmox/vm] use_template = vm recursive = yes process_children_only = yes

[store/proxmox/lxc-data] use_template = lxc recursive = yes

#############################

templates below this line

#############################

[template_freigaben] hourly = 1 daily = 30 monthly = 3 yearly = 2 autosnap = no autoprune = yes

[template_lxc] hourly = 24 daily = 30 monthly = 12 yearly = 2 autosnap = no autoprune = yes

[template_vm] hourly = 1 daily = 30 monthly = 12 yearly = 2 autosnap = no autoprune = yes

`

bfo

phreaker0 commented 5 years ago

@bforpc So your test run didn't create any snapshots. Config looks okay, are you sure that sanoid creates snapshots on the target?

bforpc commented 5 years ago

yes ... absolutly. but i think, i had made a mistake. The configs above are from target. On source there is a zfs part, what i do not want to create snapshots, but snapshots are created anyway. I think, you asked for the config of the source machine and i post the ones from the target. Sorry, here are the configs from the source: /opt/sanoid-master/sanoid --cron --verbose INFO: cache expired - updating from zfs list. INFO: taking snapshots... taking snapshot store/proxmox/lxc-data@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-154-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-156-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-152-disk-2@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-151-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-126-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-113110-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-153-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-102-disk-2@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/freigaben/fs@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-109-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc-data/devserver7trainmobil@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-107-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-128-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-106-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc-data/devserver7@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-110-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/freigaben/temp@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/freigaben@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-154-disk-2@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-145-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-155-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/freigaben/backup/temp@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-150-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/lxc/subvol-103-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/proxmox/vm/vm-152-disk-1@autosnap_2018-12-11_13:15:50_hourly taking snapshot store/freigaben/backup@autosnap_2018-12-11_13:15:50_hourly INFO: cache expired - updating from zfs list. INFO: pruning snapshots... and here the sanoid.conf

` [store/freigaben] use_template = freigaben recursive = yes

[store/proxmox/lxc] use_template = lxc recursive = yes process_children_only = yes

[store/proxmox/vm] use_template = vm recursive = yes process_children_only = yes

[store/proxmox/lxc-data] use_template = lxc recursive = yes

[store/proxmox/vm-nosnap] use_template = nosnap recursive = yes

#############################

templates below this line

#############################

[template_freigaben] hourly = 1 daily = 30 monthly = 3 yearly = 2 autosnap = yes autoprune = yes

[template_lxc] hourly = 24 daily = 30 monthly = 12 yearly = 2 autosnap = yes autoprune = yes

[template_vm] hourly = 6 daily = 30 monthly = 12 yearly = 2 autosnap = yes autoprune = yes

[template_nosnap] autosnap = no autoprune = no monitor = no

`

As you can see, snapshots are created from store/proxmox/vm-nosnap: zfs list -t snapshot |grep "nosnap" store/proxmox/vm-nosnap@syncoid_proxmox-backup_2018-12-11:13:11:18 0B - 96K - store/proxmox/vm-nosnap/vm-154-disk-1@syncoid_proxmox-backup_2018-12-11:13:11:19 0B - 56K - and are erplicated to target.

bfo

phreaker0 commented 5 years ago

@bforpc . sanoid ran fine and didn't create any snapshots for you vm-nosnap dataset. The snapshots at the end are from the syncoid replication tool :-) Which I explained in the other issue #302

phreaker0 commented 5 years ago

I hope everything is clear to you, feel free to ask further if not.