On Mar 11, 2009 09:30 +0000, Daire Byrne wrote: > For the purposes of clearing old data are m|ctimes of files on the MDT > filesystem really going to be that far out? We came across something similar > when we used to rsync between two MDTs and filed a "bug" here: > > https://bugzilla.lustre.org/show_bug.cgi?id=14952 > > I thought that the MDT filesystem times would at least be close to the "real" > lustre filesystem time?
In recent versions of Lustre (1.6.6 and later I believe) the mtime on the MDS is updated on close, so that it is usable by e2scan. It isn't 100% accurate (e.g. not updated in case of crash, or until close), but in most cases it will be reasonably accurate. This unfortunately doesn't mean that older files will get their mtimes updated, only for newer files. > > Meanwhile, we are walking the file system from a client. Note that > > for this > > > > lfs find --type f --atime +60 --mtime +60 --ctime +60 /mnt/lustre >list > > > > beats > > > > find /mnt/lustre -type f -atime +60 -mtime +60 -ctime +60 >list > > > > by a wide margin since most of the time it does not have to contact > > the OST's, which stat(2) will always do for the foreseeable future > > (until size-on-MDS) to get st_size. > > I did not think about this before - thanks. So the "accurate" times are held > in the EAs on the MDT? No, the accurate ctime is kept on both the MDT and OST, whichever one is later wins. The mtime is kept on whichever node has the later ctime, which is generally the OSTs because they do the writes. The atime is kept in memory on the OSTs, and written to the MDT at file close. > And the stat(2) is so slow because it wants file size > too which then needs to talk to the OSTs. Is there still going to be an > overhead on the MDS reading the EAs from disk compared to just stating the > files on the MDT device? Yes. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. _______________________________________________ Lustre-discuss mailing list [email protected] http://lists.lustre.org/mailman/listinfo/lustre-discuss
