|
Re: Detecting whether an NFS share is offline: msg#00075sysutils.backup.rsnapshot.general
On 08/22/06 17:17, Dave Lerner wrote: > This isn't strictly an rsnapshot issue, but it's related. :) > > I have two Linux Redhat servers: a production server and a backup > server. The servers can access each other using NFS. > > I need a way for either server to detect whether the other is online and > available for file transfer. > > I've found that if I attempt to mount one server from the other, e.g. > "mount /mnt/prod" or "mount /mnt/backup", and the referenced server is > down, the mount command never returns. > > My research indicates this is an intrinsic characteristic of NFS. NFS > will keep making retries indefinitely. > > Any suggestions are appreciated. :) You can use showmount to see the exported filesystems on the server. That only tells you if mountd is registered, running, and has some exports. It is possible that even that will hang for indefinite periods of time too. You can use rpcinfo -p and look for nfs and mountd to be registered. You should probably first check to see if you can ping it, then do an rpcinfo, and then follow that up with a mountd. If you do this in perl, you can wrap it in an alarm with a timeout set so it doesn't stall forever. You can also set set the timeouts and retries on the mount, and set it interruptible so that the delay doesn't last forever, however mounting the fs isn't really good for just testing if the server is ok (if it isn't you might get stuck). Also, I wouldn't recommend mounting server A on B and server B on A, unless you like domino effects and loops. One goes down, the other hangs, etc. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Rsnapshot resuming: 00075, David Keegel |
|---|---|
| Next by Date: | Re: Detecting whether an NFS share is offline: 00075, David Cantrell |
| Previous by Thread: | Detecting whether an NFS share is offlinei: 00075, Dave Lerner |
| Next by Thread: | Re: Detecting whether an NFS share is offline: 00075, Dave Lerner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |