Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-20 Thread Chris Gerhard
Also http://blogs.sun.com/chrisg/entry/a_faster_zfs_snapshot_massacre which I run every night. Lots of snapshots are not a bad thing it is keeping them for a long time that takes space. I'm still snapping every 10 minutes and it is great. The thing I discovered was that I really wanted to be

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-20 Thread Rob Clark
> I got overzealous with snapshot creation. Every 5 mins is a bad idea. Way too > many. > What's the easiest way to delete the empty ones? > zfs list takes FOREVER You might enjoy reading: ZFS snapshot massacre http://blogs.sun.com/chrisg/entry/zfs_snapshot_massacre. (Yes, the "." is part of th

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-17 Thread Nathan Kroenert
In one of my prior experiments, I included the names of the snapshots I created in a plain text file. I used this file, and not the zfs list output to determine which snapshots I was going to remove when it came time. I don't even remember *why* I did that in the first place, but it certainly

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-17 Thread Bob Friesenhahn
On Thu, 17 Jul 2008, Ben Rockwood wrote: > zfs list is mighty slow on systems with a large number of objects, > but there is no foreseeable plan that I'm aware of to solve that > "problem". > > Never the less, you need to do a zfs list, therefore, do it once and > work from that. If the snapsh

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-17 Thread Daniel Rock
Sylvain Dusart schrieb: > Hi Joe, > > I use this script to delete my empty snapshots : > > #!/bin/bash > > NOW=$(date +%Y%m%d-%H%M%S) > > POOL=tank > > zfs snapshot -r [EMAIL PROTECTED] > > FS_WITH_SNAPSHOTS=$(zfs list -t snapshot | grep '@' | cut -d '@' -f 1 | uniq) > > for fs in $FS_WITH_S

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-17 Thread Sylvain Dusart
Hi Joe, I use this script to delete my empty snapshots : #!/bin/bash NOW=$(date +%Y%m%d-%H%M%S) POOL=tank zfs snapshot -r [EMAIL PROTECTED] FS_WITH_SNAPSHOTS=$(zfs list -t snapshot | grep '@' | cut -d '@' -f 1 | uniq) for fs in $FS_WITH_SNAPSHOTS ; do EMPTY_SNAPSHOTS=$(zfs list -t s

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-17 Thread Ben Rockwood
zfs list is mighty slow on systems with a large number of objects, but there is no foreseeable plan that I'm aware of to solve that "problem". Never the less, you need to do a zfs list, therefore, do it once and work from that. zfs list > /tmp/zfs.out for i in `grep mydataset@ /tmp/zfs.out`;

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-16 Thread Ross
I don't know if there's any easy way to delete them, but I can offer a suggestion for the future. Tim Foster has a ZFS automatic snapshot script that would be worth taking a look at: http://blogs.sun.com/timf/entry/zfs_automatic_snapshots_0_10 That script lets you fairly easily set up snapshots

Re: [zfs-discuss] How to delete hundreds of emtpy snapshots [SEC=PERSONAL]

2008-07-16 Thread LEES, Cooper
Hi there, Yes 5 minutes is too often. I would, if it is easy and you have enough room, and don't want any of the snapshots, create another temp zfs file system and copy your data there and destroy the current zfs file system. Then recreate it and copy the data back. I don't know if there is

[zfs-discuss] How to delete hundreds of emtpy snapshots

2008-07-16 Thread Joe S
I got overzealous with snapshot creation. Every 5 mins is a bad idea. Way too many. What's the easiest way to delete the empty ones? zfs list takes FOREVER ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/list