DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
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
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.
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.