[lustre-discuss] SATTR in Lustre Changelog
LEIBOVICI Thomas
thomas.leibovici at cea.fr
Thu Mar 24 05:59:23 PDT 2016
On 03/23/16 18:02, Qing Zheng wrote:
> Hi-
>
> We are monitoring Lustre 2.7.0 using the Changelog
> and have a question on SATTR op families
>
> We noticed Changelog had defined SATTR, MTIME, CTIME, and ATIME log
> types.
>
> We also kind of figured
>
> SATTR with flag 0x10 means CHMOD
> SATTR with flag 0x20 means CHOWN
> SATTR with flag 0x40 means CHGRP
>
> We'd like to know if it is possible for Lustre to produce SATTR
> records with mtime/ctime/atime updates?
>
> And does Lustre ever produce CTIME or ATIME logs,
> since so far we don't see those logs in the Changelog even we touch a
> file manually.
Hi,
By default ATIME is not in the changelog mask. To add it:
echo "+ATIME" > /proc/fs/lustre/mdd/lustre-MDT0000/changelog_mask
AFAIK, there is a kind of priority and batching between CTIME, MTIME and
ATIME records.
For example, if there is already a record for a given fid in the
changelog, next ATIME/MTIME/CTIME records are not reported - until the
first MTIME record is cleared.
example:
# create the file
> touch /mnt/lustre/X
# change file mtime
> touch /mnt/lustre/X
> lfs changelog lustre
# mtime change is not reported
327301 01CREAT 12:45:54.769600767 2016.03.24 0x0
t=[0x200000402:0xd9fe:0x0] j=touch.0 p=[0x200000007:0x1:0x0] X
> lfs changelog_clear lustre cl1 0
# change mtime
> touch /mnt/lustre/X
# change atime
> cat /mnt/lustre/X
> lfs changelog lustre
# mtime change is reported, but not atime
327302 17MTIME 12:47:48.653207857 2016.03.24 0x7
t=[0x200000402:0xd9fe:0x0] j=touch.0
> cat /mnt/lustre/X
> lfs changelog lustre
# atime change is reported
327303 19ATIME 12:49:23.43229006 2016.03.24 0x1
t=[0x200000402:0xd9fe:0x0] j=cat.0
CTIME appears when entry ctime changes but not mtime or atime, and when
the operation is not covered by a SATTR.
I couldn't tell exactly when this occurs, but I can see them on a
production filesystem.
Regards,
Thomas
>
> Changelog is a great tool and we are just trying to know its behavior
> better.
>
> Cheers,
> -- Qing Zheng
>
>
>
> _______________________________________________
> lustre-discuss mailing list
> lustre-discuss at lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
More information about the lustre-discuss
mailing list