cancel
Showing results for 
Search instead for 
Did you mean: 

mounting lofs

divya_gupta
Occasional Visitor

mounting lofs

I have a query regarding loopback mount of a filesystem in HP-UX.  I implemented it in the following way:

# mount -F lofs /opt/app /tmp/looptest


# ls -lad /opt/app/d1snl1d4 /tmp/looptest/d1snl1d4
drwxr-xr-x 13 d1snl1d oinstall 4096 Sep 25 2012 /opt/app/d1snl1d4
drwxr-xr-x 13 d1snl1d oinstall 4096 Sep 25 2012 /tmp/looptest/d1snl1d4


# chmod 700 /opt/app/d1snl1d4


# ls -lad /opt/app/d1snl1d4 /tmp/looptest/d1snl1d4
drwx------ 13 d1snl1d oinstall 4096 Sep 25 2012 /opt/app/d1snl1d4
drwx------ 13 d1snl1d oinstall 4096 Sep 25 2012 /tmp/looptest/d1snl1d4


# bdf /opt/app/d1snl1d4
Filesystem kbytes used avail %used Mounted on
10.87.160.71:/vol/v_wfli01n2_d1snl1d4_sh39845888 10016 39835872 0% /opt/app/d1snl1d4


# bdf /tmp/looptest/d1snl1d4
Filesystem kbytes used avail %used Mounted on
10.87.160.71:/vol/v_wfli01n2_d1snl1d4_sh39845888 10016 39835872 0% /opt/app/d1snl1d4


Findings:
***What I see is that HP /tmp/looptest is simply another copy of the /opt/app volume with its submounts. Moreover, chmod and/or chown of the mounted filesystem shouldn’t change in /tmp/looptest. ****

Whereas, we were successful in implementing it in SunOS.

loopback mount in HP-UX

# mount -F lofs -o nosub /opt/app /tmp/looptest

 

# ls -lad /opt/app/d1bsf1a1 /tmp/looptest/d1bsf1a1

drwxr-xr-x  15 d1bsf1a1 d1bsf1a1    4096 Feb 27 10:31 /opt/app/d1bsf1a1

drwxr-xr-x   2 root     other        512 Feb 22 10:35 /tmp/looptest/d1bsf1a1

 

# chmod 700 /opt/app/d1bsf1a1

 

# ls -lad /opt/app/d1bsf1a1 /tmp/looptest/d1bsf1a1

drwx------  15 d1bsf1a1 d1bsf1a1    4096 Feb 27 10:31 /opt/app/d1bsf1a1

drwxr-xr-x   2 root     other        512 Feb 22 10:35 /tmp/looptest/d1bsf1a1


# df -k /opt/app/d1bsf1a1

Filesystem            kbytes    used   avail capacity  Mounted on

10.87.160.71:/vol/v_wfli01n2_d1bsf1a1_sh

                     4980736 1204680 3776056    25%    /opt/app/d1bsf1a1


# df -k /tmp/looptest/d1bsf1a1

Filesystem            kbytes    used   avail capacity  Mounted on

/dev/dsk/c1t0d0s0    14752131 5984168 8620442    41%    /


Could you please lend me some expertise?

Thanks,
Divya.

 

 

 

P.S. This post has been splitted off from other thread, created as a new thread, and edited its subtitle - HP Forums Moderator

1 REPLY
Dennis Handly
Acclaimed Contributor

Re: mounting lofs

As you said, it looks like LOFS creates something like a hardlink and there are no changes in permissions.

 

Have you looked at the WARNINGS in mount_lofs(1M)?