Author Topic: multiple mount points  (Read 2323 times)

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1481
  • In theory, theory=practice, in practice ???
multiple mount points
« on: April 26, 2012, 07:11:14 PM »
Code: [Select]
[user@localhost ~]$ df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              15G  4.5G  9.6G  32% /
/dev/sdb1             7.4G  3.1G  3.9G  45% /media/LXDE-OTHER


The above code is from my regular PCL LXDE1 running as usual on sda1.


Code: [Select]
[user@localhost ~]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                 7781584   3372032   4019224  46% /
udev                    501704         0    501704   0% /dev
tmpfs                   509636        76    509560   1% /dev/shm
tmpfs                   509636       668    508968   1% /run
/dev/sdb1              7781584   3372032   4019224  46% /
tmpfs                   509636         0    509636   0% /sys/fs/cgroup
tmpfs                   509636         0    509636   0% /media
/dev/sdb1              7781584   3372032   4019224  46% /tmp
/dev/sdb1              7781584   3372032   4019224  46% /var/tmp
/dev/sdb1              7781584   3372032   4019224  46% /home
/dev/sda1             15705792   4863508  10054300  33% /media/LXDE1


The above code is from my LXDE-OTHER (non-PCL) running on sdb1.


There is no problem or help requested, as a matter of fact they both run
quite similarly overall, but rather a general inquiry.

The LXDE running on sdb1 looks like a recipe for pizza bread.   What are they trying
to accomplish with all the extra mount points ?     Remarkably I've never seen PCL do this.
Benefits or disadvantages to making multiple mount points ?  I can't discern any at this
time.   

Thanks in advance for your response.

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

Online muungwana

  • Hero Member
  • *****
  • Posts: 6237
Re: multiple mount points
« Reply #1 on: April 26, 2012, 07:29:04 PM »

what is the output of the following command?

cat /etc/fstab
.. 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: 1481
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #2 on: April 26, 2012, 07:50:24 PM »

what is the output of the following command?

cat /etc/fstab

OK, from sda1

Code: [Select]
[user@localhost ~]$ cat /etc/fstab
# Entry for /dev/sda1 :
/dev/sda1 / ext4 defaults 1 1
none /dev/pts devpts defaults 0 0
# Entry for /dev/sdb1 :
#UUID=2EC4-A8C2 /media/LIVECD vfat defaults,umask=000 0 0
#none /proc proc defaults 0 0
#/dev/cdrom /media/cdrom auto rw,noauto,user,exec 0 0


and from sdb1

Code: [Select]
[user@localhost ~]$ cat /etc/fstab

#
# /etc/fstab
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=1de5b0fc-c0bb-4b17-890f-0de19f721ca7 /                       ext4    defaults        1 1
# UUID=0d5eac3e-e3d4-492f-8239-2261adfd701c swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

Nothing was altered by me, except for commenting out the swap on sdb1
as I don't use that.   So from there sdb1 has 10 mount points for the OS.

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

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1481
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #3 on: April 27, 2012, 02:31:17 PM »
Well let me say this.   I can't say where this multiple mount
array has helped.   It's more like a technical exercise rather
than a technical necessity.   

Have a good one.

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

Online muungwana

  • Hero Member
  • *****
  • Posts: 6237
Re: multiple mount points
« Reply #4 on: April 27, 2012, 02:53:17 PM »

what does this command give you?

cat /proc/mounts

I have heard in passing about some distro using tmpfs by default. I think that disto uses it, what benefits it gives, i dont know but it must have some use or they wouldnt use 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 sir_herrbatka

  • Full Member
  • ***
  • Posts: 238
Re: multiple mount points
« Reply #5 on: May 13, 2012, 01:45:15 AM »
Code: [Select]
tmpfs                   509636         0    509636   0% /mediaThat's a good idea! I will set /media as tmpfs.
Quote
I think that disto uses it, what benefits it gives, i dont know but it must have some use or they wouldnt use it.
Less hard drive spinning. If you don't need logs after reboot you can mount /var/logs in tmpfs. Helps to save power in netbooks a little.

Calibre spammed my /media with...
Code: [Select]
Kindle Main Memory/       Kindle Main Memory (25)/  Kindle Main Memory (41)/
Kindle Main Memory (1)/   Kindle Main Memory (26)/  Kindle Main Memory (42)/
Kindle Main Memory (10)/  Kindle Main Memory (27)/  Kindle Main Memory (43)/
Kindle Main Memory (11)/  Kindle Main Memory (28)/  Kindle Main Memory (44)/
Kindle Main Memory (12)/  Kindle Main Memory (29)/  Kindle Main Memory (45)/
Kindle Main Memory (13)/  Kindle Main Memory (3)/   Kindle Main Memory (46)/
Kindle Main Memory (14)/  Kindle Main Memory (30)/  Kindle Main Memory (47)/
Kindle Main Memory (15)/  Kindle Main Memory (31)/  Kindle Main Memory (48)/
Kindle Main Memory (16)/  Kindle Main Memory (32)/  Kindle Main Memory (49)/
Kindle Main Memory (17)/  Kindle Main Memory (33)/  Kindle Main Memory (5)/
Kindle Main Memory (18)/  Kindle Main Memory (34)/  Kindle Main Memory (50)/
Kindle Main Memory (19)/  Kindle Main Memory (35)/  Kindle Main Memory (51)/
Kindle Main Memory (2)/   Kindle Main Memory (36)/  Kindle Main Memory (52)/
Kindle Main Memory (20)/  Kindle Main Memory (37)/  Kindle Main Memory (6)/
Kindle Main Memory (21)/  Kindle Main Memory (38)/  Kindle Main Memory (7)/
Kindle Main Memory (22)/  Kindle Main Memory (39)/  Kindle Main Memory (8)/
Kindle Main Memory (23)/  Kindle Main Memory (4)/   Kindle Main Memory (9)/
Kindle Main Memory (24)/  Kindle Main Memory (40)/

If i mount /media as tmpfs I can avoid accumulating folders since after reboot they will be all gone.  

PS
tmpfs are stored in ram so it's faster then reading from HDD. If user have a plenty of ram he can mount firefox cache as tmpfs to speed up it a bit.
« Last Edit: May 13, 2012, 01:51:26 AM by sir_herrbatka »

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: multiple mount points
« Reply #6 on: May 13, 2012, 02:42:18 AM »

If i mount /media as tmpfs I can avoid accumulating folders since after reboot they will be all gone.  


/media is the directory where removable media, such as USB drives and CDs are auto-mounted. Once the media is ejected, the folder(s) created in the /media directory are automatically deleted.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline sir_herrbatka

  • Full Member
  • ***
  • Posts: 238
Re: multiple mount points
« Reply #7 on: May 13, 2012, 02:43:29 AM »
They should be deleted... ;-)

We don't live in perfect world.
« Last Edit: May 13, 2012, 02:45:06 AM by sir_herrbatka »

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1481
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #8 on: May 15, 2012, 12:53:22 PM »

what does this command give you?

cat /proc/mounts

I have heard in passing about some distro using tmpfs by default. I think that disto uses it, what benefits it gives, i dont know but it must have some use or they wouldnt use it.

FYI

Code: [Select]
[user@localhost ~]$ cat /proc/mounts
rootfs / rootfs rw 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=501704k,nr_inodes=125426,mode=755 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,relatime 0 0
tmpfs /run tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
/dev/sdb1 / ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
cgroup /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
systemd-1 /dev/mqueue autofs rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=27,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
systemd-1 /dev/hugepages autofs rw,relatime,fd=29,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
systemd-1 /sys/kernel/security autofs rw,relatime,fd=30,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
systemd-1 /sys/kernel/debug autofs rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
tmpfs /media tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
/dev/sdb1 /tmp ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb1 /var/tmp ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb1 /home ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
gvfs-fuse-daemon /home/pf/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=500,group_id=500 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/sdc1 /media/SDHC ext4 rw,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
[user@localhost ~]$
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 Yankee

  • Hero Member
  • *****
  • Posts: 1481
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #9 on: May 15, 2012, 01:00:53 PM »
Additionally, on my regular LXDE I've commented out
these two lines in etc/fstab.

#none /proc proc defaults 0 0
#none /dev/pts devpts defaults 0 0

Can't see any performance decrease, but my flash
drive seems to run slightly faster with them commented
out.   I know they're mounted because I can read
everything in those directories with the file manager.

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

Online Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6379
  • I'm going South
Re: multiple mount points
« Reply #10 on: May 15, 2012, 01:06:15 PM »
Why on earth would you want to remove the /proc filesystem? It's a virtual filesystem. It doesn't take up any space on your hard drive, but it gives you a way of directly interacting with the kernel.

You can probably manage without /dev/pts - if you never use a tty. But one day you will need one.

« Last Edit: May 15, 2012, 01:13:32 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Online muungwana

  • Hero Member
  • *****
  • Posts: 6237
Re: multiple mount points
« Reply #11 on: May 15, 2012, 01:15:00 PM »
Why would you want to remove the /proc filesystem? It's a virtual filesystem. It doesn't take up any space on your hard drive, but it gives you a way of directly interacting with the kernel.

Adding to this, one of the philosophies of unix says everything is a file in a unix system.

The /proc file system is there to give a running state of the system and all of its processes in a way that can be accessed as if they are regular files.

There are a lot of programs that get system properties from reading /proc files, there are a lot of programs that change the running state of the kernel by writing to files in /proc.

It will be best if you enable it, it exist purely in memory and shouldnt take that much memory.

If some part of the system seem to run faster without it, then that suggests some part of the system gets in option from there and goes with the default if it cant find them. The solution will be to change the value that exist there and not have the entire file system removed.
.. 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: 1481
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #12 on: May 15, 2012, 01:33:40 PM »
Why on earth would you want to remove the /proc filesystem? It's a virtual filesystem. It doesn't take up any space on your hard drive, but it gives you a way of directly interacting with the kernel.

Well from what I've read the info in /proc is read once by programs for kernel info.
It might just take a nano-second to do so from the regular directory on the hard
drive as well, leaving another filesystem out of RAM.   Works OK so far.

Quote
You can probably manage without /dev/pts - if you never use a tty. But one day you will need one.

Here again this is read once by programs as far as I know and right now on my machine there is nothing in it.
Something in RAM with nothing in it.


I looked at my regular etc/fstab the other day and somehow the /proc filesystem was commented
out.   I don't know how, I didn't do it, but I've been using it for awhile like that without that loaded in RAM.
Commented out the /dev/pts filesystem also just to test and converse about these.   I'll put them
back in just a few days and leave the system as-is then.

thanks for the response(s)

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

Online muungwana

  • Hero Member
  • *****
  • Posts: 6237
Re: multiple mount points
« Reply #13 on: May 15, 2012, 01:47:40 PM »

Well from what I've read the info in /proc is read once by programs for kernel info.

i have a program that reads "/proc/partitions" to get partition list everytime a user request a list of partitions to open a device.

It look like it will totally fail to function on your system that does not have /proc.

How many different ways can a running program get a list of partitions?

It will be interesting to see how long you will go before you hit the first problem.
.. 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: 1481
  • In theory, theory=practice, in practice ???
Re: multiple mount points
« Reply #14 on: May 15, 2012, 01:56:45 PM »

Well from what I've read the info in /proc is read once by programs for kernel info.

i have a program that reads "/proc/partitions" to get partition list everytime a user request a list of partitions to open a device.

It look like it will totally fail to function on your system that does not have /proc.

How many different ways can a running program get a list of partitions?

It will be interesting to see how long you will go before you hit the first problem.

Contents of /proc/partitions read without the actual /proc filesystem
loaded in RAM, just from the hard drive.   Is there a command I can run
to see if it is read OK similar to your program, just to see ?

Code: [Select]
major minor  #blocks  name

   8        0   15761088 sda
   8        1   15759733 sda1
   8       16    7811072 sdb
   8       17    7806566 sdb1
   8       32   31330304 sdc
   8       33   31326718 sdc1
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