[OpenIndiana-discuss] How to let find 'see' .zfs directories
jimklimov at cos.ru
Thu Mar 20 09:00:53 UTC 2014
On 2014-03-20 04:02, Harry Putnam wrote:
> Probably some obvious thing going on here but I'm not see how find all
> '.zfs' directories under a zfs system hierarchy.
> Just running something like
> cd /rmh/ (that is 'p2/rmh' in zpool talk)
> find . -type d -name 'snapshot'
> No hits whatsoever, when I know there are 4-5 under there.
> I wanted to setup some homeboy snapshot destroys on the basis of mving
> to all .zfs/snapshot directories and using ls -t, sed, zfs snapshot destroy to
> get rid of snaps beyond the most recent 8 in the directory
> So is something like 'zfs -H -t snapshot -o name' the only way to
> ferret out actual addresses of the snaps?
> I'd sooner use basic oldschool unix tools if possible
On one hand, I miss an "rm" interface to kill snapshots as easily
as "mkdir" makes them ;)
Overall, why don;t you use zfs-autosnap service and set up the
amount of regular snapshots you want kept for a particular schedule?
Also in its second (current) incarnation, the service can kill more
autosnaps if the pool runs out of a threshold percentage of free space.
To your original question, see the "snapdir" property on datasets.
More information about the OpenIndiana-discuss