Question

Centos Partitioning

Asked by: VMWARE

Hello everybody:

My server is Dell R200 with Centos linux going to be  , webserver , database server(mysql ) ,  2 x Hard disk (each one capacity is 250 GB) , SAS 6i/R RAID, 4GB RAM.
 
Please give me required partitions and the size  since this is a web server ,  database server , , ftp server. This server will be a Virtual Shop.

please suggest me if any partition is required to be made  separate  like /etc , if required please give the size also ,

Regards
VMWARE

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-11-02 at 02:34:08ID24863172
Tags

red hat

,

centos

Topics

Red Hat Linux

,

CentOS

,

Linux Setup

Participating Experts
3
Points
500
Comments
5

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. setup SATA RAID in CentOS
    Hi, I have an ASUS motherboard (K8V-X), with an AMD 64. I'm running CentOS 4.1. The mobo is capable of SATA RAID, and I have two identical harddrives just for this purpose. When I first installed CentOS, I didn't really know what to do in the partition setup portion of the ...
  2. How to best partition a 250GB drive for CentOS 5.3 x…
    Hello, I'm relatively new to Linux, and I need help setting up a workstation that will be used to run VMware Workstation for lab scenarios and testing. The relevant hardware config is as follows: (1) 250GB and (4) 500GB drives and 16GB RAM. I've been reading about LVM and it...
  3. Parted Partition Resizing
    I have a new server running CentOS that I just got from 1and1. It has what strikes me as a very odd (ie, stupid) partitioning scheme for CentOS (at least for a web server, which is presumably what these servers are by far most often being used for) in that the bulk of the dr...
  4. How do I switch off Software RAID on CentOS
    I have a CentOS sserver running 4.7 of the CentOS distribution. I need to virtualise it into my VMWare ESXi host but I cannot do this, because the machine is configured with a software RAID - which VMWare cannot handle. Is there any way to disable the RAID for the conversion...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: savonePosted on 2009-11-02 at 04:07:06ID: 25718666

There are no requirements that I know of.  It would all be up to you, you could even probably just go with the default filesystem layout.  Some people might choose to use one drive for OS and one drive for the database, some might choose to stripe the drives to get better performance, and some folks even like the /var partition on a seperate drive / partition.  

 

by: mwecomputersPosted on 2009-11-02 at 06:04:01ID: 25719319

Please define 'Virtual Shop'...

When it comes to provisioning servers, it's best to know what your environment is going to be intended for. Are you wanting the server to run as a multi-application server -- i.e. Apache webserver, MySQL database server?

A quick and easy way to setup the server would be to have it kickstarted (call a configuration file from a separate web server [see code snippet for example]), thus provisioned with the partitions and packages you need to have installed as well.

install
url --url http://mirror.centos.org/centos/5.4/os/x86_64 
lang en_US.UTF-8
keyboard us
text 
network --device eth0 --bootproto static --hostname=myserver --ip 192.168.1.2 --gateway 192.168.1.1 --netmask 255.255.255.0 --nameserver 192.168.1.1 --noipv6 
rootpw password
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone America/New_York
bootloader --location=mbr 
zerombr yes
clearpart --all
part /boot --fstype ext3 --size=200 --asprimary
part swap --size=2048 --asprimary
part / --fstype ext3 --size=4096 --asprimary
part pv.30 --size=0 --grow
volgroup vg00 --pesize=32768 pv.30
logvol /var --fstype ext3 --name=var --vgname=vg00 --size=2048
logvol /opt --fstype ext3 --name=opt --vgname=vg00 --size=1024
logvol /usr --fstype ext3 --name=usr --vgname=vg00 --size=4096
logvol /home --fstype ext3 --name=home --vgname=vg00 --size=2048
logvol /tmp --fstype ext3 --name=tmp --vgname=vg00 --size=1024
logvol /var/lib/mysql --fstype ext3 --name=mysqldb --vgname=vg00 --size=10000 

%packages
@editors
@text-internet
@core
@base
device-mapper-multipath
xorg-x11-server-Xnest
net-snmp-utils
sysstat
vim-enhanced
xinetd
ntp
screen
net-snmp-utils
-cups
-cups-libs
-irda-utils
-pcmciautils
-wireless-tools
-ypbind
-bluez-libs
-bluez-gnome
-bluez-utils
httpd
mysql
mysql-server
php
php-pear
php-mysql
php-gd
php-cli
php-mbstring
gcc 
%post
SERVERNAME=myserver
SERVERTYPE=`echo $SERVERNAME | cut -c1-3`
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:

Select allOpen in new window

 

by: it4sohoPosted on 2009-11-02 at 08:57:52ID: 25721108

Choosing a Unix (Linux) partitioning scheme is about like choosing a car maker -- everyone has an opinion and a "favorite"... but there is no single "right" answer, although there are certainly some wrong ones.

With the notation that you have 2 identical 250GB drives, and an SAS RAID Controller, it should go without saying that your first consideration is that you'll want to install your CentOS onto a RAID-1 array (e.g.: a mirror). This will mean that each drive will be a mirror of the other. But it also means that, of the 500GB of storage you bought will yield just 250GB of usable raw storage after the mirror is established.

