LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 12-08-2003, 01:24 AM   #1
bxb32001
Member
 
Registered: May 2001
Location: Beijing
Distribution: Fedora, Knoppix
Posts: 204

Rep: Reputation: 30
Moving directories to their own partitions


Greetings everyone,

After reading the Debian install and security howtos, I've decided that I should move /var, /usr and /tmp to their own partitions. Thing is, I don't know how my fstab should look like and how big the partitions should be.

I would like to ask for input for the layout I plan (below).

Partition sizes:

/tmp 50 mb (or 500?)
/var 3 gb (or 2?)
/usr 4 gb
/ 500 mb
(and maybe 2 gb for /usr/local?)

Am I on the right track? Are these partition sizes okay or are they excessive? This computer is the one I'll be using for home. In the future I do plan on setting it up to host web pages as well.

fstab additions:

/dev/hda9 /usr ext2 rw 0 2
/dev/hda6 /tmp ext2 rw 0 2
/dev/hda7 /var ext2 rw 0 2


Do these entries look okay? Or should it be:

/dev/hda9 /usr ext2 defaults 1 2
/dev/hda6 /tmp ext2 defaults 1 2
/dev/hda7 /var ext2 defaults 1 2

I don't know what the numbers at the end mean... I just took these from various sample I found in LQ and Google.

Any thoughts? (and thanks in advance)

- Bryan

Last edited by bxb32001; 12-08-2003 at 01:26 AM.
 
Old 12-08-2003, 01:55 AM   #2
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Quote:
Partition sizes:

/tmp 50 mb (or 500?)
/var 3 gb (or 2?)
/usr 4 gb
/ 500 mb
(and maybe 2 gb for /usr/local?)

Am I on the right track? Are these partition sizes okay or are they excessive? This computer is the one I'll be using for home. In the future I do plan on setting it up to host web pages as well.
this depends on what you really need, and the free space you have.
Debian is a huge distribution, and if you're going to install most of the packages, you may need more space in "/usr"; I'd make a bit bigger "/tmp" and "/", and a bit smaller "/var" (unless you have special necessities).

...about "fstab", what I have is
Code:
/dev/hdc5        /usr             ext3        ro,suid,nodev,exec,auto,nouser,async        1   2
/dev/hdc6        /tmp             ext3        rw,nosuid,nodev,exec,auto,nouser,async        1   2
/dev/hdc7        /var             ext3        rw,nosuid,nodev,noexec,auto,nouser,async         1   2
this is for security reasons (I mean, the "nodev", "nosuid", "noexec"... flags)

If you want to now what do the fields in fstab mean, I'd read "man fstab", which is short and clear; also "man mount" is a good idea.
Regards
 
Old 12-08-2003, 02:12 AM   #3
bxb32001
Member
 
Registered: May 2001
Location: Beijing
Distribution: Fedora, Knoppix
Posts: 204

Original Poster
Rep: Reputation: 30
Ah, many thanks... especially for those secure fstab entries.

I have lots of room (around 90 gigs to spare) but I don't want to over do it as I'd rather use the remaining space for my work and stuff at home (mp3s & scans come into mind).

What would you recommend for /usr, /tmp, and /var (no special considerations really, other than I may plan to host my own webpage in the future)?

Thanks again...

- Bryan
 
Old 12-08-2003, 02:33 AM   #4
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Hi!
well, I don't like to tell the people how to divide their hard disk
It's very personal...
what I'll do is to show you the size of my partitions; "df -h" gives
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdc5             3.0G  2.0G  911M  69% /usr
/dev/hdc6             927M   20M  860M   3% /tmp
/dev/hdc7             1.1G   54M  999M   6% /var
Althought, I'd like to have a bit bigger "/usr" partition...
Now, you have to decide
Regards
 
Old 12-08-2003, 03:15 AM   #5
bxb32001
Member
 
Registered: May 2001
Location: Beijing
Distribution: Fedora, Knoppix
Posts: 204

Original Poster
Rep: Reputation: 30
Much apprecieated... this helps, really. For some people (like me), somebody else to show them the path.

Would this layout be better then?

/tmp - 500 mb
/var - hmmm, this is Debian... 1 gb?
/usr - 6 gb? or 8?
 
Old 12-08-2003, 03:28 AM   #6
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
I think this should be nice (but, again, it's your decision)
Regards
 
Old 12-08-2003, 03:52 AM   #7
Y0jiMb0
Member
 
Registered: Jul 2003
Location: Valencia (Spain)
Distribution: slackware 11, FEDORA CORE 4, RHEL3, Gentoo...
Posts: 361

Rep: Reputation: 30
Quote:
/dev/hdc5 /usr ext3 ro,suid,nodev,exec,auto,nouser,async 1 2
just one think I forgot: if you want "/usr" to have the "ro" flag, of course, you have to do it after the install process; ie, after the installation process you change the "fstab" file according to your needs...
Regards
 
Old 12-08-2003, 07:40 AM   #8
bxb32001
Member
 
Registered: May 2001
Location: Beijing
Distribution: Fedora, Knoppix
Posts: 204

Original Poster
Rep: Reputation: 30
again, thanks...
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
An easy way of moving /home and other directories 1kyle Suse/Novell 1 09-23-2005 03:53 AM
moving partitions toaster.waffle Linux - General 5 06-09-2005 01:15 AM
moving directories with FTP illiniguy3043 Linux - Software 2 07-08-2004 01:37 AM
moving partitions around Rocker Linux - General 7 02-02-2004 12:21 PM
Moving partitions nabil Linux - Software 5 07-17-2001 04:55 AM


All times are GMT -5. The time now is 08:13 AM.

Main Menu
Advertisement
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