Results 1 to 10 of 10

Thread: Setting up partitions

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Setting up partitions

    i am currently trying to ensure i have partitions setup correctly for a new cpanel server.

    In the past i have had issues on other servers with both /tmp and /rootfs becoming full.

    my hosting provider is ovh and i am using their reinstall option to try and do this.

    the issues i have are that i do not fully understand the linux file system in terms of mount points and partitions.

    I have the following guidelines Advanced Options: Pre-Installation which i have read through but i am really stuck when it comes to making the actual partitions

    so within ovh i created /boot with 250MB of space then / with 40GB of space

    i then added the first folder i know i needed to ahve mounted somewhere other than rootfs which was /usr with 25gb of space

    after this i get a message show up which says

    Code:
    Attention: your partition layout contains 3 primary partitions and you still have free disk space.
    
    The limit of disks allows you to have only 3 or 4 primary partitions and as many logical partitions as you wish. To use all available disk space, you may:
    
        create the last primary partition using all the remaining space
        create as many logical partitions as you wish (subject to disk space)
    So should i be using logic partitions?

    My other question is if i have managed to setup the /usr and /var as seperate partitions do i then need to do something during the cpanel install to make them use this part of the drive rather than the normal path which i think was within /root

    all in all very noob about this so thanks in advance for the advice.

  2. #2
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,461
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Setting up partitions

    We recommend putting everything on a single large partition. If you do not create a /tmp partition when you partition the hard drive, cPanel will create a file and mount it as /tmp, and that can be resized later if necessary with no effects on the rest of the hard drive.

    Unless you have very specific needs, we advise not trying to carve up a hard drive into separate /home, /usr, /var, etc. partitions, because it is just impossible to guess what your future needs will be, and it is very easy to outgrow a critical partition with no way of foreseeing this happening.

    If you absolutely must divide up the drive into partitions, logical volume management (LVM) is a good option, because you can resize a logical volume without reformatting it or reformatting the entire hard drive. Your data center or administrator should be able to explain LVM in greater detail and help you configure it.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation - Find cPanel hosting


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Setting up partitions

    i have no reasons at all to make seperate partitions. i assumed it was the done thing as all my previous servers had them.

    Is there a guide to resizing the files if/when they become to small / in danger of being full?

    can i specify the filesizes within cpanel setup?

  4. #4
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,461
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Setting up partitions

    Partition sizing is done by fdisk, which is part of the operating system and has nothing to do with cPanel. Partitions are sized and formatted before cPanel is ever installed.

    If you look at our installation documentation, you will see that we recommend one swap partition, and one partition for everything else:

    Step 5: Configure Your Operating System

    If your previous servers had many small partitions, it is because your data center or administrator set them up that way before installing cPanel. cPanel does not partition the hard drive or format partitions.

    There is nothing in cPanel for specifying partition sizes, because cPanel does not partition the hard drive. This is all done by fdisk when the operating system is installed, before cPanel ever enters the scene.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation - Find cPanel hosting


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  5. #5
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Setting up partitions

    Quote Originally Posted by cPanelJared View Post
    Partition sizing is done by fdisk, which is part of the operating system and has nothing to do with cPanel. Partitions are sized and formatted before cPanel is ever installed.
    Sure i understand that. i was just wondering how the filesizes for the files are dictated. as you mentioned the /var folder will be created if there is not a partition for it. how is this resized if required?

    Quote Originally Posted by cPanelJared View Post
    If you look at our installation documentation, you will see that we recommend one swap partition, and one partition for everything else:

    Step 5: Configure Your Operating System
    i did see another version here which said to make other sizes. Advanced Options: Pre-Installation

    i take it that is for advan ed users (i am not) and i dont require any of that additional partitioning.

    Quote Originally Posted by cPanelJared View Post
    If your previous servers had many small partitions, it is because your data center or administrator set them up that way before installing cPanel. cPanel does not partition the hard drive or format partitions.

    There is nothing in cPanel for specifying partition sizes, because cPanel does not partition the hard drive. This is all done by fdisk when the operating system is installed, before cPanel ever enters the scene.
    yes i understand that. i am just wanting to ensure i know what i am doign as i ahve had about 10 - 15 different issues now because of /tmp or /rootfs filling up and causing the server to stop working correctly.

    What i meant to ask was after i have partitioned the hard drive in whatever way seems best (for example / and swap file) you said that cpanel will then create a file and mount it as /tmp

    How do i resize this if it is too small? can i dictate what this file size will be anywhere?

  6. #6
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,461
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Setting up partitions

    Quote Originally Posted by siparker View Post
    as you mentioned the /var folder will be created if there is not a partition for it. how is this resized if required?
    No, cPanel will create a file for the /tmp directory, not /var, and mount it as a partition.

    The file that is mounted as /tmp is created by /scripts/securetmp. The size is specified in that file. By default, it is 512 MB, which should be more than large enough for most servers.

    Remember that /tmp is used for small, transient files that typically do not last very long. A notable case is session cookies used by site scripts. They are very small, and should be deleted after a session ends. Let cPanel create the default size when it installs. You can resize it later if it proves to be too small, but that is an unusual case.

    The following describes how to use /scripts/securetmp to make a new /tmp:

    http://forums.cpanel.net/f5/problem-...ion-76122.html

    If you want to resize /tmp, alter the value of my $tmpdsksize in /scripts/securetmp before you run it. However, again, we have seen that the default size is more than adequate on most servers, and I strongly disadvise trying to alter this on a new installation. If /tmp fills up, the best fix is to fix what is filling it up so that it stops happening, not try to resize it.
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation - Find cPanel hosting


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  7. #7
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Setting up partitions

    ok. sorry i had meant tmp not var sorry about that

    so the server i have has 2x3tb hdd in raid so the resulting space is 3tb

    do i just have the swap file and then the whole of the rest of the hdd space as /

    it details 40gb in the guide which was obviously a while ago now

    im keen to get this right now as i lost a hdd on the other server tonight and am having issues with another one because of some disk error which keeps happening

  8. #8
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Setting up partitions

    so i created one partition of 2tb a 28gb swap and used the remainder as a secondary partition i was thinking of using for backups as i head read somewhere backing up to the same drive can cause performance issues

    i now have the following fromt he server status is it all ok from what you can see

    Filesystem Size Used Avail Use% Mounted on
    rootfs 1.8T 3.7G 1.7T 1% /
    /dev/root 1.8T 3.7G 1.7T 1% /
    none 12G 192K 12G 1% /dev
    /dev/sda3 942G 200M 895G 1% /backup
    tmpfs 12G 0 12G 0% /dev/shm
    /dev/loop0 485M 13M 447M 3% /tmp
    /dev/loop0 485M 13M 447M 3% /var/tmp
    /dev/root 1.8T 3.7G 1.7T 1% /var/named/chroot/var/run/dbus

  9. #9
    Member
    Join Date
    Jun 2011
    Posts
    9

    Default Re: Setting up partitions

    any feedback pls

  10. #10
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Setting up partitions

    I strongly disagree with the idea that /tmp at 500MB is sufficient size for a machine that is larger than a VPS machine, and even then I'm not sure even a small machine shouldn't have at least a 2GB /tmp folder. Your machine is substantially bigger than a small server, since the drive is around 2TB large. You will most assuredly need a larger /tmp directory than our default.

    The biggest issue it that MySQL's MyISAM tables write temporary table data to /tmp and will hang if it fills up. This then logs to /var/lib/mysql/hostname.err (where hostname is the fully qualified hostname) as "Incorrect key file" entries. This is discussed at this location:

    http://forums.cpanel.net/f5/drive-cr...tml#post799162

    Resizing /tmp is discussed at this location:

    http://forums.cpanel.net/f5/drive-cr...tml#post782021

    If you end up using EAccelerator with FCGI or DSO PHP handler on the machine for PHP OPCode Caching, it will also write the cache files by default to /tmp, filling it up.

    We have many forum threads and tickets over this MySQL issue and over /tmp being too small. MySQL quits working as do websites unable to write session data when /tmp fills up, so it isn't a small issue either.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads

  1. How to use our partitions?
    By Alcedema in forum New User Questions
    Replies: 1
    Last Post: 03-17-2008, 09:52 AM
  2. partitions
    By George5 in forum New User Questions
    Replies: 1
    Last Post: 06-23-2005, 09:45 PM
  3. Partitions
    By ThaMATRiX in forum cPanel & WHM Discussions
    Replies: 11
    Last Post: 03-19-2005, 06:44 PM
  4. Best Partitions for two drives?
    By metpac in forum New User Questions
    Replies: 3
    Last Post: 06-29-2004, 03:22 PM
  5. partitions
    By newbee in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 03-31-2003, 02:16 PM