/usr directory full - move /usr/share/doc ?
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
-
Yea. I've already done everything else. I'm just curious as to whether or not the commands are accurate... 0 -
Yea. I've already done everything else. I'm just curious as to whether or not the commands are accurate...
Yes, those commands would work, however I suggest copying the entire directory in your initial commands if you choose to take this action. EX: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.0 -
I was going to move the doc directory. not the entire share directory. You are suggesting that I should copy the entire share directory? 0 -
New I was going to move the doc directory. not the entire share directory. You are suggesting that I should copy the entire share directory?
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.0 -
got it... copy instead of move. thanks. 0 -
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 :) 0 -
thanks for the feedback twhiting9275 yea ... all those logs are removed. 0 -
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? 0 -
Please post the output from the following command: stat /usr/share/doc
Thank you.0 -
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 0 -
So, with moving all of that, did this help your problem? What's the disk usage on /usr/ now? 0 -
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. 0
Please sign in to leave a comment.
Comments
13 comments