Re: mounting nfs when server down

1999-05-25 Thread Rene H. Larsen
Pere Camps <[EMAIL PROTECTED]> writes:
>   b. Imagine bot the client and the server fall (power out, for
> example). The client boots up faster than the server and when it tries to
> mount the partition it can't. Idea for this: make a C program that looks
> for well mounted directories and if they aren't good it mounts them. C
> because the program will run 'suid' from /etc/profile (and mount is not
> suid). Of course the C program will not accept any parameters nor
> configuration (I don't know much of C program security, so better make it
> simple).
> 
>   What I'm looking for exactly is if it exists a standard solution
> for problem b.

Using an automounter will solve this problem.  With an automounter the 
directories aren't mounted until they are actually accessed, so it is
no longer a problem if the server boots more slowly than the
client(s).

You'll need to enable kernel support for the autofs file system and
install the Debian autofs package.

HTH.
-- 
   /'"`\  zzzZ  | My PGP Public Key is available at:
  ( - - )   | 
--oooO--(_)--Oooo-- 
 Don't ya just hate it when there's not enough room to fin 


NDN: Re: mounting nfs when server down

1999-05-25 Thread Post Office
Sorry. Your message could not be delivered to:

Jorge Araya (Mailbox or Conference is full.)


Re: mounting nfs when server down

1999-05-24 Thread Joey Hess
Pere Camps wrote:
>   b. Imagine bot the client and the server fall (power out, for
> example). The client boots up faster than the server and when it tries to
> mount the partition it can't.

Yes, and then it hangs until the server comes up.

-- 
see shy jo


Re: mounting nfs when server down

1999-05-24 Thread Pere Camps
Joey,

> hard   The program accessing a file on a NFS mounted file system will hang
>when the server crashes. The pro­ cess cannot be interrupted or
>killed unless you also specify intr.  When the NFS server is back
>online the program will continue undisturbed from where it was. This
>is probably what you want.

I've tried it, but I see two problems with it:

a. 'root' can not login as it looks for it's mail on
/var/spool/mail (also nfs-mail). I can put a .hushlogin and anyway root
never receives email (admin does it for him), but if root tries to ls
/var/spool/mail it hangs. Maybe I'm too much of a purist here.

b. Imagine bot the client and the server fall (power out, for
example). The client boots up faster than the server and when it tries to
mount the partition it can't. Idea for this: make a C program that looks
for well mounted directories and if they aren't good it mounts them. C
because the program will run 'suid' from /etc/profile (and mount is not
suid). Of course the C program will not accept any parameters nor
configuration (I don't know much of C program security, so better make it
simple).

What I'm looking for exactly is if it exists a standard solution
for problem b.

Thanks for your help!

-- p.



Re: mounting nfs when server down

1999-05-24 Thread Joey Hess
Pere Camps wrote:
>   Is there a standard solution for this besides a cron'ed script
> that looks for well-mounted directories?

hard   The program accessing a file on a NFS mounted file system will hang
   when the server crashes. The pro­ cess cannot be interrupted or
   killed unless you also specify intr.  When the NFS server is back
   online the program will continue undisturbed from where it was. This
   is probably what you want.

Try adding that to the nfs options in your fstab.

-- 
see shy jo


mounting nfs when server down

1999-05-24 Thread Pere Camps
Hi!

I now have a mini NIS-network with /home directories mounted from
a central server.

Imagine this sceneraio: the two systems boot up together. The
server is slower while booting up and the clients can't mount the
nfs-partitions, but 2 minutes after the server is up and running.

When my users try to log on the client machine, they can't because
their directories are not mounted. 

Is there a standard solution for this besides a cron'ed script
that looks for well-mounted directories?

TIA!

-- p.