2004-12-02 10:46:04

by Raghu Ram Murthy

[permalink] [raw]
Subject: How to know whether a given directory in in NFS

Hi,

I want to know (from perl), whether a given directory
is in part of NFS. Are there any Unix commands to find
it out or any indirect methods?

Thanks in advance
-Raghuram

=====
----------------------------------------------
P.Raghu Ram Murthy, M-tech (Computer Science),
Member, Information Technology,
D E Shaw India Software Private Limited,
6-3-879 & 879/B
Begumpet, Hyderabad 500 016
Andhra Pradesh
India

Mobile: (+91) 98852 17928
----------------------------------------------

If it doesn't work, you're not hitting it with a big enough hammer



__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2004-12-02 12:15:37

by Raghu Ram Murthy

[permalink] [raw]
Subject: Re: How to know whether a given directory in in NFS

How with mount.

for example, /home directory is in NFS and /tmp is not
in NFS and I don't know whether /home is in NFS or
not?

Then how can I find?
-Raghuram
--- Vincent Roqueta <[email protected]>
wrote:

> Le jeudi 2 D?cembre 2004 11:45, Raghu Ram Murthy a
> ?crit :
> > Hi,
> >
> > I want to know (from perl), whether a given
> directory
> > is in part of NFS. Are there any Unix commands to
> find
> > it out or any indirect methods?
>
> mount ?
>
>
>
-------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users.
> Discover which products truly live up to the hype.
> Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
>


=====
----------------------------------------------
P.Raghu Ram Murthy, M-tech (Computer Science),
Member, Information Technology,
D E Shaw India Software Private Limited,
6-3-879 & 879/B
Begumpet, Hyderabad 500 016
Andhra Pradesh
India

Mobile: (+91) 98852 17928
----------------------------------------------

If it doesn't work, you're not hitting it with a big enough hammer

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2004-12-02 12:22:31

by James Pearson

[permalink] [raw]
Subject: Re: How to know whether a given directory in in NFS

You can use the statfs system call (on Linux) - see a similar thread at
http://marc.theaimsgroup.com/?t=108784378500006&r=1&w=2

There is probably a statfs Perl module.

James Pearson

Raghu Ram Murthy wrote:
> How with mount.
>
> for example, /home directory is in NFS and /tmp is not
> in NFS and I don't know whether /home is in NFS or
> not?
>
> Then how can I find?
> -Raghuram
> --- Vincent Roqueta <[email protected]>
> wrote:
>
>
>>Le jeudi 2 D?cembre 2004 11:45, Raghu Ram Murthy a
>>?crit :
>>
>>>Hi,
>>>
>>>I want to know (from perl), whether a given
>>
>>directory
>>
>>>is in part of NFS. Are there any Unix commands to
>>
>>find
>>
>>>it out or any indirect methods?
>>
>>mount ?
>>
>>
>>
>
> -------------------------------------------------------
>
>>SF email is sponsored by - The IT Product Guide
>>Read honest & candid reviews on hundreds of IT
>>Products from real users.
>>Discover which products truly live up to the hype.
>>Start reading now.
>>http://productguide.itmanagersjournal.com/
>>_______________________________________________
>>NFS maillist - [email protected]
>>https://lists.sourceforge.net/lists/listinfo/nfs
>>
>
>
>
> =====
> ----------------------------------------------
> P.Raghu Ram Murthy, M-tech (Computer Science),
> Member, Information Technology,
> D E Shaw India Software Private Limited,
> 6-3-879 & 879/B
> Begumpet, Hyderabad 500 016
> Andhra Pradesh
> India
>
> Mobile: (+91) 98852 17928
> ----------------------------------------------
>
> If it doesn't work, you're not hitting it with a big enough hammer
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2004-12-02 12:22:35

by Vincent Roqueta

[permalink] [raw]
Subject: Re: How to know whether a given directory in in NFS

Le jeudi 2 D=E9cembre 2004 13:15, Raghu Ram Murthy a =E9crit=A0:
> How with mount.
>
> for example, /home directory is in NFS and /tmp is not
> in NFS and I don't know whether /home is in NFS or
> not?
>
> Then how can I find?



mount will return a line within:

nfs_server:/an/exported/directory/ on /home type nfs
or
nfs_server:/an/exported/directory/ on /home type nfs4

depending on the nfs version you are using.

You can parse the mount result. I don't know if there is an other way to kn=
ow=20
that?

Vincent


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2004-12-02 19:59:46

by Dan Stromberg

[permalink] [raw]
Subject: Re: How to know whether a given directory in in NFS


IMO, python's a lot more practical than perl (at least until perl is
majorly overhauled for perl 6 :-S).

With python, the "os" module has a statvfs function, and the statvfs
module has symbolic constants to facilitate using the os.statvfs
function.

I used this API recently to summarize disk usage in a filesystem that
doesn't have quota support. I had to compile python with "large file"
support though, even though IBM claims in some contexts that programs
are supposed to be large file-enabled on AIX by default. But of course,
this assumes you'll be looking at somes that are over 2 gigabytes in
size...

On Thu, 2004-12-02 at 12:22 +0000, James Pearson wrote:
> You can use the statfs system call (on Linux) - see a similar thread at
> http://marc.theaimsgroup.com/?t=108784378500006&r=1&w=2
>
> There is probably a statfs Perl module.
>
> James Pearson
>
> Raghu Ram Murthy wrote:
> > How with mount.
> >
> > for example, /home directory is in NFS and /tmp is not
> > in NFS and I don't know whether /home is in NFS or
> > not?
> >
> > Then how can I find?
> > -Raghuram
> > --- Vincent Roqueta <[email protected]>
> > wrote:
> >
> >
> >>Le jeudi 2 D?cembre 2004 11:45, Raghu Ram Murthy a
> >>?crit :
> >>
> >>>Hi,
> >>>
> >>>I want to know (from perl), whether a given
> >>
> >>directory
> >>
> >>>is in part of NFS. Are there any Unix commands to
> >>
> >>find
> >>
> >>>it out or any indirect methods?
> >>
> >>mount ?
> >>
> >>
> >>
> >
> > -------------------------------------------------------
> >
> >>SF email is sponsored by - The IT Product Guide
> >>Read honest & candid reviews on hundreds of IT
> >>Products from real users.
> >>Discover which products truly live up to the hype.
> >>Start reading now.
> >>http://productguide.itmanagersjournal.com/
> >>_______________________________________________
> >>NFS maillist - [email protected]
> >>https://lists.sourceforge.net/lists/listinfo/nfs
> >>
> >
> >
> >
> > =====
> > ----------------------------------------------
> > P.Raghu Ram Murthy, M-tech (Computer Science),
> > Member, Information Technology,
> > D E Shaw India Software Private Limited,
> > 6-3-879 & 879/B
> > Begumpet, Hyderabad 500 016
> > Andhra Pradesh
> > India
> >
> > Mobile: (+91) 98852 17928
> > ----------------------------------------------
> >
> > If it doesn't work, you're not hitting it with a big enough hammer
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://productguide.itmanagersjournal.com/
> > _______________________________________________
> > NFS maillist - [email protected]
> > https://lists.sourceforge.net/lists/listinfo/nfs
> >
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
>


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-12-02 11:42:16

by Vincent Roqueta

[permalink] [raw]
Subject: Re: How to know whether a given directory in in NFS

Le jeudi 2 D=E9cembre 2004 11:45, Raghu Ram Murthy a =E9crit=A0:
> Hi,
>
> I want to know (from perl), whether a given directory
> is in part of NFS. Are there any Unix commands to find
> it out or any indirect methods?

mount ?


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2004-12-02 11:42:56

by Vincent Roqueta

[permalink] [raw]
Subject: Re: How to know whether a given directory in in NFS

Le jeudi 2 D=E9cembre 2004 11:45, Raghu Ram Murthy a =E9crit=A0:
> Hi,
>
> I want to know (from perl), whether a given directory
> is in part of NFS. Are there any Unix commands to find
> it out or any indirect methods?

mount ?


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs