[Lustre-discuss] Query in Lustre Code

Andreas Dilger adilger at whamcloud.com
Mon Feb 14 15:11:03 PST 2011


On 2011-02-14, at 14:52, vilobh meshram wrote:
>  I have following three queries.Can you please help me?
>  1) Does the metadata information which the Client gets from the MDS contain some fields which are updated at the client side and later are needed to the updated to the MDS to keep the information syncronized ?

Currently this is not the case in either 1.8 or 2.x.  There is some lazy effort to update the file size on the MDS when files are closed, but this is only on a "best effort" basis.  There is a project (currently on hold) called "Size On MDS" (SOM) which stores the file size, blocks, etc on the MDS in a reliable manner, but it is fairly complex and has not been landed to any release branch yet.

>  2) Or is it like the information which the MDS send to the Client when the file is open or created is a staic information like lock handle , how the file is striped, which OSS to use to write the file etc i.e. the Client does not modify the information provided by MDS ?

This is a more correct statement for Lustre today.  The file layout is static, though at some time in the near future (when HSM code is landed).  The file layout could be revoked by the MDS if it needs to be changed (e.g. if the file data is being purged for HSM, or for a feature like file migration or data replication).

>  3) Who maintain or keeps the updated information about the file size ?
>       i) OSS [I think its OSS]
>      ii) Client [Does Client cache the file size information ?]
>     iii) MDS [ Because whenever I open a new file or same file MDS shows file size=0]

The OST keeps track of the size of each object stored there.  The MDS contains the file layout (i.e. mapping of objects to file offsets).  The client (LOV) is the place where this information is combined to determine the actual file size, based on the individual object sizes and the layout.

The file size is cached on the client under DLM locks (one for each object in the file, and in the future one for the layout).

Cheers, Andreas
--
Andreas Dilger 
Principal Engineer
Whamcloud, Inc.






More information about the lustre-discuss mailing list