LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Moving directories to their own partitions (https://www.linuxquestions.org/questions/debian-26/moving-directories-to-their-own-partitions-123766/)

bxb32001 12-08-2003 12:24 AM

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

Y0jiMb0 12-08-2003 12:55 AM

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) :jawa:

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. :study:
Regards

bxb32001 12-08-2003 01:12 AM

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

Y0jiMb0 12-08-2003 01:33 AM

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 :cool:
Regards

bxb32001 12-08-2003 02:15 AM

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?

Y0jiMb0 12-08-2003 02:28 AM

I think this should be nice (but, again, it's your decision) :D
Regards

Y0jiMb0 12-08-2003 02:52 AM

Quote:

/dev/hdc5 /usr ext3 ro,suid,nodev,exec,auto,nouser,async 1 2
:o 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

bxb32001 12-08-2003 06:40 AM

again, thanks...


All times are GMT -5. The time now is 01:53 AM.