Operating System - HP-UX
1825782 Members
2162 Online
109687 Solutions
New Discussion

Re: mounting local directory to another local directory (lofs)

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

mounting local directory to another local directory (lofs)

Hi

I want to mount some local directory to another directory. how to do this?
11 REPLIES 11
Avinash20
Honored Contributor
Solution

Re: mounting local directory to another local directory (lofs)

You can mount a Logical volume to a directory

You can mount a directory from One server to another via NFS.

You can mount it but for is the reason

# bdf
..
/dev/vg00/lvol4 5199992 1625680 3548920 31% /home

# mount /home /tmp/avinash

# bdf
/dev/vg00/lvol4 5199992 1625680 3548920 31% /home
/home 5199992 1625680 3548920 31% /tmp/avinash
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: mounting local directory to another local directory (lofs)

# mkdir /tmp/senthil
# mkdir /tmp/senthil1
# mount /tmp/senthil /tmp/senthil1

# bdf
Filesystem kbytes used avail %used Mounted on
/tmp/senthil 5128192 732048 4361872 14% /tmp/senthil1


Could we know your exact requirement on why you like to do this..
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Ganesan R
Honored Contributor

Re: mounting local directory to another local directory (lofs)

>>>I want to mount some local directory to another directory. how to do this?<<<

It is possible through NFS. First export the local directory through NFS. Then mount the directory on same server as NFS client.

You need to configure this server as both NFS server and NFS client to achieve this.

ok. why do you want to do this?
Best wishes,

Ganesh.
T G Manikandan
Honored Contributor

Re: mounting local directory to another local directory (lofs)

#mount -F lofs /a /b
Ganesan R
Honored Contributor

Re: mounting local directory to another local directory (lofs)

Hi Again,

Prabably creating links between the directories will be the one you are looking for.
Best wishes,

Ganesh.
senthil_kumar_1
Super Advisor

Re: mounting local directory to another local directory (lofs)

why they are mounting local directory to another directory?

Ex:

/emd/tpw 46088192 35151808 10851176 76% /users/tpw01
/emd/ansys1 161792000 128048432 33480000 79% /home/ansys1
/emd/ansys2 161792000 99284416 62019392 62% /home/ansys2
lgprime:/opt/apps/local/bin
5120000 1230984 3646016 25% /opt/apps/local/bin
lgprime:/opt/apps/local/emdutil
5120000 1230984 3646016 25% /opt/apps/local/emdutil
/emd/100dirs 204800 186423 18377 91% /users/100dirs
/emd/home 61440000 54518448 6871256 89% /home/gen
/emd/100dirs_links 204800 186423 18377 91% /users/100dirs_links
/emd/wip 204800 186423 18377 91% /users/wip
/emd/tpidata 9224192 6554222 2586564 72% /users/tpidata
aa128116:/win_appl 7782400 4259616 3302616 56% /win_dev

why they have done this.

what is the purpose?


Avinash20
Honored Contributor

Re: mounting local directory to another local directory (lofs)

Hi,

Could you post the output of /etc/fstab

Do you see the mountpoints there..
We could get more information from there
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
T G Manikandan
Honored Contributor

Re: mounting local directory to another local directory (lofs)

The LOFS can be used to create a new virtual file system with a different alternate path.

For example a lofs can be created for / under /tmp/newroot so that the entire hierarchy can be used under /tmp/newroot.

This can be useful in hiding the / file system mounted as read only or as other options.
T G Manikandan
Honored Contributor

Re: mounting local directory to another local directory (lofs)

Ganesan R
Honored Contributor

Re: mounting local directory to another local directory (lofs)

Hi Senthil,

Yes, These filesystems are looks lofs.

#man 1m mount_lofs ->will give you better explanation how to create these mounts
Best wishes,

Ganesh.
Eric SAUBIGNAC
Honored Contributor

Re: mounting local directory to another local directory (lofs)

Bonjour,

I can see some NFS mount points. For example :

"aa128116:/win_appl 7782400 4259616 3302616 56% /win_dev"

By chance, do you use automount feature ? Check with "mount -p" and search for mount points type like "autofs". Then check configuration with file "/etc/auto_master" and any file pointed by auto_master.

If automount is configured, it could explain why you have lofs mounts. When automount detects a cross NFS mount, that is an NFS mount on the server itself, it changes it to an LOFS mount. This situation can arise in a cluster when you mount NFS shares through the virtual IP of a package.

Eric