Operating System - HP-UX
1833522 Members
2972 Online
110061 Solutions
New Discussion

bdf on automount NFS mounts

 
SOLVED
Go to solution
RAC_1
Honored Contributor

bdf on automount NFS mounts

I am stumped by this. I have automounter in play and it mounts NFS mounts as when required. (such when accessed, when cd'ed to that dir) I am preparing a script to check to report space usage for these mount points.

I get usage for mounted NFS mounts. I tried using following

bdf -t nfs
bdf /nfs/[a-zA-Z]*
bdf /nfs/"some_host_names"/[a-zA-Z]*

automounts are served by nis map and looks like follows.

/nfs -hosts -rw,soft,nosuid

With above approach I do not get bdf for all available NFS mounts. How do I address this??

Thank you in Advance.
There is no substitute to HARDWORK
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: bdf on automount NFS mounts

You might have to do something like:

for i in list of automount points
do
cd ${i}
bdf .
done


bdf doesn't have the capability to force an automount point to mount as far as I know.
A. Clay Stephenson
Acclaimed Contributor

Re: bdf on automount NFS mounts

You are going to have to do an operation that causes a mount first and then run bdf. The bad news is that your cd's or ls -l's or whatevers are going to cause a potential mount storm -- the very thing that the automounter strives to avoid.
If it ain't broke, I can fix that.
TwoProc
Honored Contributor

Re: bdf on automount NFS mounts

I think the problem is that your commands that you're using are using wild-card expansion to expand along subdirs(nfs-mounts) that don't exist at the time the command is run. Only a direct read(or write) from the subdir will reactivate the timed-out nfs connection.
The trick would be to do something to make the systems come current first, then run your bdf commands.

Something along the lines of...

for i in [some_host_names]
do
[if ! -r /nfs/$i/junkfile ]; then
echo couldn't activate server $i
exit 1
fi
bdf /nfs/$i
done

We are the people our parents warned us about --Jimmy Buffett
baiju_3
Esteemed Contributor
Solution

Re: bdf on automount NFS mounts

Hi ARP,

bdf -t nfs is working for automounted FS also.I verified it .

Then what is the problem in getting size?.

does bdf -t nfs works for you ?


Thanks.
BL.


Good things Just Got better (Plz,not stolen from advertisement -:) )
RAC_1
Honored Contributor

Re: bdf on automount NFS mounts

Thank you all. I think it works with bdf -t nfs. I had tried this, but had problems. I think that was about greps and awks that I was using to filter it.
blal pointed hat out. Also Patrcik and AC's pointers were also helpful.

Finally I am doing bdf -t nfs.

Points coming.
There is no substitute to HARDWORK
RAC_1
Honored Contributor

Re: bdf on automount NFS mounts

As mentioned above.
There is no substitute to HARDWORK