How can I separate root filesystem and /usr filesystem

How can I separate root filesystem and /usr filesystem

Post by Andre Major » Mon, 15 Dec 1997 04:00:00



I would like to setup a Linux partition in two parts :

1. A small filesystem for root (/bin, /boot, /etc, /sbin, /tmp)

2. A large filesystem for the rest (/home, /opt, /usr, /var)

Thus, in the event of errors in the large filesystem, it's easy
to fsck it.

But from what I know, "mount" works in such way that I'll have
to have one filesystem for /home, another one for /usr, another
one for /var, etc. That's 4 filesystems. I would prefer to have
only 1 huge one (better repartition).

Do you know a way to do what I want ? Maybe if could mount
several filesystems onto the root ...

Thanks in advance.

--
Andre Majorel (my name is "amajorel" and my server is "teaser" dot "fr")
I have no sigblock

 
 
 

How can I separate root filesystem and /usr filesystem

Post by Alexander Vi » Mon, 15 Dec 1997 04:00:00


Trivial: make usr, var and opt to be subdirectories in home, mount home
and then
ln -sf /home/usr /usr
ln -sf /home/var /var
ln -sf /home/opt /opt
                                                Al

 
 
 

How can I separate root filesystem and /usr filesystem

Post by Robert Sand » Tue, 16 Dec 1997 04:00:00



> Trivial: make usr, var and opt to be subdirectories in home, mount home
> and then
> ln -sf /home/usr /usr
> ln -sf /home/var /var
> ln -sf /home/opt /opt
>                                            Al

Better:
Make /usr /var and /tmp /opt own partitions and then mount them.
--
Robert Sander



 
 
 

How can I separate root filesystem and /usr filesystem

Post by Andre Major » Wed, 17 Dec 1997 04:00:00



Quote:

>Trivial: make usr, var and opt to be subdirectories in home, mount home
>and then
>ln -sf /home/usr /usr
>ln -sf /home/var /var
>ln -sf /home/opt /opt

Thank you and Phil Adamson for your similar suggestions.

I've tested the performance by timing
        find /usr  >/dev/null
and
        find /link >/dev/null
where /link is a symlink to /usr. I've seen no significant
difference.

However, there is a problem. If I do what you suggest,
"find /usr" or "ls -l /usr" don't work anymore because /usr
is a symlink. Couldn't this break existing scripts or
makefiles or programs ?

Note 1 : On the other hand, "find /usr/." and "ls -l /usr/."
(note the "/.") work.

Note 2 : I can use "find -follow" or "ls -L" to force
dereferencing of symlinks, but then _every_ symlink in the
tree is dereferenced and that's not what I want (it's
_much_ slower).

I wonder how this is handled in the real world. I've seen
several FTP servers with links to places like "/pub1",
"/pub2", etc.

On AIX, they don't really solve the problem; they just
create one filesystem for /home, another one for /usr, etc.
I seem to remember that on HP-UX it's the same.
Maybe they chosed that approach because on those systems the
number of filesystems per disk is not severely limited as it
is on a PC.
And on AIX, you can have segmented filesystems. Thus you can
easily enlarge a filesystem as it grows. I don't think I can
do that on Linux. But don't take that as some Pro-AIX
adverti*t, no, no :)

--
Andre Majorel (my name is "amajorel" and my server is "teaser" dot "fr")
I have no sigblock

 
 
 

1. Separate /var filesystem for 2.5.1?

I recall installing Solaris x86 v2.4 and creating a separate /var
filesystem a few years back.  I also remember this being a pain-- I
believe the problem stemmed from the fact that while booting the system
tried to access files in /var, but the filesystem wasn't mounted yet, so
errors resulted.  

Anyhow, when installing Solaris x86 v2.5.1, I notice that when
laying out the filesystems it shows "/, /usr, /opt, /swap, /var" as
possbile defaults.  Since /var is listed here, does that mean that
Solaris v2.5.1 would boot normally if I went ahead and created this
filesystem (unlike v2.4)?

Just curious & thanks for any info,

[E-mail responses preferred since our news server is a few days behind]

Phil Schwartz

2. Netscape 4.5 doesn't do newsgroups???

3. Losing separate filesystem

4. Help with IOMEGA 250

5. root vs.non-root filesystem space

6. Q: Apache REMOTE_USER

7. How to merge separate /usr back to root partition?

8. Help! RedHat 7.1 kernel update to 2.4.9 -- dhcpcd problem

9. restore mksysb with jfs2 filesystem to jfs filesystem

10. Copy whole filesystem to another filesystem over network

11. MacWorld Linux filesystem to real filesystem?

12. CacheFS: front filesystem vs. cached filesystem (what's the difference?)

13. A filesystem within a filesystem?