Hi David,
I can't find any other solution than what you have already determined,
which is this one:
# zfs list -r -t snapshot tank
The -d option integrated into b114. I'm running b132 and I still can't
get any combination of zfs list -d to work.
Its Monday and my brain is slow to warm up. See below.
Thanks,
Cindy
# zfs list -r -t all tank
NAME USED AVAIL REFER MOUNTPOINT
tank 106K 134G 23K /tank
tank/cindys 21K 134G 21K /tank/cindys
tank/cin...@now 0 - 21K -
# zfs list -r -t snapshot tank
NAME USED AVAIL REFER MOUNTPOINT
tank/cin...@now 0 - 21K -
# zfs list -d 1 -t snapshot tank
no datasets available
# zfs list -d 1 -r -t snapshot tank
no datasets available
# zfs list -d 0 -t snapshot tank
no datasets available
# zfs list -d 0 -r -t snapshot tank
no datasets available
On 02/22/10 06:48, David Dyer-Bennet wrote:
On 2/22/2010 3:31 AM, Darren J Moffat wrote:
On 22/02/2010 00:23, David Dyer-Bennet wrote:
I thought this was simple. Turns out not to be.
bash-3.2$ zfs list -t snapshot zp1
cannot open 'zp1': operation not applicable to datasets of this type
Fails equally on all the variants of pool name that I've tried,
including "zp1/" and "zp1/@" and such.
You can do "zfs list -t snapshot" and get a list of all snapshots in all
pools. You can do "zfs list -r -t snapshot zp1" and get a recursive list
of snapshots in zp1. But you can't, with any options I've tried, get a
list of top-level snapshots in a given pool. (It's easy, of course, with
grep, to get the bigger list and then filter out the subset you want).
zfs list -d 1 -t snapshot zp1
From zfs(1M)
-d depth
Recursively display any children of the dataset,
limiting the recursion to depth. A depth of 1 will
display only the dataset and its direct children.
Yes, that seems to be the elegant solution; although it's not available
in 2009.06, which is what I'm currently running (which I said in a part
of my message which you snipped in quoting).
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss