>From: Darren J Moffat 
>Sent: Monday, September 27, 2010 11:03 AM
>
>
>On 27/09/2010 18:14, Geoff Nordli wrote:
>> Is there a way to find out if a dataset has children or not using zfs
>> properties or other scriptable method?
>>
>> I am looking for a more efficient way to delete datasets after they
>> are finished being used.  Right now I use custom property to set
>> delete=1 on a dataset, and then I have a script that runs async to
>> clean them up.  If there are children then the delete will fail.
>>
>> This method works, but I would rather filter it again so it only tries
>> to delete a dataset which can actually be deleted.
>
>This sounds very like what 'zfs hold' and 'zfs destroy -d' were designed
for.  When
>using 'zfs send' holds will automatically be taken out for pool versions 18
and
>higher.
>

Darren, thanks for this tip.  It this looks like it will work well for
snapshots, but I can't apply the property to a clone.

Are there any properties I can set on the clone side?

I could definitely do a zfs list, and look for same name as the clone which
I am trying to delete, but I am looking for a better way. 

Geoff 

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

Reply via email to