Google Answers Logo
View Question
 
Q: Partial file transfer supported by NFS ( No Answer,   1 Comment )
Question  
Subject: Partial file transfer supported by NFS
Category: Computers > Software
Asked by: quickening-ga
List Price: $20.00
Posted: 26 Dec 2002 14:06 PST
Expires: 25 Jan 2003 14:06 PST
Question ID: 133633
I was shocked to find that I could do a tail on a large file in an nfs
mount and only the tail of the file was transfered.  ( The whole file
would have taken much longer to transfer. )   So my question is, what
feature of NFS is capable of doing this "rsync-like" behavior, and
what clients use it (besides tail) ?  Even "tail -f " keeps growing
record by record within seconds of the log file being appended.  What
are the limitations of the feature too, like how large a file fragment
do I get before the whole file is transferred?   It would help me if
you could duplicate this behavior on other systems too.  I am doing an
nfs mount on linux 2.4.18 from an IBM FlexOS nfs server (an OS/2
derivitive).  Eventually I would like to set up an rsync-like facility
to  keep  transaction files distributed nationally current locally.  
(partial ftp and rsync are NOT available)  Wrench in the works: I
might have to do this from windows.

Request for Question Clarification by haversian-ga on 07 Jan 2003 19:39 PST
The comment below describes the behavior of the NFS protocol - do you
want more information than that?

Also, tail is not a "client".  Your linux install contains an NFS
client which presents the NFS-monuted filesystem like a local
filesystem.  Tail is operating as normal.  Are you looking, then, for
a list of clients (and servers?) which support this functionality, or
a list of applications or utilities which might get some benefit from
it?

Are you restricted to NFS, or would other systems, such as AFS, be
usable?

Clarification of Question by quickening-ga on 10 Jan 2003 14:41 PST
That NFS is supposed to  handle file size and offset was the main
thing I needed to know.   Tail was the example I gave that works thru
the nfs client, but really wouldn't be suited to a production
environment.   If the partial file transfer is that basic to NFS, I
shouldn't have any problem developing an rsync-like alternative.  
Thanks anyway.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Partial file transfer supported by NFS
From: cwrl-ga on 07 Jan 2003 09:39 PST
 
The NFS protocol is described in RFC 1094. It defines a bunch
of file operations, for instance

2.2.7 Read From File

           struct readargs {
                   fhandle file;
                   unsigned offset;
                   unsigned count;
                   unsigned totalcount;
           };
 
           union readres switch (stat status) {
           case NFS_OK:
                   fattr attributes;
                   nfsdata data;
           default:
                   void;
           };
 
           readres
           NFSPROC_READ(readargs) = 6;
 
   Returns up to "count" bytes of "data" from the file given by "file",
   starting at "offset" bytes from the beginning of the file.  The first
   byte of the file is at offset zero.  The file attributes after the
   read takes place are returned in "attributes".

The tail(1) functionality is probably implemented by opening the
file, finding out how long it is, and reading the end of it. So
on an NFS mount it can do this just as it would on a normal file
system.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy