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.

/usr directory full - move /usr/share/doc ?

Discussion in 'Workarounds and Optimization' started by dibello, Jul 27, 2016.

Tags:
  1. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    greetings...

    /usr directory needs appx 100 mb to enable a cPanel update

    I've already cleaned up log files etc...

    I'm thinking of moving the doc directory ( /usr/share/doc ) to another partition.

    Since I'm relatively new to this game, any feedback on whether or not the following commands will sucessfully achieve my goal would be greatly appreciated.

    # mkdir -p /home/usr/share/doc
    # mv /usr/share/doc/* /home/usr/share/doc
    # rmdir /usr/share/doc
    # ln -sfn /home/usr/share/doc /usr/share/doc

    thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I don't suggest adding a symbolic link for paths within the /usr partition. Are you sure there are no other directories with files that are not required? The following document can help you to determine what's taking up the most space in this partition:

    How to Manage your Hard Drive Space

    Thank you.
     
  3. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yea. I've already done everything else. I'm just curious as to whether or not the commands are accurate...
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, those commands would work, however I suggest copying the entire directory in your initial commands if you choose to take this action. EX:

    Code:
    mkdir -p /home/usr/share/
    cp -a /usr/share/doc /home/usr/share/
    
    Note that linking directories from /usr to /home is not supported.

    Thank you.
     
  5. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I was going to move the doc directory. not the entire share directory. You are suggesting that I should copy the entire share directory?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    No, just the "/usr/share/doc" directory. The first command simply matches the directory structure in /home. Notice the "cp" command only copies "/usr/share/doc" itself.

    Thank you.
     
  7. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    got it... copy instead of move. thanks.
     
  8. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Take a look at why /usr is so full. This shouldn't be happening, of course.
    You've mentioned logs, make sure you clean out /usr/local/apache/logs /usr/local/cpanel/logs
    Your commands in the original post should do just fine :)
     
  9. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    thanks for the feedback twhiting9275

    yea ... all those logs are removed.
     
  10. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    OK. so I went forward with everything. Copied the directory, removed the old directory, ran ln -sfn /home/usr/share/doc /usr/share/doc.

    Is there a way to test the symbolic link? when I attempted to cd to
    /usr/share/doc via command line, thinking the link would show the contents of /home/usr/share/doc... I received the "No such file or directory" error

    Looking at the contents of /usr/share/ via ConfigServer Explorer cPanel plugin does not show an alias. Using Mac terms here. Is a symbolic link visible?
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  12. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    File: `/usr/share/doc'
    Size: 4096 Blocks: 8 IO Block: 4096 directory
    Device: 306h/774d Inode: 356577 Links: 51
    Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2016-07-28 04:03:04.000000000 -0400
    Modify: 2016-07-27 21:09:45.000000000 -0400
    Change: 2016-07-27 21:09:45.000000000 -0400
     
  13. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    So, with moving all of that, did this help your problem? What's the disk usage on /usr/ now?
     
  14. dibello

    dibello Member

    Joined:
    Oct 6, 2013
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    absolutely.

    was able to update to 11.48.5.3 initially, which activated the option for alternate staging directory. then I decided to go to 11.50.6.2. not sure I'm going any higher as I'm running CentOS 5.

    and there is 3.1 GB available on usr.

    thanks for all your help.
     
Loading...

Share This Page