Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Partitioning advice
PostPosted: Mon Jun 01, 2009 1:08 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
I realize that this is a pretty open ended question and everyone has their opinion and every situation is different depending on what you want to do with the server. I've read every post on Linode's forums about partitioning I can find taking in everyone's opinion and advice. This is what I'm thinking for a partitioning scheme. I'm looking for advice, comments, criticism, etc

Intended use of the server: web using Lighttpd (host 4 or 5 sites), database MySQL (for the 4 or 5 sites), PHP, shell account (for me)

I don't intend on hosting sites for other people, though that could happen so I am trying to set things up to make that easier to do without making a lot of changes in the future.

Code:
/ = 1 GB

/home = 2 GB (for just keeping junk and personal stuff on, probably will make this smaller in the future as my ~ on my shared host only has 31MB of stuff in it)

/var = 5 GB (contains logs, cache, www)

/usr = 2 GB

/tmp = 256 MB

EDIT (forgot /swap):
/swap = 256 MB


Should I split /var into other partitions, /var/www, /var/log, etc or just wait and see how things actually go on my server and sites?

Is /tmp too small in your experience or opinion?

What about /usr? It's my understanding that's where programs typically get installed on Linux.

I'm mostly looking to separate any "dynamic" data from / to keep / from filling up. Though I could just go with one big 8GB or 9GB partition and run a cron job to run a script to check disk usage and notify my if free space falls below a specified amount.


Last edited by waldo on Mon Jun 01, 2009 1:23 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 1:14 pm 
Offline
Senior Member
User avatar

Joined: Sat Jul 01, 2006 7:36 am
Posts: 50
Location: Ghent, Belgium
This is what I have now:

/ (ext3) 1024 MB Image Options
/swap (swap) 256 MB Image Options
/var/log/ (ext3) 1536 MB Image Options
/var/lib/mysql/ (ext3) 2048 MB Image Options
/webroot/ (ext3) 10240 MB Image Options
/var/mail/ (ext3) 1280 MB Image Options


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 5:02 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
I put it all in /. I don't see any real reason/advantage to partitioning unless you're booting multiple distros.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 5:09 pm 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
If your disk fills up from log files, what have you, your operating system won't like that very much, Linux or Windows. On Windows machines I always put data (and most programs) on a separate drive. Makes backing up the data easier or taking it to another system or well any number of reasons including keeping the OS separate from the data.

I've been doing this for many years and from everything I've read it's best practice to do the same on Linux or so it seems.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 5:13 pm 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
I have /home on a separate partition so I don't have to enable quota across all of /... Plus it just gives me a warm and fuzzy feeling.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 6:47 pm 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Hi,

I have a / and a /home.
At /home I have everything (wwwroot, mysql, localbackups).

Whenever I need to upgrade distro, I just create a new linode with everything I need, move the image to my original linode, create a new profile and boot.

I don't like upgrading distros.


Top
   
 Post subject:
PostPosted: Mon Jun 01, 2009 10:04 pm 
Offline
Senior Newbie

Joined: Sun May 18, 2008 8:52 am
Posts: 17
Website: http://www.arie-online.net
Yahoo Messenger: arie_wijayanto
Location: Indonesia - Bogor
my configuration

/ => 2 GB
/swap/ => 1GB
/home/ => 10GB -> www,mysql,log,backup

when i want to change my distro, i just change / partition with other distro, and do a little configure again


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 2:13 am 
Offline
Senior Member

Joined: Mon Feb 02, 2009 1:43 am
Posts: 67
Website: http://fukawi2.nl
Location: Melbourne, Australia
Use LVM so you can dynamically resize things as you go and react to what your server actually needs, instead of trying to guess, usually inaccurately.


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 2:36 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
You don't really need LVM if you're using Linode to manage your disks and filesystems. That's LVM on the backend. May as well just use Linode's resize feature rather than have the overhead of two layers of LVM.


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 2:57 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
I have been using LVM and reiserfs on a Linode for three or four years, precisely so that I can resize partitions on the fly. The performance penalty has not been so great as to cause a problem (or even be noticable, really).

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 4:03 am 
Offline
Senior Member

Joined: Mon Feb 02, 2009 1:43 am
Posts: 67
Website: http://fukawi2.nl
Location: Melbourne, Australia
pclissold wrote:
I have been using LVM and reiserfs on a Linode for three or four years, precisely so that I can resize partitions on the fly. The performance penalty has not been so great as to cause a problem (or even be noticable, really).

+1

That and I prefer other file systems which the Linode disk manager can't resize.


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 10:23 am 
Offline
Senior Newbie

Joined: Sun May 31, 2009 12:16 pm
Posts: 12
Interesting thread.

I am a beginner, for now everything is under /
I like the idea of separating /home from the rest. Some of you here say they keep everything under /home (wwwroot, mysql, localbackups). In the case of mysql, does it mean the mysqld program is under /home or is it only the mysql data ? In fact, programs that would reside in /home may need to access shared libs located in /usr. I guess it might have libraries conflict when mouting /home with a totally different system partition. Unless you build all your programs statically ?


Top
   
 Post subject:
PostPosted: Tue Jun 02, 2009 11:35 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
xado wrote:
Interesting thread.

I am a beginner, for now everything is under /
I like the idea of separating /home from the rest. Some of you here say they keep everything under /home (wwwroot, mysql, localbackups). In the case of mysql, does it mean the mysqld program is under /home or is it only the mysql data ? In fact, programs that would reside in /home may need to access shared libs located in /usr. I guess it might have libraries conflict when mouting /home with a totally different system partition. Unless you build all your programs statically ?


Hi,

There is no problem doing this. I'm using the default mysql-server package from repository without changes.

You just need to create a new disk image, mount /home, create a new directory "/home/mysql", chown to mysql and copy everything from you old datadir.

Then set datadir = /home/mysql in my.cnf


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group