I've been testing Darik Horn's Linux version of zfs-auto-snapshot
today. This is the first time I've tried using snapshots with zfs-fuse
(I'm using 0.7.0), and I'm confused about why 'zfs list' doesn't seem
to show all the snapshots made, unless they're listed explicitly.
For example:
$zfs list 'srv/video@zfs-auto-snap_frequent-2011-12-22-1400'
NAME USED AVAIL REFER
MOUNTPOINT
srv/video@zfs-auto-snap_frequent-2011-12-22-1400 0 - 3.83T -
So there's a snapshot named
'srv/video@zfs-auto-snap_frequent-2011-12-22-1400', but:
$zfs list -t snapshot|grep video
srv/video@zfs-auto-snap_hourly-2011-12-22-1117 0
- 3.79T -
srv/video@zfs-auto-snap_frequent-2011-12-22-1300 58K
- 3.82T -
srv/video@zfs-auto-snap_frequent-2011-12-22-1345 26K
- 3.82T -
srv/video@zfs-auto-snap_frequent-2011-12-22-1415 0
- 3.83T -
That snapshot isn't listed. What am I missing here?
The 14:00 snapshot should already have been automatically removed by
now, but zfs-auto-snapshot doesn't even know it's there since 'zfs
list' isn't listing it; I'm worried that I'm going to end up with
hundreds of snapshots hanging around that I can't remove without
guessing that they're there so I can name them explicitly.
Can anyone tell me what's happening?
Thanks,
Nye
Use `zfs list -t all` or `zfs list -t snapshot` and you should get the
desired result.
By default, snapshots are no longer displayed in the `zfs list` output.
--
Darik Horn <daj...@vanadac.com>
Um, I already am - look at the examples I pasted in :P
(And apologies for the wrapping BTW; damn Gmail)
Thanks,
Nye
The zfs-auto-snapshot program for Linux never invokes a bare `zfs
list` command, so you need to explain why the default behavior of `zfs
list` is causing a problem. Both instances of it are qualified with
the `-t` parameter.
Snapshots are not deleted by zfs-auto-snapshot unless the `--keep`
parameter is given. Look at the bundled cron parts for an example of
how to invoke zfs-auto-snapshot properly.
--
Darik Horn <daj...@vanadac.com>
BTW, if the stuff that you're pasting here is being stripped or
mangled, then please post it as an attachment, or put it into a github
issue here:
https://github.com/dajhorn/zfs-auto-snapshot/issues/new
--
Darik Horn <daj...@vanadac.com>
I think you've misunderstood me; this isn't a problem with
zfs-auto-snapshot, so far as I can tell - I just mentioned it for
completeness in case it turns out to be relevant. I'll restate the
most relevant parts which might help to clarify:
There exists a snapshot named
'srv/video@zfs-auto-snap_frequent-2011-12-22-1400', which can be
demonstrated by giving it explicitly as an argument to 'zfs list'.
(This is just an example; there are other snapshots with the same
issue.)
Calling 'zfs list -t snapshot' (or indeed 'zfs list -H -t snapshot -S
creation -o name' as zfs-auto-snapshot does) shows a list of several
snapshots, *but not all of them*. In particular,
'srv/video@zfs-auto-snap_frequent-2011-12-22-1400' is not listed even
though it's verified to exist.
Does that make it clearer?
Yes, my bad.
Please create a recursive snapshot on the pool like this:
# zfs snapshot -r srv@test-recursive
And a regular snapshot like this:
# zfs snapshot srv@test-nonrecursive
Do they both appear in the snapshot list?
# zfs list -t snapshot | grep @test
--
Darik Horn <daj...@vanadac.com>
Hmm, now I have a sinking feeling:
cannot create snapshot 'srv/broken@test-recursive': dataset is busy
no snapshots were created
That dataset (srv/broken) has been sitting around for so long I'd
forgotten about it. It can't be destroyed without crashing zfs :(.
Everything scrubs just fine, but now I'm wondering if the problem is
simply that my pool is borked.
> And a regular snapshot like this:
>
> # zfs snapshot srv@test-nonrecursive
>
> Do they both appear in the snapshot list?
>
> # zfs list -t snapshot | grep @test
>
The non-recursive version works, and shows up.
I guess it may not be relevant in light of that fact that the pool
seems to be damaged, but I did try the following:
# zfs snapshot -r srv/video@test-recursive
# zfs snapshot srv/video@test-nonrecursive
# zfs list -t snapshot|grep @test
srv/video@test-recursive 0
- 3.83T -
All the snapshots that aren't showing up were made with '-r' though,
so I don't think there's any correlation between it being a recursive
snapshot or not. So far it seems frustratingly random.
I take it you've not seen anything like this before - any ideas short
of destroying and recreating the pool?
Thanks for your time,
Nye
--
To post to this group, send email to zfs-...@googlegroups.com
To visit our Web site, click on http://zfs-fuse.net/
There are only a few dozen, so that shouldn't be a problem. Since it's
not causing me any immediate trouble, I think I'll leave it until
after Christmas to investigate further.
(Actually, I might see what zfsonlinux does, since that should be
fairly quick and painless. I'll report back if it does anything
different.)
Nye
--
To post to this group, send email to zfs-...@googlegroups.com
To visit our Web site, click on http://zfs-fuse.net/
And it works! All the snapshots are listed by ZoL. I wonder if it's
just because it uses a newer version of ZFS (I haven't upgraded the
pool since I want to be able to go back to zfs-fuse).
And with this puzzle piece now I really am going to forget about it
until after Christmas.