Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219823 - problems handling non-netmounts inside of netmounts
Summary: problems handling non-netmounts inside of netmounts
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 257195
  Show dependency tree
 
Reported: 2008-04-30 10:15 UTC by Andrej Filipcic
Modified: 2023-01-29 02:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Filipcic 2008-04-30 10:15:23 UTC
baselayout-2 and openrc-2.2.0 have problems running nfsmount stop in case, when there are submounts into nfs directory of proc, dev, or other non-nfs filesystems. There is actually the same problem with baselayout-1 also.

Here is an example of mounts within /chroot (nfs mount point)

f9pc26 ~ # cat /proc/mounts|grep /chroot
pikolit.ijs.si:/d0/sys /chroot nfs rw,vers=3,rsize=1048576,wsize=1048576,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=194.249.156.61 0 0
udev /chroot/slc4.x86_64/dev tmpfs rw,nosuid,size=10240k,mode=755 0 0
pikolit:/d1/nfs /chroot/slc4.x86_64/net/pikolit/d1/nfs nfs rw,vers=3,rsize=1048576,wsize=1048576,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=194.249.156.61 0 0
/dev/root /chroot/slc4.x86_64/tmp xfs rw,noquota 0 0
/dev/root /chroot/slc4.x86_64/etc/resolv.conf xfs rw,noquota 0 0
/dev/root /chroot/slc4.x86_64/var/spool/PBS xfs rw,noquota 0 0
proc /chroot/slc4.x86_64/proc proc rw 0 0
pikolit:/d0/nfs/grid /chroot/slc4.x86_64/net/brenta/d1/grid nfs rw,vers=3,rsize=1048576,wsize=1048576,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=194.249.156.61 0 0
pikolit:/d0/nfs /chroot/slc4.x86_64/net/pikolit/d0/nfs nfs rw,vers=3,rsize=1048576,wsize=1048576,hard,proto=tcp,timeo=600,retrans=2,sec=sys,addr=194.249.156.61 0 0
AFS /chroot/slc4.x86_64/afs afs rw 0 0
/dev/sda4 /chroot/slc4.x86_64/data0 xfs rw,noquota 0 0


I did a dirty trick with /etc/init.d/nfsmount:
----
stop() {
        ebegin "Unmounting NFS filesystems"
        #AF
        while umount `cat /proc/mounts |grep /chroot|awk '{print $2}'`
        do
          echo "try umount chroot tree"
        done
        #AF
        umount -a -t nfs,nfs4
        eend $?
}
-----
which is obviously not a good/general solution, but it works fine in my case. Reboot/shutdown is quick and does not hang for ages.

Is there a better solution for that?
Comment 1 SpanKY gentoo-dev 2008-05-05 04:13:14 UTC
really it's going to be a problem regardless of baselayout and filesystem ... if you have any non-net based filesystem mounted below a net based filesystem, the unmounting isnt going to work.  we attempt to do all net-based unmounts and then we attempt all non-net based unmounts.  probably be the same problem while mounting too.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-29 02:51:44 UTC
Closing per vapier's comment.