1833078 Members
2732 Online
110050 Solutions
New Discussion

Mount a FS as hidden

 
Peggy Chu
New Member

Mount a FS as hidden

I am a FS developer and
would appreciate any help
in telling me how to mount
a FS as hidden so that
user does not see that mount
point when they type mount.

I cannot find any flags to
the mount() service call or

or any options to the mount
command-line command
that could accomplish
a hidden mount.

On SUN e.g. mount -m will hide
the mountpoint.



4 REPLIES 4
Vincent Fleming
Honored Contributor

Re: Mount a FS as hidden

That would be a solaris-specific extension to mount.
No matter where you go, there you are.
A. Clay Stephenson
Acclaimed Contributor

Re: Mount a FS as hidden

Hi Peggy,

I examined the mount(2) system call and /usr/include/sys/mount.h. HP-UX does not support this feature.

Regards, Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Mount a FS as hidden

Hi again Peggy,

The only thing I can suggest is to code a program /usr/bin/mount which does a system(3) call to /sbin/mount for everything except
when called with no arguments. In that case it read a textfile to see if the mountpoint should not be displayed. You would also need to replace bdf and df with programs that also read the same textfile.


Regards, Clay
If it ain't broke, I can fix that.
Peggy Chu
New Member

Re: Mount a FS as hidden

(1) Thanks for all help.
However, my boss does not
like the idea of replacing
the mount/df/bdf with
a shell script that, in
a nutshell, "grep -v"
the mountpoint that I want
hidden. You see, all other
major UNIX platforms support
hidden mountpoint-- SUN IRIX
LINUX TRU64.....

HPUX provide getmntent()
addmntent(), delmntent()....
as API interface for developers to modify /etc
/mnttab. You would think,
logically, that syncer(
the background daemon that
monitors mountpoints) will
honor them. BUT syncer is
triggered at THAT second that
the API modifies mnttab
and syncer will cp /dev/null
to mnttab and use 5 seconds to
rebuild that mnttab contents
to be what it thinks is correct. During this 5-second
period, typing "mount" command
at the command line
will hang (no prompt/output
comes up) until syncer is done. What syncer does is to
sync the mnttab with the
kernel mount table. So if I
can find out any API calls
that I can utilize to modify the kernel mount
table contents, then I will
beat syncer and get my job done. The $64000 question is:
What are those kernel API calls?

The point is, it does NOT
make ANY SENSE that HPUX
provide those addmntent()
and delmntent() but at
the same time put syncer there
that overwrite everything
and make those API-calls's
existence totally ridiculous.