detecting NFS mount

Discussion in 'Perl Misc' started by Marten Lehmann, Oct 30, 2008.

  1. 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
    Marten Lehmann, Oct 30, 2008
    #1
    1. Advertising

  2. Marten Lehmann

    Tim Greer Guest

    Marten Lehmann wrote:

    > 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.
    --
    Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
    Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
    and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
    Industry's most experienced staff! -- Web Hosting With Muscle!
    Tim Greer, Oct 30, 2008
    #2
    1. Advertising

  3. Marten Lehmann <> wrote:
    >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
    Jürgen Exner, Oct 30, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leonard Slatkin
    Replies:
    1
    Views:
    4,423
    Ray Tayek
    Nov 30, 2003
  2. milkyway
    Replies:
    2
    Views:
    403
    Ryan Stewart
    Dec 19, 2004
  3. Replies:
    3
    Views:
    1,384
  4. Spendius
    Replies:
    2
    Views:
    1,228
  5. tguclu

    about mount func.

    tguclu, May 13, 2007, in forum: C Programming
    Replies:
    2
    Views:
    256
    tguclu
    May 13, 2007
Loading...

Share This Page