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.

Full /usr partition

Discussion in 'Workarounds and Optimization' started by Fbarajas, Oct 10, 2010.

  1. Fbarajas

    Fbarajas Active Member

    Joined:
    Jul 15, 2004
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Playa del Carmen, Mexico
    Hi! My server provider (ThePlanet) configured my Cpanel server with a 7.8 GB /usr partition, and now it's full.

    The main problem is with the /usr/local/cpanel/3rdparty/mailman directory, which is using almost 2 GB mainly because of the "archive/private" directory.

    I tried to move the /3rdparty/ directory to another partition and symlink it, but Mailman won't work with symlinks.

    What can I do?

    Thanks!
     
  2. 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
    If mailman is the main reason that /usr is large, you could try leaving the binaries in place and only move the space-consuming items such as the logs, messages, and so on.

    I cannot guarantee this will work even though I did test it on my own system, so you would want to create a backup for /usr/local/cpanel/3rdparty/mailman to /home or somewhere with space before you proceed:

    Code:
    cp -R  /usr/local/cpanel/3rdparty/mailman /home/mailman.bak
    After doing that, move only these directories in /usr/local/cpanel/3rdparty/mailman/ location:

    archives
    lists
    logs
    messages

    Code:
    mkdir /home/mailman
    cd /usr/local/cpanel/3rdparty/mailman
    mv archives /home/mailman
    mv lists /home/mailman
    mv logs /home/mailman
    mv messages /home/mailman
    After that, symlink them back to /usr/local/cpanel/3rdparty/mailman location:

    Code:
    ln -s /home/mailman/archives /usr/local/cpanel/3rdparty/mailman/archives
    ln -s /home/mailman/lists /usr/local/cpanel/3rdparty/mailman/lists
    ln -s /home/mailman/logs /usr/local/cpanel/3rdparty/mailman/logs
    ln -s /home/mailman/messages /usr/local/cpanel/3rdparty/mailman/messages
    Finally, chown for ownership to mailman:mailman:

    Code:
    chown -R mailman:mailman /usr/local/cpanel/3rdparty/mailman/{archives,lists,logs,messages}
    If anything doesn't work properly, then you can revert to your backup copy that you ensured to make and try to figure out another option such as only moving the archives instead.
     
  3. Fbarajas

    Fbarajas Active Member

    Joined:
    Jul 15, 2004
    Messages:
    39
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Playa del Carmen, Mexico
    Thanks, it's working now!

    Thanks Cpaneldanielle for your quick response. It's working now! Since the lists and the messages directories are quite small, I only moved the "archives" and the "logs" directory and now it's working correctly.
     
  4. 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
    Great, I'm glad that worked out for you :)
     
  5. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    I see part of my problem of a full /usr partition is excess source files.

    Code:
    383M    /usr/local/cpanel/src/3rdparty/gpl
    5.4M    /usr/local/cpanel/src/3rdparty/gpl/all_locales-1.4.18-20090526.tar.gz
    5.5M    /usr/local/cpanel/src/3rdparty/gpl/awstats-6.9
    1.1M    /usr/local/cpanel/src/3rdparty/gpl/awstats-6.95.tar.gz
    5.0M    /usr/local/cpanel/src/3rdparty/gpl/cairo-1.6.4.tar.gz
    1.4M    /usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0.tar.gz
    1.8M    /usr/local/cpanel/src/3rdparty/gpl/freetype-2.3.7.tar.gz
    2.2M    /usr/local/cpanel/src/3rdparty/gpl/gd-1.8.4
    6.8M    /usr/local/cpanel/src/3rdparty/gpl/glib-2.20.0.tar.gz
    18M     /usr/local/cpanel/src/3rdparty/gpl/horde-3.1.7p13.cpanel.tar.gz
    29M     /usr/local/cpanel/src/3rdparty/gpl/horde-webmail-1.2.7.tar.gz
    11M     /usr/local/cpanel/src/3rdparty/gpl/ImageMagick-6.4.8-2.tar.gz
    1.9M    /usr/local/cpanel/src/3rdparty/gpl/interchange-4.8.6.tar.gz
    1.8M    /usr/local/cpanel/src/3rdparty/gpl/interchange-4.9.3-200211090658.tar.gz
    2.0M    /usr/local/cpanel/src/3rdparty/gpl/interchange-5.0.0.tar.gz
    9.8M    /usr/local/cpanel/src/3rdparty/gpl/libmcrypt-2.5.8
    1.3M    /usr/local/cpanel/src/3rdparty/gpl/libmcrypt-2.5.8.tar.gz
    72M     /usr/local/cpanel/src/3rdparty/gpl/libxml2-2.6.23
    4.4M    /usr/local/cpanel/src/3rdparty/gpl/libxml2-2.6.23.tar.gz
    31M     /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.11
    49M     /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.12
    42M     /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.13
    42M     /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.14
    7.9M    /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.14.tgz
    2.0M    /usr/local/cpanel/src/3rdparty/gpl/pango-1.20.5.tar.gz
    4.2M    /usr/local/cpanel/src/3rdparty/gpl/phpMyAdmin-2.11.10.1-all-languages.tar.gz
    4.6M    /usr/local/cpanel/src/3rdparty/gpl/phpMyAdmin-3.3.7-all-languages.tar.gz
    2.1M    /usr/local/cpanel/src/3rdparty/gpl/roundcubemail-0.4.tar.gz
    1.5M    /usr/local/cpanel/src/3rdparty/gpl/rrdtool-1.0.48.tar.gz
    1.5M    /usr/local/cpanel/src/3rdparty/gpl/rrdtool-1.0.49.tar.gz
    1.1M    /usr/local/cpanel/src/3rdparty/gpl/rrdtool-1.2.27.tar.gz
    1.1M    /usr/local/cpanel/src/3rdparty/gpl/rrdtool-1.3.6.tar.gz
    2.5M    /usr/local/cpanel/src/3rdparty/gpl/squirrelmail-decode-1.2
    3.8M    /usr/local/cpanel/src/3rdparty/gpl/stunnel-4.15
    2.6M    /usr/local/cpanel/src/3rdparty/gpl/webalizer-2.01-10
    
    Would there be any reason for the multiple versions? like:
    31M /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.11
    49M /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.12
    42M /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.13
    42M /usr/local/cpanel/src/3rdparty/gpl/mailman-2.1.14

    I see my /usr/local/cpanel/ is over 1.5G
    and /usr/local/cpanel-rollback/ gives me a similar 1.8G

    It would seem that removing the old versions would help, as well as compressing the cpanel-rollback.

    Can I delete the old versions of these scripts?
     
  6. 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
    cpanel-rollback doesn't function anymore as that ability to rollback to a prior cPanel configuration is no longer supported, so you could just remove cpanel-rollback entirely.
     
  7. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    That is certainly helpful removing rollback, but if it no longer functions, why is it being created.
    My folder was just created this afternoon after the latest update.
     
  8. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    I also noticed that I have rollback turned off in tweaksettings:

     
  9. 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
    If you've saved Tweak Settings and it doesn't have that option checked but it is still saving that cpanel-rollback folder, please open a ticket. You could use either the link in my signature or WHM > Support Center > Contact cPanel
     
  10. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    ticket added: 975641

    :)
     
  11. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Due to a full /usr partition, we recently moved the mailman archives directory to /home, then created a symlink from /usr/local/cpanel/3rdparty/mailman/archives -> /home/mailman/

    This solved the /usr partition space issue HOWEVER now the nightly cpbackup is not backing up the 'archives' directory. It is only backing up the 'symlink'.

    Thoughts?

    - Scott
     
  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 could move the archives to a user's account then instead of its own directory in /home and it would then get backed up as part of that account. You could simply create a cPanel user for this purpose.
     
  13. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hmmm... this seems like an odd solution, and with likely file/folder ownership problems to boot?

    Many of us followed cPanel's previous guidelines for /usr and /var partition sizes , but now these are just too small. It would be nice to have a "cPanel approved" way of moving some things out of /usr and /var to solve things the "right" way, instead of creating one-off, unapproved solutions that may cause problems down the road.

    For now, I have found some other things to remove out of /usr to get me by for now.

    Thanks,

    - Scott
     
  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 was simply trying to help in my initial suggestion on what to do to move the archives. If you want another option on what to do, your other option would be to cron making a backup copy of the files.

    If you want an approved solution, then the issue here is we cannot approve any solution that involves moving and symlinking files and folders anyway. The approved solution is to resize /var and /usr or migrate to a machine with larger /var and /usr (or no /var and /usr that are separate partitions).

    Of note, I stated in my initial suggestion that it might not result in the ideal situation ("I cannot guarantee this will work") to move these files and folders.
     
  15. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    I really did appreciate your trying to help, and I'm sorry that I didn't so my appreciation very well.

    I was hoping for a solution that would not cause problems or be a one-off situation that could bite me later on. i.e. a symlink to some files that perhaps don't need to be backed up or some other ideas.

    If migrating to new hardware is the only cPanel suggested/approved solution, then that is good to know.

    Was just thinking that since we followed the original /usr & /var partition suggestions, we are likely not the only ones struggling with this problem, thus a tried-and-true solution may be out there. :confused:

    - Scott
     
  16. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Hi there -

    Are the contents of /usr/local/cpanel/src/3rdparty/gpl required to be preserved? It seems to me that all of that content is downloaded on demand when needed.

    I see this was asked above, but it appears it was not answered.

    I too am dealing with a cluttered /usr partition - I'm pretty convinced that The Planet undersized these to try to have the novice user "outgrow" their servers more quickly, because there is no reason that /usr and /var could not have easily have been sized twice as large.

    Thanks.

    Mike
     
  17. 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
    Those files will be reuploaded to the server every time you update cPanel forcefully, so there's not much point to remove them. The better option would be to move mailman archives and the domlogs to /home with a symlink, which have been discussed how to accomplish in several threads on the forum previously.
     
  18. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Yes - and I have previously symlinked various directories to /home, where I have plenty of space. However, I then one day ran into a server crash due to some file corruption on /home. So, because the logs are constantly being written to, that scenario resulted in a substantially worse outcome than if it was not configured that way - the worse outcome being about 6 hours of downtime. Because I did not want to risk that scenario again, I reverted.

    There is no real issue with being at about 81% on /usr or /var other than the fact that cpanel nags the hell out of you with warnings, which also then get texted to me daily.

    So, last I checked, the 80% alert threshold was inexplicably hard-coded. That means that even though I don't care about being at 80% and would rather be alerted at perhaps closer to 90%, I can't do anything about it. The downside to this is that you begin ignoring the alerts because you are receiving them constantly, so one could end up missing the fact that a critical level might be reached.

    As such, with regard to this very large directory of cpanel files, /usr/local/cpanel/src/3rdparty/gpl, if the only side-effect of deleting its contents is that the files would get recreated at some point, that is not a big concern. It's rare that I've ever had to do a forced update. As somebody had previously noted in this thread, it looks like there are several versions of certain binaries, so it is not clear if that is required or if cpanel is not cleaning up after itself and clutter is simply left behind to take up space.

    The only consequence I could forsee of deletion is that if one then allowed the partition size to grow close to capacity, and THEN did a forced update, perhaps /usr would fill up entirely and something might bomb at that point in time.

    If the recommendation, however, is to symlink a directory to /home, it seems more sensible to symlink *that* directory because it is otherwise relatively static and not being written to constantly like the log directories are.

    What say you?

    Thanks.

    Michael
     
  19. 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
    The domlogs being symlinked to home, since they are pushed daily, shouldn't risk much of anything in regards to being lost for a 1 day period if that did happen. The mailman archives could be backed up off server to ensure they are fine. Both directories are typically far larger than the one in question.

    cPanel doesn't work well with symlinks for files / folders in /usr/local/cpanel and the only one (in /usr/local/cpanel) I would ever recommend would be some of the mailman ones, which can work with symlinks fine. Thus, I will stick with what I've already stated. You are welcome to do whatever you prefer, though, of course.
     
  20. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Thanks - though I'm not fully clear on your position of wiping the contents of the /usr/local/cpanel/src/3rdparty/gpl directory. Those directories are 416 meg on two servers and 437 meg on the other.

    Is the only consequence that they will get repopulated with an upcp --force?

    Thanks.

    mrk
     
Loading...

Share This Page