Results 1 to 10 of 10
  1. #1

    Recommended Partitions on Linux

    Hello,

    I have a linux server with cPanel and 500GB Disk Space. After investigating I think I would have the following partitions.

    /
    /boot
    /home
    /dev/shm
    /tmp
    /usr
    /var

    My problem is knowing how much to allow to each partition. I will be using the server for hosting accounts, shared and resellers.

    Also what would you recommend the swap file size be?

    Many thanks

  2. #2
    Join Date
    Apr 2003
    Location
    NC
    Posts
    3,080
    Replied to your post over here: http://forums.cpanel.net/f34/help-pa...ng-126533.html

    How much RAM do you have? Generally nowadays most servers won't touch swap all that often, at least hopefully. We usually use 2-4Gb of space for swap and if you need to can always add it later on via a loop file. RAM is cheap enough if you routinely are hitting 4Gb of RAM generally time to look at upgrading.
    John W, CISSP, C|EH
    MS Information Security and Assurance
    ITEagleEye.com - Server Administration and Security
    Yawig.com - Managed VPS and Dedicated Servers with VIP Service

  3. #3
    Join Date
    Jan 2002
    Location
    Home, chair
    Posts
    723
    /usr partition should have some extra space too, since it will host apache logs which can grow large depending on popularity of your sites, better give it a bit more than run out of space later.

  4. #4

    *

    The /home and /var should have the maximum size.

    By default:

    The document root of websites will be located at /home/<user>/public_html.. So all the contents will be stored here hence it should have enough space.

    All the user databases will be stored at /var/lib/mysql so the /var also should have enough space.

  5. #5
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,429
    Hi

    I have always used the following..

    /boot (100 MEG)
    / (REST)
    swap (max of 1 gig per swap partion, upto 2 x actual memory)

    and the reason for me doing this is that i have never been succesful in setting up the partitions in such a way that in 3 months time I find myself running out of space on /var (becuase of peoples excessive mysql DB's and huge logs)

    The only downside is that quota's is sometimes an issue, but not often enough for it to be a big issue.

    Hope that helps.

  6. #6

    *

    hmm...that is a good option...
    but it has it's on downside.......

    If you keep them as separate partitions, any file system error in one partition will not affect the other.

    Otherwise if there occurs a corruption in the file system occurs which can't be fixed by fsck ..the data will be lost.

    If they are on separate partition, the other partitions can be kept as safe.............

  7. #7
    Join Date
    Apr 2002
    Location
    Auckland - New Zealand
    Posts
    1,572
    I'd usually do something like

    /boot = 200MB
    / = 10GB
    /var = 15GB
    /usr = 15GB
    /tmp = 2GB
    /home = rest

    You could even just go 20GB /usr/and /var, depends obviously how large your disk to start with. I'd not recommend putting everything under / for a few reasons, security is one, plus having a large / partition that won't mount due to a file system error is just one other.

  8. #8
    Join Date
    Mar 2009
    Location
    InfoPark, Cochin, India
    Posts
    986
    What control panel are you intending to use... cPanel use /home as home directory and Plesk uses /var as the main home directory.So partition will depend on your control panel.

    Usually SWAP size should be double the RAM, that was in old days when RAM was limited. You can have 2GB of SWAP. IF your server is taking more than 2GB of SWAP then there is something wrong with your server configuration.

  9. #9
    Join Date
    Jul 2009
    Posts
    178
    Everyone has forgot the swap space.

    also use swap 2 times of ram to improve your server performance.

  10. #10
    Join Date
    Apr 2003
    Location
    NC
    Posts
    3,080
    Quote Originally Posted by eth10 View Post
    Everyone has forgot the swap space.

    also use swap 2 times of ram to improve your server performance.
    Everyone, no if you read up actually plenty of people talked about SWAP.

    Also as VIPoint said 2x the amount of RAM is *not* recommended anymore. That is a very old recommendation and not really needed anymore. If you are swapping a few Gb of stuff you usually something you need to look into. I personally usually use 2Gb of swap on most configurations and except for a few very rare cases it works great.
    John W, CISSP, C|EH
    MS Information Security and Assurance
    ITEagleEye.com - Server Administration and Security
    Yawig.com - Managed VPS and Dedicated Servers with VIP Service

Similar Threads

  1. How to see I see drives and partitions in Linux
    By DataDork in forum Hosting Security and Technology
    Replies: 3
    Last Post: 04-09-2006, 01:04 PM
  2. Mounting OS X partitions in Linux
    By funkytaco in forum Hosting Security and Technology
    Replies: 4
    Last Post: 12-13-2005, 09:48 PM
  3. quick question about linux partitions.
    By benoitb in forum Web Hosting Lounge
    Replies: 4
    Last Post: 04-13-2004, 10:34 PM
  4. Best configuration / partitions for Linux SM machine?
    By theNonsuch in forum Hosting Security and Technology
    Replies: 1
    Last Post: 03-07-2004, 01:52 AM
  5. Linux Partitions
    By silversurfer in forum Hosting Security and Technology
    Replies: 1
    Last Post: 12-24-2002, 12:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •