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


Re: Snapshots maintenance

2011-01-04 Thread Siju George
On Tue, Jan 4, 2011 at 6:50 PM, Francisco Reyes  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    [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 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.


Snapshots maintenance

2011-01-04 Thread Francisco Reyes

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[any]

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

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.


To delete a snapshot do I just delete the link and prune?
Example
I deleted a few links from /var/hammer/root and then did
hammer prune /var/hammer/root

Got 
TID 000106239300 - 0001062e2490

TID 000104c82520 - 000106239300
TID 000104a207b0 - 000104c82520
TID 0001043d8dd0 - 000104a207b0
TID 0001040614a0 - 0001043d8dd0
TID 000103616010 - 0001040614a0
TID 0001028fb580 - 000103616010
TID 0001028d5dc0 - 0001028fb580
TID 0001020f72d0 - 0001028d5dc0
TID 0001 - 0001020f72d0
Prune //: 10 snapshots
Prune //: objspace 8000: 7fff: pfs_id 0
Prune //: prune_min is 0d/00:00:00
Prune // failed: Input/output error < Error?
Pruned 0/0 records (0 directory entries) and 0 bytes


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.