Hello!
On Apr 4, 2015, at 5:14 PM, Akhilesh Gadde wrote:
Hi,
I am pretty new to Lustre and trying to understand a few things wrt to the File
Read/Write operations.
1. When the client wants to read a file, it obtains the EA layout information for that
file from the MDT and then accesses the file directly from OST(s).
2. When the client wants to write a file, it contacts the MDT and MDT would provide the
list of OSTs on which the file could be striped across. (MDT gives OSTs based on the
available free space in OSTs - round robin or weighted as given in manual).
--> Once the client completes the write operation, would the client inform the MDS
about the completion and so release the locks on file metadata or the OSS/OST would
communicate this information to the MDS/MDT ??
Client does not inform MDS about write completion because MDS has no idea (and currently
does not care) about any such data activity.
Moreover, data and metadata locking are separate so there's no metadata locking while
writing.
The only bit of data MDS holds for a client that does IO is open file handle, but in fact
the client can close the file before the IO is actually finished (since there's write
caching,
and so the app might think it has done writing, but in reality the data is still flowing
from the cache to OSTs).
OSTs don't inform MDS about amy write completion either because MDS really would not
be able to do anything with this info anyway, and also OSTs don't really know
if the client genuinely stopped writing or if it is just pausing before a new burst of
data will come in.
Bye,
Oleg