[Jds-team] [OpenIndiana Distribution - Bug #1013] time-slider fails to take snapshots on complex dataset/snapshot configuration

illumos project devnull at illumos.org
Fri Jan 20 12:23:58 UTC 2012


Issue #1013 has been updated by Johan Postema.


There is a small bug in the above fix where 

<pre>
single.append(datasetname)
</pre>

should be

<pre>
finalrecursive.append(datasetname)
</pre>

However I stripped the original code a little bit more:

<pre>
-        for datasetname in recursive:
-            parts = datasetname.rsplit('/', 1)
-            parent = parts[0]
-            if parent == datasetname:
-                # Root filesystem of the Zpool, so
-                # this can't be inherited and must be
-                # set locally.
-                finalrecursive.append(datasetname)
-                continue
-            idx = bisect_right(recursive, parent)
-            if len(recursive) > 0 and \
-               recursive[idx-1] == parent:
-                # Parent already marked for recursive snapshot: so skip
-                continue
-            else:
-                finalrecursive.append(datasetname)
</pre>

<pre>
+        for datasetname in recursive:
+            parts = datasetname.rsplit('/', 1)
+            parent = parts[0]
+            if parent == datasetname:
+                # Root filesystem of the Zpool, so
+                # this can't be inherited and must be
+                # set locally.
+                finalrecursive.append(datasetname)
+            elif not set(recursive).intersection([parent]):
+                finalrecursive.append(datasetname)
</pre>







When using time-slider with the zfs-send plugin you might also be interested in: https://illumos.org/issues/2005
----------------------------------------
Bug #1013: time-slider fails to take snapshots on complex dataset/snapshot configuration
https://www.illumos.org/issues/1013

Author: Florian Manschwetus
Status: Resolved
Priority: Normal
Assignee: OI JDS
Category: Desktop (JDS)
Target version: oi_151_stable
Difficulty: Medium
Tags: time-slider


pool-strukture:
data (freq,hourly,daily,weekly,monthly)
data/Admin (inherit)
data/Projects (inherit)
data/PublicWWW (inherit)
data/Teaching (inherit)
data/backup (inherit, -frequent)
data/backup/images (-all, +stagingdisk-schedule)
data/backup/images/linux (inherit)
data/backup/images/windows (inherit)
data/backup/serviceDaten (inherit)
data/backup/serviceDaten/linux (inherit)
data/backup/serviceDaten/windows (inherit)
data/cvs (no snaps, -all)
data/inc (no snaps, -all)
data/scratch (no snaps, -all)
data/test (no snaps, -all)
data/users (inherit)

Problem occurred when setting e.g. com.sun:auto-snapshot:hourly from false to inherit or true (com.sun:auto-snapshot is false on data, due to explicit schedule selection)

log snippet:

Failed to create snapshots for schedule: hourly
Caught RuntimeError exception in snapshot manager thread
Error details:
--------BEGIN ERROR MESSAGE--------
['/usr/bin/pfexec', '/usr/sbin/zfs', 'snapshot', '-r', 'data/backup/serviceDaten at zfs-auto-snap_hourly-2011-05-05-09h13'] failed with exit code 1
cannot create snapshot 'data/backup/serviceDaten/windows at zfs-auto-snap_hourly-2011-05-05-09h13': dataset already exists
no snapshots were created

--------END ERROR MESSAGE--------
Snapshot monitor thread exited.
[ Mai  5 09:13:06 Stopping because all processes in service exited. ]


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://www.illumos.org/my/account



More information about the Jds-team mailing list