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

tech_lists at tech_lists at
Sat Apr 8 06:04:28 PDT 2017

Hi Matt,

> It might be due to how you are accessing the snapshot.  You are
> providing a path, such as 
> "/var/hammer/home/andrea/snap-20170406-0957/bin/ ...", but
> what is 'snap-20170406-0957' ?  Is it a softlink to something?
> Is it a mount?

It's a symlink to the snapshot, created automatically with the snapshot.

This is the snapshot ID according to snapls:

% hammer snapls /home/attic/

Snapshots on /home/attic/	PFS#2
Transaction ID		Timestamp		Note
0x0000000000000000	2017-04-06 09:57:34 CEST	-

And this is the symlink I used to access to it:

% ls -l /var/hammer/home/attic/
total 0
lrwxr-xr-x  1 root  wheel  32 Apr  6 09:57 snap-20170406-0957 -> /home/attic/@@0x0000000000000000

> Try CD'ing into the snapshot using the TID snapshot format.
> That is, do a 'hammer snapls' to list available snapshots,
> then CD into one of them using cd .@@0x<fullsnapshottid>.
> Then go from there.

Yes, you're right.

So now I start from here:

% pwd

Then I list available snapshots (there is only one):

% hammer snapls /home/attic/
Snapshots on /home/attic/	PFS#2
Transaction ID		Timestamp		Note
0x0000000000000000	2017-04-06 09:57:34 CEST	-

And then I cd to it directly:

% cd .@@0x0000000000000000

Just to be sure:

% pwd

Inside this snapshot which according to output from snapls above was taken on 2017-04-06 09:57:34 i have this file which was created after the snapshot was taken:

% cat disk_stats.txt 
Fri Apr  7 11:38:35 CEST 2017
HOME                            5588G  1061G  4527G    19%    /home
MHOME                           5588G  1059G  4529G    19%    /mhome

This is the command I used to create this file, to be sure I look for it in the command line history:

% history | grep disk_stats.txt
( date && df -h HOME MHOME | grep -v Filesystem ) > /home/attic/disk_stats.txt

This shows that:

1) I created the file in  /home/attic/disk_stats.txt, I didn't mess with the snapshot directory directly.

2) The date written in the file (Fri Apr  7 11:38:35 CEST 2017) is the output of the date command, so we can be sure it was the real date, not a mistake.

So the file in the snapshot taken on April 6 was created on April 7. And here I'm completely lost! (But since it's my first DragonflyBSD installation and my first encounter with HAMMER I may be doing something completely wrong).

In case it helps, here are my mount points, taken from /etc/fstab

/dev/da1s1d  /home  hammer  rw  2  2
/dev/da2s1d  /mhome  hammer  rw  2  2
/home/pfs/andrea  /home/andrea  null  rw  0  0
/home/pfs/attic  /home/attic  null  rw  0 0

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!
    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!
    operating as a SLAVE
    snapshots directory defaults to /var/hammer/<pfs>

Thank you!


More information about the Users mailing list