Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* DFS / cache manager- Questions
@ 1994-05-19 17:37 Lisianne MARZANI
  1994-05-20 16:25 ` Craig_Everhart
  1994-05-23 21:23 ` Bruce_Leverett
  0 siblings, 2 replies; 4+ messages in thread
From: Lisianne MARZANI @ 1994-05-19 17:37 UTC (permalink / raw)


Hi,

Could anyone answer the following questions about the DFS Cache Manager ?

Let's consider a very simple configuration with one Client system and one
Security/CDS/DFS Server system only.

1. How is the cache manager supposed to behave when the server goes down?
How long does it keep data locally and allow cached files to be read by an
application on the client?

2. What should happen if a user (on the client ) wants to WRITE out a file
after the server has gone down ? The commands 'cm lsstores/cm resetstores'
make me think that the cache manager keeps the modified data in the cache
and attempt to contact the server, I suppose during a limited period of
time. Is it the same time-out as in question 1) ? 

3. Also in that case, I assume that the user application is informed that
the data cannot be written to the Server. But is the application informed
of the *final* result of the operation ( I mean  : whether the cache
manager has or not finally managed to reach the server ) ?

Many thanks for your help!

Lisianne Marzani

 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DFS / cache manager- Questions
  1994-05-19 17:37 DFS / cache manager- Questions Lisianne MARZANI
@ 1994-05-20 16:25 ` Craig_Everhart
  1994-05-23  0:05   ` Lisianne MARZANI
  1994-05-23 21:23 ` Bruce_Leverett
  1 sibling, 1 reply; 4+ messages in thread
From: Craig_Everhart @ 1994-05-20 16:25 UTC (permalink / raw)


Excerpts from netnews.comp.unix.osf.misc: 19-May-94 DFS / cache manager-
Questions Lisianne MARZANI@merle.a (1042) 

> 1. How is the cache manager supposed to behave when the server goes down? 
> How long does it keep data locally and allow cached files to be read by an 
> application on the client? 

It's a conservative cache manager implementation; it doesn't want to
violate Posix semantics.  After the DFS CM has understood that the
server has gone down (a matter of a couple of minutes) but before the
server has returned to service, new filesystem calls will return error
codes, probably ETIMEDOUT.  Open file descriptors that receive no new
calls won't be destroyed; instead, the CM attempts to regain its Posix
single-site synchronization state.  If this is successful, the CM will
allow re-use of these file descriptors.  If not, uses of those file
descriptors will fail with ESTALE. 

> 2. What should happen if a user (on the client ) wants to WRITE out a file 
> after the server has gone down ? The commands 'cm lsstores/cm resetstores' 
> make me think that the cache manager keeps the modified data in the cache 
> and attempt to contact the server, I suppose during a limited period of 
> time. Is it the same time-out as in question 1) ? 

The application is told via the ETIMEDOUT or ESTALE error code.  It's an
independent timeout, set to 20 minutes. 

> 3. Also in that case, I assume that the user application is informed that 
> the data cannot be written to the Server. But is the application informed 
> of the *final* result of the operation ( I mean  : whether the cache 
> manager has or not finally managed to reach the server ) ? 

The application is informed at close() or fsync() time.  If there's no
error from these calls, all data has been stored back. 

		Craig 
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DFS / cache manager- Questions
  1994-05-20 16:25 ` Craig_Everhart
@ 1994-05-23  0:05   ` Lisianne MARZANI
  0 siblings, 0 replies; 4+ messages in thread
From: Lisianne MARZANI @ 1994-05-23  0:05 UTC (permalink / raw)


In article <QhrCFTCSMUQd8PmrhZ@transarc.com>, Craig_Everhart@transarc.com
wrote:

> Excerpts from netnews.comp.unix.osf.misc: 19-May-94 DFS / cache manager-
> Questions Lisianne MARZANI@merle.a (1042) 
> 
> > 1. How is the cache manager supposed to behave when the server goes down? 
> > How long does it keep data locally and allow cached files to be read by an 
> > application on the client? 
> 
> It's a conservative cache manager implementation; it doesn't want to
> violate Posix semantics.  After the DFS CM has understood that the
> server has gone down (a matter of a couple of minutes) but before the
> server has returned to service, new filesystem calls will return error
> codes, probably ETIMEDOUT.  Open file descriptors that receive no new
> calls won't be destroyed; instead, the CM attempts to regain its Posix
> single-site synchronization state.  If this is successful, the CM will
> allow re-use of these file descriptors.  If not, uses of those file
> descriptors will fail with ESTALE. 
> 
 Thank you very much . Just to make sure that I understand well : does it
mean that a DFS client polls the server about every 'couple of minutes' to
make sure it hasn't gone down ? 
Also could you give me a pointer to the 'Posix semantics' you mention ?

Many Thanks,
Lisianne


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: DFS / cache manager- Questions
  1994-05-19 17:37 DFS / cache manager- Questions Lisianne MARZANI
  1994-05-20 16:25 ` Craig_Everhart