Never the less, here are some of the criteria you should consider in partitioning your space (and I'll throw in a new variable - filesystem type!).

1) There is no REQUIREMENT that there be more than 1 partition. It is perfectly legal and legitimate to install everything onto a single (root) partition. Old-timers (of which I am admittedly one) might warn you about the system crashing if the filesystem (and there is only 1) gets full. Since there is only 1 partition, this is true -- but it equally true of any system. However, Linux will not CRASH in this occurrence, although its functionality will be greatly curtailed.

2) Reasons for using additional partitions might include:
 - choice of fileystem:
    Linux likes to boot to ext2 or ext3 - the latter being greatly preferred - but you may want to use a more specialized filesystem, like XFS or JFS
    For example, I keep my system files on an ext3 partition, my web & e-mail files on ext3, and my media & database files on XFS
 - backup/archive planning:
    Some admins like to separate "system files" from "user data" - especially for backup or archival purposes
    Also, some backup & archival tools (like dump) work better on whole partitions vs. directory trees
 - Physical location
    Adding additional storage media USUALLY involves creating new partitions. The exception would be if you begin to use some kind of virtual storage management -- like Logical Volumes -- which CAN use multiple physical volumes for single partitions. (NOTE: Your RAID 1 array will be doing this already!)
 - Virtual Environments
    Many admins of VMware and other virtualization packages like to use separate partitions for each virtual environment. This is not usually REQUIRED, but some prefer it.

Now, all of the above being said, when I partition systems for client use, I generally follow the following pattern:

1) Hardware RAID-1 (just like you have)
2) 10GB root partition (/) using ext3 fs
3) 4GB swap space (that's equal to the RAM in most of my servers -- just like yours)
4) ALL REMAINING SPACE allocated to a /home partition formatted to XFS

But again, those are just "my" ways -- and there can be arguments made for and against the decisions I make!

I hope this helps!

Dan
IT4SOHO

 

by: VMWAREPosted on 2009-11-06 at 07:49:00ID: 25760112

Hello,

What do you think of this partitioning scheme?

[root@fidelcolor ~]# vi /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults,noatime        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda6         swap                    swap    defaults        0 0
LABEL=SWAP-sda7         swap                    swap    defaults        0 0
LABEL=SWAP-sda8         swap                    swap    defaults        0 0

I want to install here Magento, an ecommerce platform...
http://www.magentocommerce.com/

 

by: it4sohoPosted on 2009-11-06 at 09:53:46ID: 25761316

OK... first of all, the fstab says nothing about partition sizes, but it does say something about filesystem types and mountpoints -- and in this case, I do have some thoughts, although I don't think you'll like them...:

1) You appear to be using the / filesystem as the primary storage filesystem. This places your "user files" and MOST of your "system files" on the same partition. Personally, I like to separate the two (usually / for system files & /home for user files).

1a) I do NOT like having a separate partition for /tmp -- if you think /tmp should not be on the root partition, make it a symbolic link to /var/tmp and make /var a separate filesystem

1b) I also do NOT like having /boot as a separate partition. This practice comes from VERY old Linux times when you had to have one of a very short list of very unfriendly filesystems to "boot" the kernel from, then after the kernel modules were loaded, you could load the remaining filesystems that were "friendlier" (more fault resistant). This "best practice" stopped being a "best practice" MANY years ago (as-in around the release of version 2.2 of the kernel -- note kernel 2.4 was released in 2001, so we ARE talking more than a decade ago -- ancient times in the computer world!)

1c) I have already mentioned that I'm not particularly in favor of having a separate /var partition -- but I'm not nearly as "adamantly opposed" to this practice (especially if you link /tmp to /var/tmp) as I am to the separate /boot partition.

2) There is absolutely nothing valuable added by having 3 separate swap partitions on the same physical drive(s). Even driving around with 4 complete, full-sized spare tires (in your car) at least has ONE scenario where it could come in handy (blowing all 4 tires is EXTREMELY unlikely, but statistically possible -- so there is at least some TINY chance you might need all 4 spare tires at once)... but having 3 separate SWAP partitions gains you absolutely nothing except complexity -- and I view unnecessary complexity as a NEGATIVE, not a positive.

So, as you can see, I'm not a big fan of your partitioning scheme... to re-iterate my earlier suggestion, were it my system (and were I running Magento), I would create the following partitioning scheme:

partition location        size         fstype        mountpoint
============       ===         ======    ============
/dev/sda1                  10GB        ext3           /
/dev/sda2                   4GB         swap         swap
/dev/sda3                  remainder xfs             /home

A common question when looking at this is "where does /var and /tmp and /boot go?"
The answer is that ALL of it goes to the / (ext3) partition!

You would install the software or Magento to the /home partition (and make sure its databases are likewise on /home).

For what you're looking to do, it is equally reasonable to use the following partitioning scheme:
partition location        size            fstype        mountpoint
============       ===            ======    ============
/dev/sda1                  all but 4GB   ext3           /
/dev/sda2                   4GB             swap         swap

I hope this helps! Just remember -- these are my OPINIONS... they are mine alone, and I take full responsibility for them! :-)

Dan
IT4SOHO

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...