Re: Snapshots maintenance

2011-01-04 Thread Pierre Abbat
On Tuesday 04 January 2011 08:20:32 Francisco Reyes wrote:
 Also the man page has: see hammer config.
 Is that another section in the man page or another man page? Tried man 5
 hammer and searchign for hammer config in the main man page.

config is between cleanup and viconfig in the man page for hammer.

Pierre
-- 
Don't buy a French car in Holland. It may be a citroen.


Re: Snapshots maintenance

2011-01-04 Thread Siju George
On Tue, Jan 4, 2011 at 6:50 PM, Francisco Reyes li...@stringsutils.com wrote:
 How does one adjust the number of snapshots for hammer to keep?

 In the man page it says:
 HAMMER version 3+
 The configuration file is saved in file system meta-data
 
 The format of the configuration file is:
 snapshots  period retention-time [any]

 What ist he name of the configuration file?
 .snapshots.period ? That files does not seem human readable/editable.


hammer config /path/to/pfs

will show the contents on the conf file to edit it use

hammer viconfig /path/to/pfs



 To delete a snapshot do I just delete the link and prune?


no thant won't work with ver 3

Either

 snaprm path ...

 snaprm transid ...

 snaprm filesystem transid ...
 (HAMMER VERSION 3+) Remove a snapshot given its softlink or
 transaction id.  If specifying a transaction id the snapshot is
 removed from file system meta-data but you are responsible for
 removing any related softlinks.

 If a softlink path is specified the filesystem and transaction id
 is derived from the contents of the softlink.  If just a transac-
 tion id is specified it is assumed to be a snapshot in the HAMMER
 filesystem you are currently chdir'd into.  You can also specify
 the filesystem and transaction id explicitly.


OR

Edit config file and prune



 Don't see any difference in df. When/how is the space regained?
 Had a lot of extra data so now that I cleaned things up I want to delete the
 snapshots with the extra data to get the space back.


after pruning you need to reblock to gain space

hope this helps :-)

siju



Re: Snapshots maintenance

2011-01-04 Thread Francisco Reyes

Siju George writes:


 snaprm path ...


Got an error:
hammer snaprm snap-20110101-0301
Warning: hammer snaprm 0x000104a207b0: meta-data not found

The link was deleted anyway.


after pruning you need to reblock to gain space


Tried
hammer reblock /

Got

reblock start 8000: free level 0
Reblock / failed: Input/output error
Reblocked:
   0/0 btree nodes
   0/0 data elements
   0/0 data bytes