LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-14-2005, 02:03 AM   #1
adrian_stephens
LQ Newbie
 
Registered: Apr 2005
Location: Cambridge, UK
Distribution: Fedora Core (10)
Posts: 17

Rep: Reputation: 0
How do I avoid creating lots of mount points?


I have a FC3 install using LVM.
I want to structure this with files related to the system in one logical volume and files related to user activities in another.

I've done this by creating logical volumes file filesystems for:
/home
/var/www/html
/var/spool/mail

So I ended up with on smallish (and static) filesystem containing the "system" and three additional filesystems that I expect to expand slowly over time.

What I'd ideally like to do is put all the variable size items in a single filesystem, set it to the remaining size of the volume group and forget about it.

I could create a single filesystem with home, html and mail as subdirectories. I could mount this somewhere under root.
I could create symbolic links from /home to /newroot/home ...
But, I suspect that this doesn't hide the fact that it's a symbolic link.
So cd /home, cd .. would not return you to root.

I don't think it is possible to use hard links between filesystems.

Any help/comments welcome!

Adrian
 
Old 04-15-2005, 03:23 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
You missed /var/log/. In fact, most files under /var tend to grow with time.

One option is to switch to using qmail, which can spool email directly under the user's home directory, removing the need to a seperate /var/spool/mail directory.

Another option is to create one big filesystem and just remount it in all three places. Disadvantages of this include a rather messy filesystem and the fact that you can't use different filesystem types for each partition. (Tip: you probably want a journalled filesystem for /var/)

The only filesystem that I know of that can grow on demand is tmpfs, which stores its contents entirely in memory (in RAM or swap). This is often used for /tmp to prevent it from filling up with files on machines that get rebooted frequently. However, you might consider using this for some things under /var, if you don't care about keeping log or spool files between reboots.

You could also set up three partitions on a hard disk, and resize them as needed with gnuparted (http://www.gnu.org/software/parted/). The downside to this is that you will probably have to use a FAT32 partition if you want to resize all three partitions freely, which puts limitations on filenames and permissions (as well as being case-insensitive).
 
Old 04-16-2005, 12:53 AM   #3
adrian_stephens
LQ Newbie
 
Registered: Apr 2005
Location: Cambridge, UK
Distribution: Fedora Core (10)
Posts: 17

Original Poster
Rep: Reputation: 0
I just checked. /var/log is 8MB in size. I've got several GB free on the
root partition, so I'm not overly worried that this will create a problem.

My foot fs is ext3. My other filesystems are reiserfs, which seems to have
the benefit that it can be resized (increase in size) while mounted. The
other advantage is that fsck operations seem very fast.

I changed to reiserfs partly because I was trying to speed up my gallery
server. (http://chezstephens.no-ip.org/gallery). There's an initial pause
of ~30s while it scans all the albums that I was hoping to decrease by the
change. No such luck.
 
Old 04-16-2005, 06:46 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
Quote:
Originally posted by adrian_stephens
I changed to reiserfs partly because I was trying to speed up my gallery
server. (http://chezstephens.no-ip.org/gallery). There's an initial pause
of ~30s while it scans all the albums that I was hoping to decrease by the
change. No such luck.
You will get better results at optimising your hard-disk by looking at lower-level options that the filesystem type.

Use the noatime and nodiratime options on this partition. This will stop the computer writing to disk every time a file is read, which may speed up the scan.

Also, look at hdparm and make sure that the disk itself is being accessed efficiently.

You might also want to look at your swap configuration; watching /proc/meminfo will tell you if you are going into swap or not. It helps to have swap partitions near the start of the hard disk. If you have several hard disks, you might try turning off any swap partition on the same disk as the albums you are scanning, as this will cut out delays due to the heads moving around between swap and data and free up disk cache for use with data.

Hope that helps,

Robert J. Lee
 
Old 04-16-2005, 10:26 AM   #5
adrian_stephens
LQ Newbie
 
Registered: Apr 2005
Location: Cambridge, UK
Distribution: Fedora Core (10)
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the tips.

I added these options to my fstab. Seemed to gain ~10% delay reduction on
loading my gallery webpage.

I got a similar reduction playing with hdparm and turning on 32-bit IO and
unmask interrupt.

My system is 128MB RAM Am I likely to see a performance improvement by increasing the amount of RAM?
 
Old 04-16-2005, 03:46 PM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
If the delay is caused by reading data off the hard disk, then changing the RAM won't help.

On the other hand, if the delay is caused by your system excessively swapping to the hard disk, then adding more RAM will reduce the amount of swapping, and thus speed things up a lot.

You can tell which it is by temporarily turning off swapping:
Code:
sudo -c '/sbin/swapoff -a'
If your system needs to swap, then gallery will die (you will get either an out-of-memory or a SIGSEGV error). You can turn swapping back on with
Code:
sudo -c '/sbin/swapon -a'
The swappiness setting may also have an effect (try searching LQ for swappiness)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating mount points and is the data safe if i change system JMK Linux - Newbie 4 01-22-2004 10:57 AM
Creating permission restore points david_ross LinuxQuestions.org Member Success Stories 0 09-10-2003 03:40 PM
SCRIPT: check if auto-mount mount-points are still mounted markus1982 Linux - Software 0 05-25-2003 06:48 AM
Mount Points? Mr_Floppy4 Linux - General 2 10-14-2002 11:03 PM
mount points... Jeffrey Linux - General 6 02-24-2001 01:09 PM


All times are GMT -5. The time now is 07:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration