HPUX : identify NFS mountpoint


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users HPUX : identify NFS mountpoint
# 1  
HPUX : identify NFS mountpoint

Is there a way to identify a directory as the start of an NFS mountpoint in HPUX 11.0? Using existing utilities & without root priv.

If you stat the directory and use the S_ISNWK macro you can find network special files that way. The requirement will have to go through other channels if I need to code a C routine to do this.
# 2  
not sure if this helps...
$ grep nfs /etc/fstab | awk '{print $2}'
/usr/sap/trans
/ftp_interfaces
/icp_d
# 3  
Network special files are an artifact of a very old (predates NFS!) HP-only feature and have nothing to do nfs. If you can cd into a directory, then you can do:
df -n . ; df -n ..

If the last field of the first line is nfs3, the current directory is an nfs directory. If the 2nd fields of each line differ, the current directory is a mountpoint. Do not depend on the last fields differing because one nfs filesystem can be mounted on another.
# 4  
Thank you.

How would you interpret this?
Code:
/banner_remote/banner_rpts (vcspnm:/banner_envs/banner_rpts) :     nfs3
/banner_remote/banner_tst1 (kcsqa1:/banner_envs/banner_tst1) :     nfs3
/banner_remote/banner_rpts (vcspnm:/banner_envs/banner_rpts) :     nfs3
.... more stuff removed

# 5  
Quote:
Originally Posted by jim mcnamara
Thank you.

How would you interpret this?
Umm, I would interpret it as having nothing at all to do with what I said. I cannot see what command generated that output. My suggestion was to produce two lines of output, one from a directory and a second from that directory's parent. I seem to be counting three lines of output and I do not believe that I see a parent child relationship between any two of the three lines. And more stuff was removed?? Two lines is all you should get! A mount point is in a different filesystem than it's parent. Comparing the difference between a directory and its parent is the key. Again, cd to some-directory, then do:
df -n . ; df -n ..
# 6  
I ignored/missed the . and .. No wonder I'm confused.

I've got it now, thank you.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #262
Difficulty: Easy
During the Second World War, Alan Turing worked for the Government Code and Cypher School (GC&CS) at Bletchley Park, Britain's codebreaking centre that produced Ultra intelligence.
True or False?

10 More Discussions You Might Find Interesting

1. HP-UX

HPUX 11.11 NFS client hang

Hi. I'm having problems with my HP C8000 and 11.11 (ifs client needs to be restarted every week), trying to get it worked out. When I searched the web it seems, I require the following patches: PHKL_41041, PHKL_43823, PHKL_43577 Is there anyway to get hold of these packages? Many thanks... (2 Replies)
Discussion started by: plantage
2 Replies

2. Shell Programming and Scripting

Mountpoint monitoring script

Hi, I am new to shell scripting. I prepared a very simple script to monitor mount points but not geting desired output. df -h|awk -F' ' '{ if ($5 >= 80) print "CRITICAL\n" $NF " mount point has reached " $5;}'|sed -n '3,$p' When I run above script in Sun solaris box it is executing... (8 Replies)
Discussion started by: sv0081493
8 Replies

3. AIX

Space not getting released on the mountpoint

root@atldc-oragrid-ux01:/oragrid_01> du -sg * 0.58 11gR2gridBase 47.31 Grid_11203 4.17 app 0.00 lost+found 0.01 oraInventory root@atldc-oragrid-ux01:/oragrid_01> cd Grid_11203 root@atldc-oragrid-ux01:/oragrid_01/Grid_11203> du -sg *|sort 0.00 JRE 0.00 OPatch_old 0.00 ... (11 Replies)
Discussion started by: Vishal_dba
11 Replies

4. UNIX for Advanced & Expert Users

Unable to format new mountpoint

Can some one help me i try to mkfs new mountpoint from storageIBM but give some problem # mkfs -t ext3 /dev/sdd1 mke2fs 1.39 (29-May-2006) /dev/sdd1 is apparently in use by the system; will not make a filesystem here! my os is redhat 5.3 using fdisk # fdisk -l Disk /dev/sda: 298.9... (4 Replies)
Discussion started by: vickyid04
4 Replies

5. Solaris

Mountpoint 100% but no data inside

One of our mountpoint shows 100% but we have less data on that mountpoint. Pls help me to find which data/process holds the space. bash-3.00$ cd /oracle/server_software/oracle10 bash-3.00$ du -sh * 0K admin 260M app 0K flash_recovery_area 0K lost+found 0K oradata ... (6 Replies)
Discussion started by: rock123
6 Replies

6. UNIX for Advanced & Expert Users

Filesystem and partition, mountpoint

Hello All, I am new to System/plat-form administration work. Right now I am facing some issues while creating the filesystem and mounpoint. I am using Linux 6.0 SuSE 11. Last time I was used one command to partition the given space along with filesystem in SuSE 9 and it was done in GUI mode but... (0 Replies)
Discussion started by: nvkuriseti
0 Replies

7. UNIX for Dummies Questions & Answers

Testing NAS /mountpoint accessible

Hello. What's the best way to ensure that a NFS filesystem mounted from a disk-cabine (NAS) is accessible? My proposal: 1. ping to the ip of the cabine 2. verify filesystem is mounted 3. touch a file inside the /mountpoint Any other suggestions? Thank you! (2 Replies)
Discussion started by: asanchez
2 Replies

8. Shell Programming and Scripting

Get mountpoint from filename

Dear Guru's Given a full filename /a/b/c/d/file.txt how do i determine what part is the mount point ( say /a/b). Cheers, Karel (6 Replies)
Discussion started by: karelb
6 Replies

9. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

10. Shell Programming and Scripting

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Discussion started by: cpolikowsky
2 Replies

Featured Tech Videos