Re: [zfs-discuss] nuke lots of snapshots

2009-09-03 Thread Gaëtan Lehmann


Le 3 sept. 09 à 19:57, Jacob Ritorto a écrit :

Sorry if this is a faq, but I just got a time sensitive dictim from  
the higherups to disable and remove all remnants of rolling  
snapshots on our DR filer.  Is there a way for me to nuke all  
snapshots with a single command, or to I have to manually destroy  
all 600+ snapshots with zfs destroy?



  zfs list -r -t snapshot -o name -H pool | xargs -tl zfs destroy

should destroy all the snapshots in a pool

Gaëtan


--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr



PGP.sig
Description: Ceci est une signature électronique PGP
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] nuke lots of snapshots

2009-09-03 Thread Jacob Ritorto

Gaëtan Lehmann wrote:


  zfs list -r -t snapshot -o name -H pool | xargs -tl zfs destroy

should destroy all the snapshots in a pool



Thanks Gaëtan.  I added 'grep auto' to filter on just the rolling snaps 
and found that xargs wouldn't let me put both flags on the same dash, so:


zfs list -r -t snapshot -o name -H poolName | grep auto | xargs -t -l 
zfs destroy



worked for me.

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