1

I have a server running Centos 7, kernel 3.10.0-514.16.1.el7.x86_64, Samba 4.5.2, and XFS. We archive documents in a bunch of small .tif files, so XFS works great for us. The folder is mounted in fstab with the "defaults" parameter. Nothing added like "noatime" or anything. We have, however, just noticed an oddity.

Let's say a folder has 10 files in it, numbered 0001.tif - 0010.tif You re-scan those 10 files with the same names. The "Date Modified" on the folder does not change, even though the modification date on the files does.. Now if you create a new sub folder, or scan a file 0011.tif into the folder, then the folder modification date changes. I have verified that this behavior is actually happening on the server and not just on the Windows workstations accessing by Samba share.

Is this expected behavior of XFS, or do I have something wrong with my server?

2

The directory inode itself only changes when the number of contents in the directory does. Modifying files that already exist does not change the directory. Which is consistent with the behavior you observed.

If you wish to track if any files in a tree were modified at a given time, you will need to loop through them all with something like the find command.

  • Thank you. That is kinda what I thought, but I just wanted to make sure. – Brent Aug 10 '17 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.