LinuxQuestions.org
Review your favorite Linux distribution.
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 03-24-2009, 12:35 PM   #1
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
partitioning tips?


I'm setting up a new server with Debian and I was wondering about some partitioning tips (which partitions on which logical drives, and how big the partitions ought to be).

The old server is a BSD machine and is set up as follows:

Drive: 0
/ (root) 30% (hardly used at all)
/usr 55% (3/4 full)
/tmp 15% (used a little)

Drive: 1 (each partition used moderately, local least of all. I think soft was created by the previous admin just to place downloaded software RPMs and scratch may have been created as the name implies, for whatever came up).
/local 33%
/scratch 22%
/soft 22%
/var 22%

Drive: 2
/mail

Several other drives contain home directories for various classes of user (in case you're wondering why the /home directory isn't causing the root partition to be used a lot).

Questions:

Should I use a similar partition set up or is Debian different in some way that would recommend a different set up?

Also, what are /usr and /local used for generally? Well, I think /usr contains installed programs on the BSD box (since I had to run the machine without Drive 1 at one time), but I'm not sure what /local is for.

Thanks guys.
 
Old 03-24-2009, 01:51 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 272Reputation: 272Reputation: 272
I'm not at my Debian box to peek in local to see what's there, but here's a description of where Debian puts some things (see section 4.3).

The one thing they neglected to mention is that downloaded packages (from using apt-get, synaptic, or aptitude) are cached in the /var/ directory (/var/cache/apt, I believe). So you want to make sure /var is large enough for a complete install/dist-upgrade. Though you can always temporarily mount another larger partition to store the files during upgrade.
 
Old 03-24-2009, 03:46 PM   #3
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by pljvaldez View Post
I'm not at my Debian box to peek in local to see what's there, but here's a description of where Debian puts some things (see section 4.3).

The one thing they neglected to mention is that downloaded packages (from using apt-get, synaptic, or aptitude) are cached in the /var/ directory (/var/cache/apt, I believe). So you want to make sure /var is large enough for a complete install/dist-upgrade. Though you can always temporarily mount another larger partition to store the files during upgrade.
Ok, thanks for the tips. Maybe I'll make var a little bigger. It looks like Debian makes no use of /usr/local and the /usr/local on my system is actually a pointer to /local. I could probably skip the partition altogether, but I'll keep it just for old times sake. I can always use it as an alternate scratch.
 
Old 03-24-2009, 04:05 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
The Debian partitioner has an option to install a 'server partitioning scheme'. In fact, it creates separate /, /boot, /usr, /var, /tmp and /home partitions across the disks you allocate for it. As BSD user you'd be comfy with partitioning on a text interface I suppose The installer itself also has a 'task-selection' build-in and it pre-installs Apache and PHP for starters when you select the server option. Of course you can always choose to do a manual install for greatest level of control.

On my fileserver I allocated a 40 GB IDE disk for the system and a 1 TB RAID 5 setup (3x 500GB SATA) for /home. With that much space I was generous for /var and /usr at 8 GB each and as I have 4 GB RAM on board another 8 GB was set aside for /tmp. /boot has 2 GB and / no less then 5 GB. The rest is spare (used for a temp /home before the SATA RAID was set up). It runs for about a year now, even longer if you don't take an upgrade-reboot into the equation
 
Old 03-25-2009, 08:51 AM   #5
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Dutch Master View Post
The Debian partitioner has an option to install a 'server partitioning scheme'. In fact, it creates separate /, /boot, /usr, /var, /tmp and /home partitions across the disks you allocate for it. As BSD user you'd be comfy with partitioning on a text interface I suppose The installer itself also has a 'task-selection' build-in and it pre-installs Apache and PHP for starters when you select the server option. Of course you can always choose to do a manual install for greatest level of control.
I don't know if I'd say comfortable, but I can figure anything out of I have time. So any time the server is not exploding I'm relatively comfortable anyway

Quote:
Originally Posted by Dutch Master View Post
On my fileserver I allocated a 40 GB IDE disk for the system and a 1 TB RAID 5 setup (3x 500GB SATA) for /home. With that much space I was generous for /var and /usr at 8 GB each and as I have 4 GB RAM on board another 8 GB was set aside for /tmp. /boot has 2 GB and / no less then 5 GB. The rest is spare (used for a temp /home before the SATA RAID was set up). It runs for about a year now, even longer if you don't take an upgrade-reboot into the equation
Here's what my current server looks like:

mount point - size - used

/ (root) 0.2 of 20 GB
/usr/local 3.3 of 30 GB
/tmp 3.5 of 15 GB
/usr 13 of 20 GB
/var 5 of 20 GB
(and several other non-system partitions)

I wonder how we ended up using so much space in /usr . I'll have to poke around. EDIT: of course, the web page is in /usr I could probably find a better place for that in the future.

Last edited by davidstvz; 03-25-2009 at 08:57 AM.
 
Old 03-25-2009, 09:10 AM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
When looking at partitioning schemes for Servers I always stop and ask "What is this server going to be used for ?" Web, Database, email etc ? Where do those applications store their data by default ? /var/www/html /var/lib/mysql/ /home/$USERNAME/Maildir

Nothing like creating a small /var partition then discovering you don't have enough space for your Database, website or other data.
 
Old 03-25-2009, 02:56 PM   #7
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Absolutely. But that can conveniently be avoided by sym-links. I'd like to store data on data-disks (i.e. /home) so a system failure won't loose me that data... Sym-linking from a system-location (/usr/var/www) to a user-location (/home/<user>/www/public_html) doesn't impose a security risk, the other way round isn't such a good idea...
 
  


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
I need tips. kalleanka Programming 2 07-19-2006 08:41 AM
Tips lukepiewalker Linux - Newbie 4 08-03-2005 06:18 AM
Any tips? little_ball Linux - Networking 3 01-05-2004 11:42 AM
Slackware Tips Artimus Slackware 2 02-28-2003 06:21 PM
Tips Mia Linux - Newbie 0 12-07-2001 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:11 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration