Alihossein shahabi
Alihossein shahabi

Reputation: 4352

how to start Kafka and zookeeper when the HDD is full

I have setup Kafka cluster with 3 nodes. now their hard disk is full, and Kafka and Zookeeper are down.

What is the best solution to re-start Kafka and Zookeeper?

Can I delete the directory for Kafka logs (log.dirs directory) and start Kafka again?

I using confluent version 4.0.0

Upvotes: 2

Views: 1502

Answers (2)

Ehud Lev
Ehud Lev

Reputation: 2901

If you delete log.dirs you will loose all your data, which I guess should be your last option. If you are using amazon EC2 you better try to add more disk, and after starting the brokers play with the retention policy or with replication factor or remove topics. Take a look on: https://kafka.apache.org/documentation/#basic_ops_add_topic

Upvotes: 1

Alihossein shahabi
Alihossein shahabi

Reputation: 4352

I solved this problem with this method and I hope useful for you:

  • step 1 :

    • I moved some of the log files from my servers to another server to free up a little bit of disk space. You can temporarily change the port of Kafka So nobody can produce it.
  • step 2 :

    • when the disk Was emptied, I was able to run Zookeeper and Kafka on the server.
  • step 3 :

    • now I've deleted messages (by kafka-delete-records) from some topics and released half of the hard drive
  • step 4 :

    • I stopped Kafka and Zookeeper in all servers (3 nodes)
  • step 5 :

    • I moved the Log files to their directory (I moved them in the step 1) and changed the port Kafka to 9092 again
  • step 6 :

    • And finally, I started Kafka and Zookeeper on all servers successfully

Upvotes: 0

Related Questions