[OpenIndiana-discuss] Script to clean mess after zfs-auto-snapshot

Jan Owoc jsowoc at gmail.com
Tue Feb 12 02:22:32 UTC 2013


On Mon, Feb 11, 2013 at 7:00 PM, Roman Naumenko <roman at naumenko.ca> wrote:
> Jan Owoc said the following, on 11-02-13 8:35 PM:
>
>> On Mon, Feb 11, 2013 at 5:39 PM, Roman Naumenko <roman at naumenko.ca> wrote:
>>>
>>> After another big clenup on home filer during which I got terrible
>>> headache
>>> because of zfs-auto-snapshost, I decided to ask if anybody tried to
>>> simplified snapshot management.
>>
>> I think everyone has slightly different needs, so some combination of
>> zfs commands are necessary. Any tool/wrapper you'd write is likely to
>> be as overwhelming as zfs itself.
>
> That's exactly the problem: too overwhelming, also hard to remember commands
> if not working with it often.

I use "zfs get" maybe once every few months. Do I remember what to
type? No. Do I know how to search the Internet (eg. Oracle
documentation[1])? Yes.

[1] http://docs.oracle.com/cd/E19082-01/817-2271/gbcxl/index.html

You could write a text file with the most common command combinations
you use (that's what I do), or write a bash script if you always run
them with the same arguments (I do this for other tasks). Your wrapper
could even be the bash script :-).


>> $ zfs get com.sun:auto-snapshot
>>
>> will list all the filesystems along with their "auto-snapshot status".
>> If you were tinkering with turning specific times on/off, you'd need
>> to run:
>> $ zfs get com.sun:auto-snapshot:weekly
>
> Should the snapshots itself have property assigned? I see they got property
> inherited from dataset itself (maybe I did something wrong).

I'm not sure about the "should" bit, but I have them inherited. I
think it makes sense because zfs attributes do normally get inherited
when you create sub-filesystems, and a snapshot is technically a
(read-only) sub-filesystem.


Cheers,
Jan



More information about the OpenIndiana-discuss mailing list