ZFS how to make "zfs list" show all snapshots by default?

Hi all,

Just build a new server running FreeBSD 13, looks like zfs list won't show all snapshot. But zfs list -t snapshot works.

I remember on FreeBSD 12 or before zfs list will list all snapshots by default. Is this because FreeBSD 13 moved to OpenZFS? Is it possible to show ZFS snapshots by default when run zfs list.

Thanks
 
Last edited:
I may be wrong.. but cant remember 'zfs list' showing snapshots on old ZFS either.
Anyway a simple solution would be adding some alias to .cshrc or .profile
 
I'd say that's a terrible idea - on a production server it's not uncommon to have tens of thousands of snapshots. Listing them all per default would be completely useless as you usually want to work with the dataset, not with single snapshots...

Just use zfs list -(r)t snapshot <dataset> as intended. But if you really want to shoot yourself in the foot, make this an alias for 'zfs list' in your users rc-file (e.g. .cshrc)
 
  • Like
Reactions: mer
Listing them is annoying when you also do file backup with for instance clone.
On the other hand for users or yourself it can be usefull to quickly find a historical file.
 
I use shell aliases for my special zfs list needs:
Code:
$ alias
alias z='zfs list -o name,recsize,refer,ratio,lrefer,compress,dedup'
alias zz='zfs list -o name,used,dedup,recsize,refer,ratio,lrefer,compress,canmount,mountpoint'
You could use alias za='zfs list -t all', and that would even allow you to still specify datasets at the end of the command, like: $ za -r zroot/var
 
Then it's interesting.
I started to use freebsd since 8.0, I though "zfs list" will list all snapshots by default, and my server is also working in this way...
I checked my .cshrc file, there is no alias. Then the question is, why on my old server I can use "zfs list " to list all snapshots..
 
Back
Top