ln modifies the CDH log directory

Source: Internet
Author: User

Encounter a problem, because the default is to install CDH System/var/log directory, because it is a virtual instance, the system disk smaller only 50G, is the use of the system cm will be alerted to the alarm log directory space is not enough, if the script is deleted periodically, although it can solve the current problem, but not a good way. The other is to directly modify the configuration file, all the/var/log/* manually changed to/home/var/log/* and then restarted, but this feeling is very much, manually change the trouble.
Then try to link this directory to another large disk attached to the mount.

The goal is to link the/var/log to/home/var/log so that the log will be written to/home/var/log (my home directory is mounted on a large hard drive) directory without taking up the system disk space.
Build the/home/var/log and execute the following command:

Ln-s  /home/var/log/var/

will report the following error,
ln:creating Symbolic Link '/var/log ': File exists

Because it is the log directory, so there are no important files, directly remove/var/log, CDH will re-build these log files.


Also modify the permissions of the next/home/var/log to avoid permissions issues
I am only operating in the test environment.
If it is an online environment, consider carefully whether there are other important files in the/var/log, and whether other processes will be affected.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.