[OpenIndiana-discuss] Finding the "last" snapshot for a zfs volume

Discussion list for OpenIndiana openindiana-discuss at openindiana.org
Wed May 14 13:30:30 UTC 2014


On 14 May 2014 14:24, Discussion list for OpenIndiana <
openindiana-discuss at openindiana.org> wrote:

<snip>


> There is nothing wrong with using "tail -1" as Bob said.  If the question
> you're trying to answer, is "what's the latest snapshot of the specified
> filesystem" that's just fine ...  And in fact, the thread is about "Finding
> the last snapshot."
>
Agreed ... I am trying to find the last snapshot, but I am now able to
limit it to exclude the snapshots that succeeded.

on the "zfs" list, Matthew Ahrens from delphix posted a neat idea for
incorporation into zfs:

https://github.com/delphix/delphix-os/commit/95378d0bc82aeec9c2f7833f569cffcb86aa3c63

which would do the job admirably :)



> So I'll agree, you might not want to list *all* snapshots on the whole
> system.  You might benefit by naming the zvol or filesystem.  But there is
> still nothing wrong with using tail to find the last one.
>
nothing wrong with tail, but there is a problem with "zfs list -r" on
systems with a large number of filesystems and a large number of snapshots.

thanks everyone.

Jon


More information about the openindiana-discuss mailing list