Comments (16)
Looks like similar output in the daily run output:
Scrubbing of zfs pools:
starting scrub of pool 'pool0':
consult 'zpool status pool0' for the result
skipping scrubbing of pool 'zroot':
last scrubbing is 7 days ago, threshold is set to 11 days
/sbin/zfs snapshot -r pool0/home@daily-2014-02-22_03.48.08--1w ... DONE
/sbin/zfs snapshot -r zroot@daily-2014-02-22_03.48.08--1w ... DONE
NOTE: No action will be performed on 'pool0@daily-2014-02-14_04.15.58--1w'. Scrub is running on pool.
FATAL: trying to delete zfs pool or filesystem? WTF?
This is bug, we definitely don't want that.
Please report it to https://github.com/graudeejs/zfSnap/issues
Don't panic, nothing was deleted :)
from zfsnap.
Which zfSnap version is that? And what os are you running?
from zfsnap.
Sorry, those are obvious questions that I should have answered originally.
I'm using zfSnap 1.10.0 from the FreeBSD package system. Running on FreeBSD 10.0-RELEASE.
from zfsnap.
I just got exact same thing:
FATAL: trying to delete zfs pool or filesystem? WTF?
This is bug, we definitely don't want that.
Please report it to https://github.com/graudeejs/zfSnap/issues
Don't panic, nothing was deleted :)
I wonder if its due to the pool being currently scrubbed? Although i daily an hourly snapshot using zfSnap and I have had a scrub run every sunday without interference between the operations.
from zfsnap.
@GusBricker Scrubbing shouldn't impact this. Which version of zfsnap are you running, and on which OS?
from zfsnap.
1.11.1
I'm looking thru the code currently. I wonder if its because I have an identical pool mounted with a different name? I will do some debugging and report back soon.
from zfsnap.
I think I have found the problem. Its actually two problems from what I can see. First let me explain my setup which has caused this to occur. Currently I have two pools plugged in: Primary and Slave2. Slave2 is just an exact copy of primary at some instant in time (happens to be a few hours ago). Primary has an hourly snapshot being created with a ttl of 1 day.
Problem 1:
Line 180 of zfSnap (this is referencing v1.11.1 code):
if echo $i | grep -q -e '@'; then
I think that should be
Problem 2:
There needs to be a way to tell zfSnap to only look at a particular dataset. Currently it is trying to manage snapshots for both slave2 and primary. By the looks of it, zfSnap deletes the snapshots oldest to newest. I have an old snapshot on slave2 which doesn't exists on primary hence why its getting this error. For some reason I was under the impression you could pass in the dataset you wanted zfSnap to manage snapshots for, however I can't see this in the code anywhere?
from zfsnap.
@GusBricker There have been /a lot/ of changes and bugfixes to zfsnap since the 1.x code, and I believe that entire section has been rewritten.
As for your feature request: I havn't looked at the 1.x code in awhile (and I don't have the time at the moment), but I know that zfsnap 2.x can properly filter to any dataset.
Even though zfsnap 2 isn't released yet (I've been meaning to for months now), it is pretty well tested and I'm aware of only one bug (and it's portability related). Would you be adverse to giving that a try and see if fixes your bug and gives you the scanning flexibility you want? The syntax is a bit different, but is much more flexible.
---Alex
from zfsnap.
Yes I can try version 2. One question before I try it, is the snapshot naming still the same (ie will zfSnap 2 delete all my 1.11.1 created snapshots)?
from zfsnap.
@GusBricker The naming convention for snapshots is unchanged. The /only/ difference, is that the old 1.x regex's were slightly too broad, and would have matched some snapshots that zfSnap would not have created, but could (in an incredibly unlikely scenario) have been named manually by a sysadmin with a twisted sense of humor.
So, you should have no problems.
---Alex
from zfsnap.
Though, as with anything, I recommend using the -n (dry-run) option as you get used to the new syntax.
from zfsnap.
Ok, I will try it out tomorrow afternoon, definitely with dry-run enabled.
from zfsnap.
I just implemented v2.0.0beta1 on our system and tried it out. It all seems to work. With my two pools connected (primary and slave2), I can let zfsnap cleanup snapshots on primary and it no longer affects slave2's snapshots. :)
Nice work.
from zfsnap.
@GusBricker Excellent. I'm glad it resolved your problems. :-)
---Alex
from zfsnap.
Whoops. Just realized you didn't originally open the ticket...
@rcsheets Is upgrading to the latest beta an option for you?
---Alex
from zfsnap.
Closing, as this seems to be resolved in the 2.x codebase.
---Alex
from zfsnap.
Related Issues (20)
- Argument list too long while deleting old snapshots
- Possibly relying on createtxg and guid properties HOT 4
- smb.conf for zfsnap HOT 1
- Request: Add support for a pre- and post-script HOT 4
- How do I use zfsnap to backup snapshots of one pool to another? HOT 2
- daily snapshots generated, which I never set up HOT 4
- How to use xPERIODICx scripts? HOT 1
- Wanted: new maintainer HOT 7
- zfSnap -d command is not working HOT 2
- zfsnap_delete periodic script needs filesystem arguments
- Make prefixes not need - at the end HOT 3
- Disable filtering when destroying HOT 1
- [feature] Add an option to store TTL as ZFS property - instead of being part of the snapshot name HOT 1
- FATAL: trying to delete zfs pool or filesystem? WTF?
- redirection to stderr prevents use in systemd-services HOT 6
- Recursive snapshot without parent directory
- Is this still an active project? HOT 3
- Delete any snapshots that have expired? HOT 3
- Free predefined amount of space by removing snapshots
- Possibility to use inotify to trigger snapshots HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zfsnap.