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 J Moffat _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss