Operating System - HP-UX
1833788 Members
2421 Online
110063 Solutions
New Discussion

Re: automatically mount file system when Hp-ux startup

 
SOLVED
Go to solution
Steven Lee_9
Occasional Contributor

automatically mount file system when Hp-ux startup

I want to mount a directory(/var/source) to another one(/target), I put /var/source in /etc/exports, and mount /var/source /target. how can the system automatically mount it when system restart? thanks.
steven
5 REPLIES 5
Armin Feller
Honored Contributor

Re: automatically mount file system when Hp-ux startup

Hi,

you have to add this filesystem mount into /etc/fstab.

Regards ...
Armin
Bill McNAMARA_1
Honored Contributor
Solution

Re: automatically mount file system when Hp-ux startup

once you have mounted your filesystem the way you want (via the mount command) you can edit your /etc/fstab either by hand which can introduce errors or via:
mount -p > /etc/fstab

The mount -p formats the mount output in a format valid for the fstab.

Later,
Bill
It works for me (tm)
Stefan Farrelly
Honored Contributor

Re: automatically mount file system when Hp-ux startup

/etc/exports is for nfs filesystems on your server you want to mount on remote servers.

To mount remote server filesystems on your server automatically add it into /etc/fstab
Im from Palmerston North, New Zealand, but somehow ended up in London...
Rajeev  Shukla
Honored Contributor

Re: automatically mount file system when Hp-ux startup

After you have put /var/source in /etc/exports this will export the file system when the system comeup. Then you need to add the line in /etc/fstab like
:/var/source /target

this will mount the directory when the system comes up.
Remember this is nfs mount so you should have NFSSERVER and NFSCLIENT set to 1 in /etc/rc.config.d/nfsconf

Cheers
Rajeev
T G Manikandan
Honored Contributor

Re: automatically mount file system when Hp-ux startup

Make entry like

:/xxx /yyy nfs rw,suid,soft 0 2

xxx--->shared dir
/yyy-->nfs client mount point

specify soft mount option for the mount as the number of retries is limited so that when the remote machine is not available the mount is ignored.

If the mount option is hard the system tries to reach the remote machine until it can reach it.