The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disk partitions - /boot to small ?

Discussion in 'Workarounds and Optimization' started by Rhaziel, Dec 3, 2011.

  1. Rhaziel

    Rhaziel Registered

    Joined:
    Dec 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm a beginner cPanel administrator, so please be tolerant ;). A few weeks ago I started preparing the server to start WHM for our customers. I would like to discuss about disk partitioning. Installing CentOS 6 Minimal system I prepared partition in accordance with the guidance:
    Advanced Options: Pre-Installation

    So with 100 GB drive I did:
    / - 40 960 MB (40 GB)
    /boot - 70 MB
    /usr - 16384 MB (16 GB)
    /var - 16384 MB (16 GB)
    /home - rest of the drive (~23 GB)
    /tmp - 1024 MB (1 GB)
    swap - 2048 MB (computer with 1024 MB RAM)

    Already during the transition to the next step, the system CentOS announced that the recommended minimum /boot partition for it is 75 MB. But I decided to leave 70 MB (in accordance with guidance from cPanel).
    Now, however, from time to time (once per week / two weeks) I get few mails from server cPanel with warning that /boot is used in 84%:
    "Drive Warning: /dev/sda1 (/boot) is 84% full"

    If so, then I did something wrong? Should I use to create a larger partition / boot?
     
  2. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    Generally /boot should be minimum 150-250 MB but as you have created it already I am afraid you won't be able to increase it.
     
  3. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Probably you have there a few older kernels you could remove.
     
  4. Rhaziel

    Rhaziel Registered

    Joined:
    Dec 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    There isnt any problem to create a new server. But what with offical guide from cPanel - Advanced Options: Pre-Installation - this mean, there are wrong?
    In this case, what with others partitions?
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Most times, /boot doesn't contain any data in it. What data do you have in it? Any partition can be too small if you put unneeded data into that partition:

    Code:
    ls -lah /boot
     
  6. Rhaziel

    Rhaziel Registered

    Joined:
    Dec 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Code:
    # ls -lah /boot
    
    razem 49M
    dr-xr-xr-x.  5 root root 1,0K 11-22 11:47 ./
    dr-xr-xr-x. 24 root root 4,0K 11-24 13:54 ../
    -rw-r--r--.  1 root root  96K 06-27 21:08 config-2.6.32-71.29.1.el6.x86_64
    -rw-r--r--.  1 root root  96K 2011-05-20  config-2.6.32-71.el6.x86_64
    drwxr-xr-x.  3 root root 1,0K 11-22 11:30 efi/
    drwxr-xr-x.  2 root root 1,0K 11-22 11:48 grub/
    -rw-r--r--.  1 root root  19M 11-22 11:48 initramfs-2.6.32-71.29.1.el6.x86_64.img
    -rw-r--r--.  1 root root  19M 11-22 11:30 initramfs-2.6.32-71.el6.x86_64.img
    drwx------.  2 root root  12K 11-22 11:23 lost+found/
    -rw-r--r--.  1 root root 157K 06-27 21:11 symvers-2.6.32-71.29.1.el6.x86_64.gz
    -rw-r--r--.  1 root root 157K 2011-05-20  symvers-2.6.32-71.el6.x86_64.gz
    -rw-r--r--.  1 root root 2,2M 06-27 21:08 System.map-2.6.32-71.29.1.el6.x86_64
    -rw-r--r--.  1 root root 2,2M 2011-05-20  System.map-2.6.32-71.el6.x86_64
    -rwxr-xr-x.  1 root root 3,7M 06-27 21:08 vmlinuz-2.6.32-71.29.1.el6.x86_64*
    -rw-r--r--.  1 root root  170 06-27 21:08 .vmlinuz-2.6.32-71.29.1.el6.x86_64.hmac
    -rwxr-xr-x.  1 root root 3,7M 2011-05-20  vmlinuz-2.6.32-71.el6.x86_64*
    -rw-r--r--.  1 root root  165 2011-05-20  .vmlinuz-2.6.32-71.el6.x86_64.hmac
    Is there anything I can / should safely delete?
     
  7. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    The recommended size of /boot for RHEL 6/CentOS 6 is 250 MB, per Red Hat.

    Source: 9.14.5.****Recommended Partitioning Scheme

    I'd stick with that recommendation, even if it is a tad large.

    Also, your root partition is HUGE, considering you have separate partitions for /usr, /var, and /home. Since you'll need to repartition to fix /boot anyway, you might want to consider shaving at least 20 GB off of / and placing it in /home.

    On a separate note, you'll notice in the document I linked that Red Hat states NOT to create a separate /usr partition for RHEL 6. If you get rid of /usr, make sure you take that into account when sizing the root partition. To get a good idea of how much space is currently consumed in each partition, type:

    Code:
    df -h
     
    #7 alphawolf50, Dec 5, 2011
    Last edited: Dec 5, 2011
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    These are the largest files you have in /boot

    -rw-r--r--. 1 root root 2,2M 06-27 21:08 System.map-2.6.32-71.29.1.el6.x86_64
    -rw-r--r--. 1 root root 2,2M 2011-05-20 System.map-2.6.32-71.el6.x86_64
    -rwxr-xr-x. 1 root root 3,7M 06-27 21:08 vmlinuz-2.6.32-71.29.1.el6.x86_64*
    -rwxr-xr-x. 1 root root 3,7M 2011-05-20 vmlinuz-2.6.32-71.el6.x86_64*

    What does the following show?

    Code:
    rpm -qa | grep -i system.map
    rpm -qa | grep -i vmlinuz
     
  9. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Seems you forgot these:

    -rw-r--r--. 1 root root 19M 11-22 11:48 initramfs-2.6.32-71.29.1.el6.x86_64.img
    -rw-r--r--. 1 root root 19M 11-22 11:30 initramfs-2.6.32-71.el6.x86_64.img

    I know very little about kernels, but seems that initrd images are using about 2.5 MB, instead of 19 MB initramfs images use.
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Yep, you are right as I didn't notice those being in M rather than K when looking at the list of files. The command to check for which rpm is installed for that one would be:

    Code:
    rpm -qa | grep -i initramfs
    I really would highly suggest moving the files that are not removed to / or somewhere else with more space. rpm files do not need to be in /boot partition.
     
  11. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    I would not suggest moving anything from /boot, unless you know they do not belong there.
    In the directory listing above (post #6), AFAIK there is not anything that does not belong to /boot (except directory efi, I don't know what it is for).
     
  12. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You are right again on that as I was looking at a VPS rather than dedicated machine when comparing the /boot partition. On a VPS, no contents need to be in /boot partition due to being virtual. The entries noted do need to be in /boot for a dedicated machine. I retract my prior statement for any dedicated machine such as this one.
     
  13. Rhaziel

    Rhaziel Registered

    Joined:
    Dec 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    After reading the various topics in the forum, I am ready to install the new server. On 100 GB disk I want to make partitions:

    / - 20 480 MB (20 GB)
    /boot - 250 MB
    /usr - 16384 MB (16 GB)
    /var - 16384 MB (16 GB)
    /home - rest of the drive (~46 GB)
    /tmp - 1024 MB (1 GB)
    swap - 2048 MB (computer with 1024 MB RAM)

    Does anyone have any suggestions about this partitions?
     
  14. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I really do not think you will need 20GB for / partition with /usr and /var as separate partitions. You aren't going to have much space for /home at that rate.
     
  15. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I'd like to reiterate that Redhat does not recommend creating a separate /usr partition for RHEL/CentOS 6:

    9.14.5.****Recommended Partitioning Scheme

    Look for these two bits on the link I provided:
    If you decide to have a separate /usr partition anyway, you don't need anywhere near 20GB for the root partition. Even with /usr included in /, 20GB is probably larger than you need.
     
Loading...

Share This Page