File changes propagating in older snapshots: what am I doing wrong?

YONETANI Tomokazu y0n3t4n1 at gmail.com
Mon Apr 10 12:12:32 PDT 2017


On Sat, Apr 08, 2017 at 03:04:28PM +0200, tech_lists at mail.com wrote:
> And this is how the PFS and its mirror was created a couple of days ago (I took note of commands and their output just in case):
> 
> The master:
> 
> # hammer pfs-master /home/pfs/attic
> Creating PFS#2  succeeded!
> /home/pfs/attic
>     sync-beg-tid=0x0000000000000001
>     sync-end-tid=0x00000001002194f0
>     shared-uuid=7bb3b3bc-18ab-11e7-9d0e-714d7b6e28cc
>     unique-uuid=7bb3b3e1-18ab-11e7-9d0e-714d7b6e28cc
>     label=""
>     prune-min=00:00:00
>     operating as a MASTER
>     snapshots directory defaults to /var/hammer/<pfs>
> 
> The slave:
> 
> # hammer pfs-slave /mhome/pfs/attic shared-uuid=7bb3b3bc-18ab-11e7-9d0e-714d7b6e28cc
> Creating PFS#2  succeeded!
> /mhome/pfs/attic
>     sync-beg-tid=0x0000000000000001
>     sync-end-tid=0x0000000000000001
>     shared-uuid=7bb3b3bc-18ab-11e7-9d0e-714d7b6e28cc
>     unique-uuid=36738989-18ac-11e7-9d0e-714d7b6e28cc
>     label=""
>     prune-min=00:00:00
>     operating as a SLAVE
>     snapshots directory defaults to /var/hammer/<pfs>

You have two HAMMER filesystems mounted on the same machine,
but the snapshot directories point to the same place (/var/hammer/<pfs>),
so I guess they're messing up each other every time `hammer cleanup'
is run.

You can change the snapshot directory for a PFS with, e.g.,

# mkdir -p /var/mhammer/attic
# hammer pfs-update /mhome/pfs/attic snapshots=/var/mhammer/attic

and repeat this until there's no more than one PFS pointing to
the same directory.

You can still access the snapshots via TIDs which can
be obtained by `hammer snapls /path/to/PFS', so with a little
bit of scripting you should be able to restore the snapshot
symlinks if you need them.

IMHO the default snapshot directory should point to somewhere
under HAMMER filesystems mountpoint, instead of some absolute
path like /var/hammer.

> 
> 
> Thank you!
> 
> 
> Regards,
> Andrea



More information about the Users mailing list