Operating System - HP-UX
1825730 Members
2714 Online
109687 Solutions
New Discussion

Exporting NFS file systems

 
SOLVED
Go to solution
TCEQ UNIX
Advisor

Exporting NFS file systems

Please explain the difference in these two statements. They seem to be mutually exclusive to me.

1) You must export /opt and /opt/appl separately, if /opt/appl is a mount point of a separate file system.

2) You cannot export either a parent directory or a subdirectory of an exported directory that resides within the same file system. It is not allowed, for example, to export both /opt and /opt/appl if both directories reside on the same file system.

This is quoted from 9-27 of the HP System and Network Adminstion II class maunal.

What is the difference in these two statements. It would appear to me that statement 1 could not happen if statement 2 is true. Obvioulsy, I am missing something here.

Russell
He who does not slow down at the sight of a police car is usually parked.
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor
Solution

Re: Exporting NFS file systems

Hi Russell:

This is simply saying that if /opt is mounted, for instance, on /dev/vg00/lvol6 and /opt/appl is mounted on /dev/vg01/lvol1, then you can export both.

If however, /opt/appl is merely a directory under /opt and not a separate mountpoint, then you cannot export /opt/appl.

Do a 'bdf' or view '/etc/fstab' to see if these are separate mountpoints.

Regards!

...JRF...

Juan González
Trusted Contributor

Re: Exporting NFS file systems

Hi Russel,
in the first statement there are two file systems one mounted on /opt and another on /opt/appl. In this case export /opt is not enough to see /opt/appl. You will have to export /opt/appl also.

In the second sentence, suposse that there is one file system mounted on /opt and /opt/appl is just a directory inside this filesystem, In this case you cannot export /opt and also /opt/appl. In conclusion you can only export one directory per filesystem.

I hope this helps.

Juan
Tom Maloy
Respected Contributor

Re: Exporting NFS file systems

Read "separate file system" as either "separate disk" or "separate disk partition" or "separate mount point".

Suppose that /tmp/first/second and it's parent directories are all in one file system, under one mount point. Then, if you export "first", "second" is already shared, and then exporting "second" would be redundant and produce an error.

But if /tmp/first is on one disk, and /tmp/first/second is on another disk, they are not in the same file system, so you would need two exports.

Tom
Carpe diem!
PIYUSH D. PATEL
Honored Contributor

Re: Exporting NFS file systems

Hi,

1. Since in some systems you may have /opt and /opt/appl as different filesystems also.
ie. mounted on different lvols

2. And in some systems, /opt and /opt/appl may be in the same filesystem....mounted on same lvol.

Piyush
S.K. Chan
Honored Contributor

Re: Exporting NFS file systems

Statement 1
===========
Imagine serverA and it's bdf output shows ..
..
/dev/vg00/lvol5 ..... /opt
/dev/vg00/lvol6 ..... /opt/appl
...
You got 2 different filesystems here and if you your NFS client to mount both, you got to export the 2 filesystem separately (2 separate entries in /etc/exports)

Staement 2
==========
Bdf gives ..
..
/dev/vg00/lvol5 .... /opt
...
In this case /opt/appl sits in "lvol5" ie the same FS as "/opt", hence you cannot export "/opt/appl" because the parent dir (/opt) is already exported (assuming /opt is in /etc/exports) since both of these dirs are in the same FS.
V. V. Ravi Kumar_1
Respected Contributor

Re: Exporting NFS file systems

hi,

just cd /opt/appl
then
bdf .
case 1:if it show the mounted on like
/opt
that means /opt/appl is not a file system appl is directory in /opt then u can export /opt only, u can not export /opt/appl.

case 2: if it show the mounted on like
/opt/appl
that means /opt/appl is a file sytstem and u can export it along with /opt.

regds
Never Say No
TCEQ UNIX
Advisor

Re: Exporting NFS file systems

Thanks to all of y'all (guess where I'm from.) This really cleared up this issue for me.

Russell
He who does not slow down at the sight of a police car is usually parked.