Hi, thank you, for looking into this!

> 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.

I'm confused.. I thought hammer cleanup didn't take snaphots of a slave PFS, 
only of the master. Then hammer mirror-copy or hammer mirror-stream would 
mirror the master PFS and all its snapshots into the slave PFS.

Here are my snapshots sir: it seems to me that the mirror PFS /home/andrea and 
/mhome/attic have no snapshots:

# find /var/hammer/ -name "*snap-*"
/var/hammer/root/snap-20170409-1632
/var/hammer/root/snap-20170410-2345
/var/hammer/build/snap-20170409-1632
/var/hammer/build/snap-20170410-2345
/var/hammer/home/andrea/snap-20170409-1632
/var/hammer/home/andrea/snap-20170410-2345
/var/hammer/home/snap-20170409-1632
/var/hammer/home/attic/snap-20170409-1632
/var/hammer/home/attic/snap-20170410-2345
/var/hammer/home/snap-20170410-2345
/var/hammer/mhome/snap-20170409-1632
/var/hammer/mhome/snap-20170410-2345

To reinforce my belief, /home/andrea is a master, continuously mirrored with 
hammer mirror-stream into /mhome/pfs/andrea. The snapshot IDs are the same for 
master and slave:

% hammer snapls /home/andrea
Snapshots on /home/andrea       PFS#1
Transaction ID          Timestamp               Note
0x0000000100108a90      2017-04-09 16:32:46 CEST        -
0x0000000115d89300      2017-04-10 23:45:21 CEST        -

% hammer snapls /mhome/pfs/andrea/
Snapshots on /mhome/pfs/andrea/ PFS#1
Transaction ID          Timestamp               Note
0x0000000100108a90      2017-04-09 16:32:46 CEST        -
0x0000000115d89300      2017-04-10 23:45:21 CEST        -


Now, /home/attic/ is another master, but *I only mirror it manually* with 
hammer mirror-copy

% hammer snapls /home/attic/
Snapshots on /home/attic/       PFS#2
Transaction ID          Timestamp               Note
0x0000000100108a90      2017-04-09 16:32:46 CEST        -
0x0000000115d89300      2017-04-10 23:45:47 CEST        

% hammer snapls /mhome/pfs/attic
Snapshots on /mhome/pfs/attic   PFS#2
Transaction ID          Timestamp               Note
0x0000000100108a90      2017-04-09 16:32:46 CEST        

The slave has only one snapshot, not two like the master, I think it's because 
i didn't mirror after the snapshot was taken.

Now I run hammer mirror-copy and I find the second snapshot taken yesterday too:
# hammer mirror-copy /home/attic /mhome/pfs/attic
# hammer snapls /mhome/pfs/attic
Snapshots on /mhome/pfs/attic   PFS#2
Transaction ID          Timestamp               Note
0x0000000100108a90      2017-04-09 16:32:46 CEST        -
0x0000000115d89300      2017-04-10 23:45:47 CEST        -

Until now all this reinforced my understanding that there slaves haven't got 
their own snapsots.


But.. you're absolutely right! Now that I look better, when I created the slave 
the output was:

# hammer pfs-slave /mhome/pfs/attic 
shared-uuid=7bb3b3bc-18ab-11e7-9d0e-714d7b6e28cc
[... output snipped ...]
operating as a SLAVE
snapshots directory defaults to /var/hammer/<pfs>

According to the examples found it should be something like this instead:

# hammer pfs-slave /Backup2/pfs/test 
shared-uuid=9043570e-b3d9-11de-9bef-011617202aa6
operating as a SLAVE
snapshots directory not set for slave 


So now I'm confused about why my snapshot dirs was set for the slave too.


Moreover, I reinstalled everything on the same machine, using exactly the same 
commands (copied and pasted from my notes) and the problem didn't occur.


Regards,
Andrea



Reply via email to