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

2008-02-21 Thread William L. Maltby
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
> 
> 
> [EMAIL PROTECTED] 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  
> nate
> 

-- 
Bill

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


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

2008-02-21 Thread nate
Robinson Tiemuqinke wrote:

> Please help.
>

Looking at my BIND init scripts it calls this:
mount --bind /proc ${ROOTDIR}/proc >/dev/null


[EMAIL PROTECTED] 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.

nate

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


[CentOS] How to mount 'virtual' file systems /proc and /sys ??

2008-02-21 Thread Robinson Tiemuqinke
Hello,

 I am setting chrooted environments with Centos/Fedora
Core distros recently. packages are installed in the
chrooted environment without problems.

Then when it comes to /proc and /sys 'virtual'(not
real hardware) file systems I got confused -- some
documents say I should run 'mount -t proc none /proc;
mount -t sysfs none /sys' to mount /proc and /sys,
while some others say commands 'mount -t proc proc
/proc; mount -t sysfs sysfs /sys' instead. I don't
know what is the difference between the source device
name 'none' against 'proc' and 'sysfs'. Any one can
shed a light onto this?

In fact, I tried command 'mount -t proc kidding /proc;
mount -t sysfs kiddingAgain /sys' to successfully
mounted /proc and /sys without explicit problems;
access to /proc/* and /sys/* worked fine as well. Then
what are the purposes of the sourceDevice field for
'virtual' file systems? Thanks.

Please help.





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos