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, using the Knoppix home directory howto as a guide. 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
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?
- Bryan
Re: Moving directories to their own partitions
/tmp is really tiny on both my systems, 50MB should be fine. Everything else looks Ok, however I would go with journalled filesystems for *everything* except /boot. This is what my fstab entries look like:
Code:
/dev/hdb1 / reiserfs defaults,noatime,rw 0 1
/dev/hde11 /mnt/squid reiserfs defaults,noatime,noexec 0 0
/dev/hda2 /mnt/extra2 ext3 defaults,noatime,noexec,rw 0 0
/dev/hda12 /mnt/bkps reiserfs defaults,noatime,notail,rw 0 0
--The two numeric entries at the end are for dump and fsck, see ' man fstab '.
--I'd recommend two things with all that hard drive space: Dedicate a partition (20Gig?) for backups, and consider setting up a Squid proxy server. ;-)
http://www.squid-cache.org/
--If you want more info on that, I'll be happy to send you a copy of my config and some basic instructions.
Quote:
Originally Posted by bxb32001
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, using the Knoppix home directory howto as a guide. 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
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?
- Bryan