Author Topic: multiple mount points  (Read 2464 times)

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6267
Re: multiple mount points
« Reply #15 on: May 15, 2012, 02:17:28 PM »

/proc is not leaded in in RAM, it is a virtual file system. Its contents doesnt exist anywhere, you read from a file in /proc and the kernel intercepts the read directly and send you data. File sizes of all files in /proc are 0 bytes. All files in /proc takes 0 bytes of space. They do not take any space and hence you are not saying anything by not having /proc.

/proc is not loaded in memory, it is mounted on your root partition because, as i said earlier, it needs to be accessed as if it is a regular folder with regular files but they dont take any space.

Did you restart after you commented out /proc in fstab? can you check to make sure it isnt there and see if the system runs as expected?

I cant think of any program at the moment that checks /proc when they start or when they want to perform a particular operation but there must be out there.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1517
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #16 on: May 15, 2012, 02:36:41 PM »

Did you restart after you commented out /proc in fstab? can you check to make sure it isnt there and see if the system runs as expected?


Info from current /etc/mtab

Code: [Select]
/dev/sda1 / ext4 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
gvfs-fuse-daemon /home/user/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=pf 0 0
/dev/sdc1 /media/SDHC ext4 rw,nosuid,nodev,uhelper=hal 0 0

I'm running off of the sda1 right now.   The /proc filesystem mounted was done by
the kernel not etc/fstab.   That's supposed to give it quicker access to programs
than if read directly from the hard drive from the /proc directory.

My big disk it doesn't matter, but my flash drives seems to run slower with that
mounted in etc/fstab.   I think that's because it's reading and writing from
RAM to disk and vice-versa with 0 cache to guide it.   Going thru a whole search
process almost.

I'll let it run a few days, but it already has run for at least several months without the
mount in etc/fstab.   Any problems I'll post back before I remount it in etc/fstab.

thx

FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6267
Re: multiple mount points
« Reply #17 on: May 15, 2012, 03:05:27 PM »

can you open the terminal and run "top" command?

does it work as expected?

i ran "top" over strace and below is some of the file access to /proc
Quote
open("/proc/stat", O_RDONLY|O_CLOEXEC)  = 3
read(3, "cpu  21554502 77156 2340041 9065"..., 8192) = 4957
close(3)                                = 0
open("/proc/sys/kernel/pid_max", O_RDONLY) = 3
read(3, "32768\n", 24)                  = 6
close(3)                 

stat64("/proc/self/task", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
getdents(3, /* 224 entries */, 32768)   = 4196
stat64("/proc/1", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/1/stat", O_RDONLY)          = 4
read(4, "1 (init) S 0 1 1 0 -1 4202752 15"..., 1023) = 181
close(4)                                = 0
open("/proc/1/statm", O_RDONLY)         = 4
read(4, "467 14 8 8 0 72 0\n", 1023)    = 18
close(4) 

just to be sure /proc isnt there, run "cat /proc/mounts" and give the output.

"top" command  does a lot of reading in /proc and i wonder how it will behave without it.

I just looked at my program and it would crash on your system :D .. better go and check againt it
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1517
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #18 on: May 15, 2012, 04:02:27 PM »

just to be sure /proc isnt there, run "cat /proc/mounts" and give the output.

"top" command  does a lot of reading in /proc and i wonder how it will behave without it.

I just looked at my program and it would crash on your system :D .. better go and check againt it

Code: [Select]

[user@localhost ~]$ cat /etc/mtab
/dev/sdb1 / ext4 rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
gvfs-fuse-daemon /home/pf/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=pf 0 0
/dev/sda1 /media/LXDE1 ext4 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sdc1 /media/SDHC ext4 rw,nosuid,nodev,uhelper=hal 0 0

[user@localhost ~]$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev /dev devtmpfs rw,relatime,size=509716k,nr_inodes=127429,mode=755 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
none /dev/pts devpts rw,relatime,mode=620,ptmxmode=000 0 0
none /dev/shm tmpfs rw,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
/proc/bus/usb /proc/bus/usb usbfs rw,relatime,devgid=43,devmode=664 0 0
gvfs-fuse-daemon /home/pf/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500 0 0
/dev/sda1 /media/LXDE1 ext4 rw,nosuid,nodev,relatime,barrier=1,data=ordered 0 0
/dev/sdc1 /media/SDHC ext4 rw,nosuid,nodev,relatime,barrier=1,data=ordered 0 0

[user@localhost ~]$


Above code is /etc/mtab and cat /proc/mounts

Well it looks like the system is mounting /proc and /dev/pts by default just
as if they were in /etc/fstab.  They're not in my /etc/fstab.   tops runs OK too.
Would explain everything working OK.

THX

FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6267
Re: multiple mount points
« Reply #19 on: May 15, 2012, 04:18:00 PM »

/proc appears to be mounted by "/etc/rc.d/sysinit" script

the chuck of the script that does that is:
Quote
if [ ! -e /proc/mounts ]; then
   mount -n -t proc /proc /proc
   mount -n -t sysfs /sys /sys >/dev/null 2>&1
fi
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11059
  • MLUs Forever!
Re: multiple mount points
« Reply #20 on: May 16, 2012, 10:56:05 AM »

/proc appears to be mounted by "/etc/rc.d/sysinit" script

the chuck of the script that does that is:
Quote
if [ ! -e /proc/mounts ]; then
   mount -n -t proc /proc /proc
   mount -n -t sysfs /sys /sys >/dev/null 2>&1
fi

So is the fstab entry redundant? ....  or is it there are a fall-back ?

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1517
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #21 on: May 16, 2012, 01:23:27 PM »

/proc appears to be mounted by "/etc/rc.d/sysinit" script

the chuck of the script that does that is:
Quote
if [ ! -e /proc/mounts ]; then
   mount -n -t proc /proc /proc
   mount -n -t sysfs /sys /sys >/dev/null 2>&1
fi

So is the fstab entry redundant? ....  or is it there are a fall-back ?



The only line in /etc/fstab that's really needed (not mounted in other scripts)
is the first line to mount the "/" filesystem.    That's what I'm looking at.

regards,

FF
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE