[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian FS structure.



On Friday 30 July 2010 04:01:10 Sthu Deus wrote:
> Good day.
> 
> Yet, do You know a guide or something that explains the *Debian* FS
> structure: which dir. is for what.
> 
> Having separated programs from data w/ diver partitions, I have put the
> following
> 
> /home
> /pub
> /var
> 
> on a single partition. All is working well, except I want to be as
> close to Debian standards as I can yet reaching my goals, therefore I
> would to know what is the best place for those in FS structure, and,
> may, Debinish way.

HTH although it may be a bit OT.

Debian is not particularly sensitive to having many separate mount points, but 
there are a few limitations to remember:

/etc and /lib must be part of /, unless you are willing to roll your own 
initramfs and can manage to mount them before starting the standard Debian 
boot process.

/var should be a filesystem that fully support POSIX locking semantics, which 
may mean "not NFS".

/home and /usr/local are, intentionally, not (or rarely) written to by the 
package manager and standard daemons.

At the minimum I recommend / and /home to be separate file systems, even for 
single-user systems.  You may also want to put /usr/local on a separate file 
system, I found it useful to share /usr/local with other distributions before.

For a multi-user system, all user-writable locations should be separate file 
systems from "system" file systems.  At the least, /var/tmp, /tmp, and /home 
should be separate file systems.  /dev/shm may be user writable, but in modern 
system /dev is already a tmpfs file system, so no worries.  This is mainly to 
prevent users of filling up system disks and making trouble for the 
administrator.  In the past, the also prevent a specific type of hardlink 
attack, but dpkg now prevents that attack independent of file system layout.  
If you run a daemon that allows users to store data which is put in /var, it 
should also be separate.

I prefer /usr, /opt, and /srv as separate file system as well, but that is 
simply to keep / small.

The most file systems I use is like this:
/ -- (something fast)
/boot -- RAID 1, bootable, of course.
/home -- (something large, sharable with other OSes)
/opt
/srv
/tmp -- tmpfs
/usr
/usr/local -- (something large, sharable with other UNIX/Linux OSes)
/var
/var/tmp -- (something fast)
/var/cache -- (something fast)

Debian handles it fine.

As far as which file system to use, I have the most experience with reiserfs.  
The "killer feature" was online growing and offline shrinking.  I don't 
recommend it anymore, but I'm not yet comfortable enough to recommend btrfs 
for "production" file systems.  So, right now I don't have a recommendation.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: