[zfs-discuss] time-slider/plugin:zfs-send

2011-07-06 Thread Adrian Carpenter
I've been trying to figure out how the time-slider zfs-send works to no avail.  
Is there any documentation/howto for the zfs-send time slider plugin?

- Adrian
-- 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] time-slider/plugin:zfs-send

2011-07-06 Thread Cindy Swearingen

Hi Adrian,

I wonder if you have seen these setup instructions:

http://www.oracle.com/technetwork/articles/servers-storage-dev/autosnapshots-397145.html

If you have, let me know if you are still having trouble.

Thanks,

Cindy

On 07/05/11 16:37, Adrian Carpenter wrote:

I've been trying to figure out how the time-slider zfs-send works to no avail.  
Is there any documentation/howto for the zfs-send time slider plugin?

- Adrian

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


Re: [zfs-discuss] time-slider/plugin:zfs-send

2011-07-06 Thread Jim Klimov

2011-07-06 20:21, Cindy Swearingen ?:

Hi Adrian,

I wonder if you have seen these setup instructions:

http://www.oracle.com/technetwork/articles/servers-storage-dev/autosnapshots-397145.html 



Hello Cindy,

I would like to suggest an optimization to this part of the article:

===


 How Do I Delete Unwanted Automatic Snapshots?

Carefully! The following command deletes all snapshots matching the 
pattern |@zfs-auto-snap|:



  #*for s in `zfs list -H -o name -t snapshot | grep @zfs-auto-snap`; 
  do zfs destroy $s ; done*


===

In fact on a system with thousands or tens of thousands of snapshots,
deleting them one-by-one can take hours, literally. Spawning a zfs
process, posting the kernel request to remove a snapshot, and
ultimately queuing some updated ZFS blocks to a transaction group,
and finally mechanically writing this TXG can take a few seconds per
run. Problem is, many of the updated metadatablocks would be
rewritten again and again by further zfs destroy invokations.

On my systems, I usually run the zfs destroy part in the background
(with an ), and also hiding variables in quotemarks is often a good
idea just in case:

  #*for s in `zfs list -H -o name -t snapshot | grep @zfs-auto-snap`; 
  do zfs destroy $s  done*



While this spawns thousands of processes, an 8Gb+ machine can
in practice handle that. This parallel destroy allows to stuff many
metadata block updates in a single TXG timeframe, coalescing
and cancelling out many writes which are obsoleted before they
make it to mechanical media.

This way destroying 2000-3000 snapshots can be done in under
a minute, or within 5-10 minutes, depending on hardware.

HTH,
//Jim


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