http://www.opensolaris.org/bug/report.jspa

You'll need an OpenSolaris.org account to file the RFE of course.


On Jul 17, 2008, at 10:52 AM, Will Murnane wrote:

> I would like to request an additional flag for the command line zfs
> tools.  Specifically, I'd like to have a -t flag for "zfs destroy", as
> shown below.  Suppose I have a pool "home" with child filesystem
> "will", and a snapshot "home/[EMAIL PROTECTED]".  Then I run the
> following commands:
> # zfs destroy -t volume home/[EMAIL PROTECTED]
> zfs: not destroying home/[EMAIL PROTECTED], as it is not a volume.
> # zfs destroy -t snapshot home/[EMAIL PROTECTED]
> (succeeds)
> # zfs destroy -t snapshot home/will
> zfs: not destroying home/will, as it is not a snapshot.
> # zfs destroy -t volume home/will
> zfs: not destroying home/will, as it is not a volume.
> # zfs destroy -t filesystem home/will
> (succeeds)
>
> Now, to test the behavior of '-r', I recreate the same structure as
> before, and run some more commands:
> zfs destroy -r -t snapshot home
> (succeeds)
> zfs list -Hro name
> home
> home/will
>
> One more time, to demonstrate -R:
> zfs clone home/[EMAIL PROTECTED] home/oldwill
> zfs destroy -R -t snapshot home
> (???)
> The two ways I can think of at this point are to destroy the clone as
> well, or to promote it and then destroy the snapshots.  Or, I suppose,
> make -R incompatible with -t for zfs destroy.
>
> I imagine this would be easy to implement, and for scripting use it
> would be a good sanity check; if you're trying to clean up snapshots
> you don't accidentally kill the filesystems by messing up some string
> operation and naming a valid filesystem by mistake.  Especially with
> -r, this could prevent silly mistakes.
>
> Also, it might be a helpful thing to add to 'zfs get'; if one wants to
> see some property for all user home directories and not the snapshots
> of them, syntax like
> zfs get used -r -t filesystem home
> could list the "used" property of all the children of the home
> filesystem.  This is a slightly different semantic from the proposed
> "zfs destroy" enhancement: it's a filter rather than a predicate.  I
> think this is the Right Thing to do with this flag, and it will be
> intuitive for users.
>
> Any suggestions on better specifying the behavior?  How can I formally
> propose this?  I'd be glad to implement it if would help this get
> finished.
>
> Thanks!
> Will
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to