Giter VIP home page Giter VIP logo

Comments (5)

hadfl avatar hadfl commented on July 17, 2024

well, if snapshots are created by znapzend they should not be 'hold'.

in your specific setup where snaphots not created by znapzend exist, you might want to have a look at the so called 'oracleMode' feature which will exactly do what you are asking for: https://github.com/oetiker/znapzend/blob/master/doc/znapzend.pod

from znapzend.

rottegift avatar rottegift commented on July 17, 2024

What if one wants to temporarily avoid destruction of a particular snapshot ?

(And what if one wants to temporarily mount or clone a particular snapshot ?)

from znapzend.

oetiker avatar oetiker commented on July 17, 2024

@rottegift how about determining holds while scanning the snapshots and then excluding them from destruction ? would this be a worthy task for your first contribution ?

from znapzend.

odoucet avatar odoucet commented on July 17, 2024

Hello, I have the same issue with a zfs clone/promote on a volume : snapshot used is locked on purpose, and znapzend cannot delete it (happily !), but then snaps are accumulating on it.

For this exact matter, we can find locked snapshot by using "zfs get origin -r $zpoolname", or snaps with "zfs get clones" != ''

For snaps locked by "zfs hold", property 'userrefs' is incremented, so we need to check all snaps where property userrefs > 0.

I checked the value for a snapshot that is the origin of a clone, and userrefs = 0.
So we need to exclude snaps based on both properties : "zfs get clones,userrefs -r $zpoolName" to grab everything we need.

I will be happy to contribute on this, even if I'm not particularly fluent in Perl. Can you help me a bit and tell me where would it be nicer to add this check ?

from znapzend.

oetiker avatar oetiker commented on July 17, 2024

I would assume that the place where we get the list of existing snapshots would be the right place to get these attributes as well so that we are able to skip the 'special' snapshots ... lib/ZnapZend/ZFS.pm#L142

from znapzend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.