LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-11-2008, 08:32 AM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
New Server build, advice on partitioning


Replacing an old backup server with a newly built one. Drive has (4) 1T internal SATA drives. I wish to install centos5 as well as setup a raid 5 on the devices.

I haven't read to much but remember something about a 2T limit on the partition. I will have the normal boot partition (do I need it on all 4 disks) swap and then one large data parition (mounted as / )

Any ideas or suggestions on how to start this / set this up is appreciated.
 
Old 07-11-2008, 09:43 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
Here's a link on some partition size limitations: http://www.cyberciti.biz/howto/quest...ition-size.php

And no, I don't recommend you creating a swap and then a very large / with everything under it.

Do a custom disk partitioning. Create your /boot without RAID is what I would suggest, you don't need it on all the disks.

Then create an LVM. Not sure what it is, read up, you'll thank me later. It simplifies administering your partitions later, etc.

Within the LVM, create your other partitions. Start with /, then /usr, /tmp, /var and /home. Then a swap partition. I'd say these should be your minimum number of partitions that are separate from each other. Size them accordingly, / usually is small and never grows that much. So 1024MB should be sufficient to start with.

/usr is usually about 3-5GB in size on a full CentOS install. Maybe around 8GB allocated to start with is plenty. Unless you start adding a bunch of applications, this might not grow at all.

/tmp always depends. Depending on what your system is going to be doing and what will be using tmp, I usually start with like 2048MB or 2GB. Same with /var unless I'm running a database. If it's MySQL, at times I'll create a separate /var/lib/mysql partition and give it the size I need. Same could be done for PostgreSQL, etc.

/home always depends as well. If you're going to have a lot of users, start with 10GB or more. If it's just you and you don't plan on putting a lot of files on there, make it smaller. Make it bigger if you want.

The nice thing about LVM is you can grow and reduce the sizes of each on the fly.

Need a /data partition to store other stuff, create that.

Separating each main partition ensures that / is always safe and won't get filled up by users, runaway processes, etc.

Create your swap to the size you think you need, match the size of memory in the server is a good starting point.

After you create the partitions, create your RAID on whatever the LVM resides on, etc. Also, I don't use up all available space when dealing with LVM. Grow when needed so you're basically reserving available disk space. Linux file systems usually benefit when they are around 80% usage from what I've seen. Having too much disk space around is just wasteful if it's not being used.

Last edited by trickykid; 07-11-2008 at 09:45 AM.
 
Old 07-11-2008, 02:44 PM   #3
linux_option
LQ Newbie
 
Registered: Jul 2008
Distribution: CentOS, Fedora, OpenWRT
Posts: 8

Rep: Reputation: 0
Nice overview, I just have one question. If I was trying to protect all partitions except /boot and swap from drive failure, should the LVM Volume group be created first and then mirrored (or setup with RAID 5), or should you create identical partitions first on separate drives, create the array, and then put LVM on top of that?
 
Old 07-11-2008, 02:50 PM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
First create your hardware raid 5 mirror.

Then create two partitions; first partition will contain /boot 100MB; second partition will be a Logical Volume Partition (type 8e).

/boot cannot be inside a logical volume.

Create the rest of your other partitions as logical volumes:
/ = rootlv
/usr = usrlv
/tmp = tmplv
swap = swaplv

That's how I've always done it.
 
Old 07-11-2008, 03:34 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
Quote:
Originally Posted by ramram29 View Post
First create your hardware raid 5 mirror.
I took from the initial OP that the impression was they were using software RAID. If you do have Hardware RAID, by all means, yeah, create the RAID first.
 
Old 07-11-2008, 04:34 PM   #6
linux_option
LQ Newbie
 
Registered: Jul 2008
Distribution: CentOS, Fedora, OpenWRT
Posts: 8

Rep: Reputation: 0
So, if we are using software RAID, we should create the LVM Volume first?
 
Old 07-12-2008, 10:43 AM   #7
uniz
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
The D in RAID stands for Disks. Lvm deals with partitions. If you RAID logical volumes, it may end up on same disk. It sucks. LVM over RAID make sense.
 
Old 07-12-2008, 06:48 PM   #8
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
For Linux software RAID, /boot can only be on a RAID 1, not RAID 5. I think that's right. Someone correct me if I'm wrong
 
Old 07-24-2008, 09:54 AM   #9
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
If you have a software based RAID motherboard then you will need to disable the RAID setup in the BIOS - it will not work with Linux. These types of software RAID motherboards work only with a Windows driver. You can setup the /boot partition in a RAID1 or RAID5 under Linux. What you cannot do is put /boot inside an LVM. For example, you can create a RAID1 then create the /boot partition then the rest will be an LVM partition which will contain logical volumes, one for the root partition or any other partition.
 
  


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
Need advice on system build for a virtual server machine ielectronics Linux - Hardware 3 09-23-2007 02:50 PM
I need partitioning advice, Thanks. brjoon1021 Slackware 7 01-18-2007 09:24 AM
Partitioning advice hosler Slackware - Installation 5 01-19-2006 03:45 PM
Advice on partitioning simcox1 Mandriva 4 04-25-2005 09:44 AM
Need partitioning advice lancelott Linux - Newbie 1 06-11-2004 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:41 AM.

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