Re: How to mount 'virtual' file systems /proc and /sys ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, 2008-02-21 at 11:45 -0800, nate wrote:
> Robinson Tiemuqinke wrote:
> 
> > Please help.
> >
> 
> Looking at my BIND init scripts it calls this:
> mount --bind /proc ${ROOTDIR}/proc >/dev/null
> 
> 
> [root@prod-utility-1 init.d]# mount | grep proc
> /dev/proc on /proc type proc (rw)
> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
> /proc on /var/named/proc type none (rw,bind)
> 
> 
> Not sure about the sys file system, maybe it's the
> same, maybe it's not.

For the Q posed by the OP, "man mount" gives this hint.

=======================================
The proc file system is not associated with a special device, and
when mounting it, an arbitrary keyword, such as proc can be used instead
of a device specification.  (The customary choice none is less
fortunate: the error message 'none busy' from umount can be confusing.)
=======================================

Note also the default mounts my CentOS 4.x shows

$ mount
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

On proc, sys, pts and shm, the "none" comes from /etc/fstab, modified by
fstab-sync (see the man page for it). But IIRC from long ago, anything
that doesn't have a real device associated with it, like these, can take
any value for the fs type. Back then, sentiment was sidling towards
avoiding "none" due to the potential confusion it could cause in casual
users and the fact that hum0n eyes could more quickly scan and identify
desired items when a "rational" value appeared in place of "none".

Note that the sunrpc is different - it seems to be a result of the
loaded module sunrpc.

$ /sbin/modinfo sunrpc
filename:       /lib/modules/2.6.9-67.0.4.EL/kernel/net/sunrpc/sunrpc.ko
license:        GPL
vermagic:       2.6.9-67.0.4.EL 686 REGPARM 4KSTACKS gcc-3.4
depends:

Lsmod shows a use count of one, but I don't see any module using it.

However, the modinfo output in conjunction with output of this command
(I won't include the output, there's more than a line or two) makes me
think that's it's a foundation piece for RPC stuff.

$ gunzip </boot/symvers-2.6.9-67.0.4.EL.gz |grep sun

The sunrpc mount is mounted by an action not related to a normal mount
call, apparently the actions related to starting up RPC, for NFS in my
case.

Summary: I *think* it matters not what is in the entries for items that
are not associated with real devices.

MHO: it was inane for the RH folks, and others in the world, to
continue to use "none" for *decades* after it has been deprecated.

> 
> nate
> <snip sig stuff>

-- 
Bill

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux