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.

Add more space to directory usr/

Discussion in 'General Discussion' started by kusks, Jan 17, 2007.

  1. kusks

    kusks Member

    Joined:
    Aug 18, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    how do u add more space to the directory usr/ via ssh
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The simple answer is that you can't usually. You can only change the size of a partition if there's unpartitioned space on the disk.

    What you can do is to either move directories to a partition with free space on it and symlink back to them.

    Most likely you have huge apache logs in /usr/local/apache/logs and /usr/local/apache/domlogs that need processing or rotating.
     
  3. jupiter

    jupiter Member

    Joined:
    Oct 1, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Trim Trim Trim :eek: My first lesson I learned after I filled up our first box was NEVER to make the /usr and /var partitions too small ! Pain in the posterior to rectify the matter. I heard of software that can rectify this matter BUT it can be a throw of the dice as far as success to do, so symlinking seems to be the choice of most as oppose to the software. I do know though that some items just simply can't be symlinked as it causes real problems...

    I've done all my logs to the /home partition but I noticed a HUGE chunk of files
    in the /usr/share which includes the /man folders and they contain what seeems to be many binaries. Im kind of hesitant to symlink /usr/share to the /home parition primarily because I have no idea if some of the files are already symlinked thus having symlinks within symlinks or some files that simply must stay in that location etc... also compiling of programs, cpanel routines, perl modules and packages etc... all seem to make use of the /usr/share structure. I'm concerned and hesitant.

    my question is...
    Is it safe to create a symlink for /usr/share to /home/share ?????? Has anyone ever done it successfully and allow it to run this way for a period of time on a production box to see if anything strange pops up?
    I could clear over 500 megs doing that if it's safe but I have to be perfectly sure it's ok...



    Thanks in Advance
    Jupiter
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can do it, but you have to be careful and check whether any of the files within the directory tree are open (use lsof). There's always a possibility of unforeseen problems when symlinking major parts of the OS, but it is usually OK, IMX.
     
Loading...

Share This Page