@ 1994-05-23 21:23 ` Bruce_Leverett
  1 sibling, 0 replies; 4+ messages in thread
From: Bruce_Leverett @ 1994-05-23 21:23 UTC (permalink / raw)


Although Craig Everhart has already posted an answer to your questions, I'm
going to post another one.  It goes into more detail than Craig's answer and
so it is possible that I will only cause confusion.  But, try it anyhow.

There are several different, independent, timeouts involved.  At least one of
them can be adjusted by a system administrator.

>Could anyone answer the following questions about the DFS Cache Manager ?
>
>Let's consider a very simple configuration with one Client system and one
>Security/CDS/DFS Server system only.
>
>1. How is the cache manager supposed to behave when the server goes down?
>How long does it keep data locally and allow cached files to be read by an
>application on the client?
>

    If the client doesn't try to modify any data, it can continue to read
    the data until its tokens expire.  The token expiration time can be
    adjusted by an administrator.  The default is 2 hours.  The administrator
    cannot set a value less than 20 minutes.

    By "read the data" I mean using the read (or write) system call, or
    causing a page fault in VM that is mapped to the file.  It is important
    to note that if the application doesn't have to do these things, either
    because it uses large buffers for the read and write system calls, or
    because the client's VM manager does not invalidate its VM, the application
    won't notice when the tokens expire.

>2. What should happen if a user (on the client ) wants to WRITE out a file
>after the server has gone down ? The commands 'cm lsstores/cm resetstores'
>make me think that the cache manager keeps the modified data in the cache
>and attempt to contact the server, I suppose during a limited period of
>time. Is it the same time-out as in question 1) ?
>

    If the file is already in the cache and the client has an unexpired
    token for it, the write system call will not cause any immediate attempt
    to contact the server.  Hence the write system call may succeed (return
    a value equal to the number of bytes that the caller asked to write).

    Eventually the client will attempt to write data to the server.  This
    may happen on various occasions:
        - An application may fsync the file.
        - An application may close the file.
        - An administrator may use the "cm flush" or "cm flushfileset"
          commands.
        - The cache manager may try to write the data in order to reclaim
          system resources.
        - If none of the above happen, a daemon will attempt to write all
          data every 30 seconds.
    At this time the cache manager will attempt to contact the server.  If
    it doesn't already know that the server is down, it will find out.
    It pings all servers every 15 seconds, so it may have found out that
    the server is down before actually trying to write to it.

    Eventually the cache manager marks the file descriptor in such a way as
    to indicate that data cannot be written to the file.  From that point
    forward, write system calls will fail (return -1, setting errno to
    ETIMEDOUT).  Also, the output of the command "cm lsstores" will reflect
    that there is a file whose data could not be stored.

    This marking of the file descriptor does not necessarily happen immediately
    when the cache manager detects a crashed server or a failure to store
    data, however.  It happens only on particular occasions, when the cache
    manager attempts to write all the file's data:
        - An application may fsync the file.
        - An application may close the file.
        - An administrator may use the "cm flush" command.
        - If none of the above happen, a daemon will attempt to write the
          data every 30 seconds.

    When an application closes a file, unsuccessful attempts to store data
    to the server will be noted, and the close system call will return an
    error code.  Thus, for an application to detect failures to write data,
    it should not only check the result of the write system call, but also
    check the result of the close system call.  (The fsync system call will
    also return an error code.)

    The daemon will continue to attempt every 30 seconds to store the data
    back to the server.  After 20 minutes, the cache manager may give up, and
    throw away the unstored data.  At that point neither read nor write system
    calls will succeed (they will return -1, setting errno to ESTALE).
    The cache manager will not give up, however, as long as any process has
    the file open.

>3. Also in that case, I assume that the user application is informed that
>the data cannot be written to the Server. But is the application informed
>of the *final* result of the operation ( I mean  : whether the cache
>manager has or not finally managed to reach the server ) ?

    After 20 minutes, the application may no longer be running.  Even if it
    is still running, it may no longer have the file open.  In either case,
    the cache manager does not attempt to inform the application of the
    outcome.

    If at any time while the file has pending stores, the server comes up and
    the cache manager succeeds in sending all the data down to it, the file
    will be marked as no longer having "pending stores".  Any applications
    that are holding the file open, or subsequently open it, will be able to
    execute write system calls.  There is no mechanism to "inform" the
    application, that is, it is not possible for the application to sleep
    until the file's status changes.  An application may repeatedly execute
    the fsync system call until it is successful (returns 0); the success
    indicates that the cache manager has reached the server.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1994-05-23 21:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-05-19 17:37 DFS / cache manager- Questions Lisianne MARZANI
1994-05-20 16:25 ` Craig_Everhart
1994-05-23  0:05   ` Lisianne MARZANI
1994-05-23 21:23 ` Bruce_Leverett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox