You are not logged in.

#1 2010-08-11 23:57:58

Slax
Member
Registered: 2010-08-11
Posts: 39

Web server partition scheme

Hello Arch, I've been using Ubuntu for about three months and wanted to switch to something less bloated for my first dedicated web server.

I'll be writing a small web application using Django and the default SQLite.
Does anyone know where most of of the data will end up?
I know I'll need a fairly large /var for /var/www and maybe logs, but where is the default Django SQLite database stored?

I have a 80GB SATA drive on a SiliconImage softraid card.

This is my current idea for the partition scheme
sda1 primary /boot 100MB
sda2 primary /       15000 MB
sda3 extended
sda5 logical /usr    10000 MB
sda5 logical /var    the rest

Would I need more than 10GB for /usr? Less?

Last edited by Slax (2010-08-11 23:59:44)

Offline

#2 2010-08-12 00:03:38

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Web server partition scheme

Django states that all of the projects should be kept out of /var/www because there is the possibility of people being able to read your code. SQLite files are simply text files and can be kept anywhere. Basically, it doesn't matter where you keep them. wink

Offline

#3 2010-08-12 00:09:35

Slax
Member
Registered: 2010-08-11
Posts: 39

Re: Web server partition scheme

itsbrad212 wrote:

Django states that all of the projects should be kept out of /var/www because there is the possibility of people being able to read your code. SQLite files are simply text files and can be kept anywhere. Basically, it doesn't matter where you keep them. wink

Ok in that case I have no idea which directories will grow once I've configured Django.
Is there any real problem with simply partitioning boot and / ?

Offline

#4 2010-08-12 00:41:17

Proofrific
Member
Registered: 2008-01-05
Posts: 215

Re: Web server partition scheme

Slax wrote:

Is there any real problem with simply partitioning boot and / ?

It depends on your situation.  It could be nothing, or it could be a huge problem.  For example, say everything (except /boot) is in a single partition.  If you run out of space because a log file grows too big, then the server may stop serving the website.  That's alright for your personal website because the downtime while you fix the problem isn't so bad.  But, if it's a business site, then it can result in lost sales, etc.

Offline

#5 2010-08-12 01:09:06

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Web server partition scheme

Slax wrote:
itsbrad212 wrote:

Django states that all of the projects should be kept out of /var/www because there is the possibility of people being able to read your code. SQLite files are simply text files and can be kept anywhere. Basically, it doesn't matter where you keep them. wink

Ok in that case I have no idea which directories will grow once I've configured Django.
Is there any real problem with simply partitioning boot and / ?

In general, there isn't much of a problem with that. I would suggest maybe a separate /home directory, but I don't even use that, so I guess it's up to you. It usually helps if you need to reinstall/change distros. Also, most Django code should be kept in /home/username, at least from my experiences with it.

Offline

#6 2010-08-12 01:50:58

Slax
Member
Registered: 2010-08-11
Posts: 39

Re: Web server partition scheme

Ok,

I think I'll partition boot and /, then see at what rate my database and log files grow, then repartition.

Last edited by Slax (2010-08-12 01:51:13)

Offline

#7 2010-08-12 02:02:20

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Web server partition scheme

Use LVM.

Offline

#8 2010-08-12 22:49:06

Slax
Member
Registered: 2010-08-11
Posts: 39

Re: Web server partition scheme

fukawi2 wrote:

Use LVM.

LVM doesn't solve my problem of cylinder control, or fragmentation, does it?

In fact I can see no advantage of LVM besides filesystem control.

Last edited by Slax (2010-08-12 22:49:24)

Offline

#9 2010-08-12 23:00:14

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Web server partition scheme

Slax wrote:

LVM doesn't solve my problem of cylinder control, or fragmentation, does it?

You didn't say anything about cylinders or fragmentation....?

Offline

Board footer

Powered by FluxBB