detecting NFS mount

M

Marten Lehmann

Hello,

how can I verify if a certain directory is an NFS mount?

Background: I have a directory, which should be an NFS mount so I can
perform some backup operations on a remote server by simply putting
files in it. But the netfs-initscript might fail during startup so I
would make backups to the local harddisk if there is no NFS mount.

Regards,
Marten
 
T

Tim Greer

Marten said:
Hello,

how can I verify if a certain directory is an NFS mount?

Background: I have a directory, which should be an NFS mount so I can
perform some backup operations on a remote server by simply putting
files in it. But the netfs-initscript might fail during startup so I
would make backups to the local harddisk if there is no NFS mount.

So this is on topic for the Perl news group, can you offer up a portion
of the relevant code in question? It shouldn't be too difficult to
ensure the NFS partition is mounted somewhere in the script before it
begins its backup routine. Also, what is the platform? This could be
relevant to the different methods you can use to ensure it's mounted.
 
J

Jürgen Exner

Marten Lehmann said:
how can I verify if a certain directory is an NFS mount?

Background: I have a directory, which should be an NFS mount so I can
perform some backup operations on a remote server by simply putting
files in it. But the netfs-initscript might fail during startup so I
would make backups to the local harddisk if there is no NFS mount.

There may be other ways, but I would do it exactly the same way as in
any other programming language by checking the mount table.

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top