Hi,NILFS is a log structured file system which supports snapshotting. I've tried to see the differences between two snapshots using diff: root@srv1:/mnt/protected# diff -qr tmp/ bkp_srv1/ and was amazed to find out that I can't. Here are the mounts: # the HEAD of the filesystem, mounted read/write: /dev/mapper/bkp_srv1 on /mnt/protected/bkp_srv1 type nilfs2 (rw,nosuid,nodev,noexec,relatime) # an older snapshot, mounted read only: /dev/mapper/bkp_srv1 on /mnt/protected/tmp type nilfs2 (ro,relatime,cp=2171601) At first I've decided that I've mounted the wrong checkpoint(snapshot) or have done something else wrong. Then I've double checked and have verified that there ARE actually different file contents on both mounts. So my guess is that diff checks the stat information on the dirs and if its the same dev&inode it does not bother to compare: root@srv1:/mnt/protected# stat tmp bkp_srv1 File: tmp Size: 4096 Blocks: 1 IO Block: 4096 directory Device: fd05h/64773d Inode: 2 Links: 4 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2014-02-11 22:16:50.545497340 +0000 Modify: 2014-02-11 22:16:50.545497340 +0000 Change: 2014-02-11 22:16:50.545497340 +0000 Birth: - File: bkp_srv1 Size: 4096 Blocks: 1 IO Block: 4096 directory Device: fd05h/64773d Inode: 2 Links: 4 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2014-02-11 22:16:50.545497340 +0000 Modify: 2014-02-11 22:16:50.545497340 +0000 Change: 2014-02-11 22:16:50.545497340 +0000 Birth: - I've checked the man page and was not able to find a usable diff option, e.g. force the comparison anyway. I've also run: rsync -a --dry-run --verbose tmp/. bkp_srv1/. and it shows the differences as expected. So "diff" is unable to do its job and show the differences between files/dirs when they exist. Thus I consider this to be a bug. P.S. I am aware that "diff" is crucially important software for lots of software developers and infrastructure and making changes to it or its interface (e.g. command line options) is a responsible task. Best regards -- Delian
