Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to delete the /var/log partition permanently?


How to delete the /var/log partition permanently?

New Contributor

The node manager in the primary node was down and when I tried to start it I got the below error.

==> /var/log/hadoop-yarn/yarn/yarn-yarn-nodemanager-hbase.primary.namenode.out.1 <== No space left on device
at Method)
at sun.nio.cs.StreamEncoder.writeBytes(
at sun.nio.cs.StreamEncoder.implFlushBuffer(
at sun.nio.cs.StreamEncoder.implFlush(
at sun.nio.cs.StreamEncoder.flush(
at org.apache.log4j.helpers.QuietWriter.flush(
at org.apache.log4j.WriterAppender.subAppend(
at org.apache.log4j.RollingFileAppender.subAppend(
at org.apache.log4j.WriterAppender.append(
at org.apache.log4j.AppenderSkeleton.doAppend(
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(
at org.apache.log4j.Category.callAppenders(
at org.apache.log4j.Category.forcedLog(
at org.apache.log4j.Category.log(
at org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService$LeveldbLogger.log(
at org.fusesource.leveldbjni.JniDBFactory$OptionsResourceHolder$2.log( 

When I checked the disk space I noticed some new partitions are mounted after the cluster setup. "/var/log" is mounted as a new partition with only 976MB and it is 100% used. I was able to start node manager after deleting old log files. But the error repeats when the disk is full.

How can I get rid of this problem?

Why does ambari create a new partitions?

Can we delete "/var/log" partition permanently because the "/var" partition has enough disk space so I don't need to change the log paths?


Re: How to delete the /var/log partition permanently?


@Thanuja Kularathna

Have a look at this example

Re: How to delete the /var/log partition permanently?

Super Collaborator

Hi @Thanuja Kularathna,

you may do two things

1. Update Ambari Configuration(log4j) to point to new location where you have more space(do it for all the services). - proper way

2. just remove the partition and create a sim link to respective location where you have plenty of Space - hack around

either the cases you can get rid of the problem.

Re: How to delete the /var/log partition permanently?

New Contributor

I updated the log paths of each service in log4j settings. Seems to be a safer and a simpler way than playing around with the partitions or symbolic links.

Don't have an account?
Coming from Hortonworks? Activate your account here