Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the restart of osd service fails in Ubuntu

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to restart the osd service in Ubuntu. What is introduced in this article is very detailed and has certain reference value. Interested friends must finish it!

Background

OS:Ubuntu 16.04

Some configurations of osd have been modified. After modification, the osd service needs to be restarted to take effect. The configuration takes effect immediately after the first restart. After some configuration changes and restart of the osd service, the configuration is no longer in effect. The ps command looks at the processes and finds that none of the osd processes have been started.

Analysis.

When the osd process is not started, the first intuition is that there is a configuration error, and the osd process hangs after it starts. So, go to the / var/log/ceph directory, check the ceph-osd.0.log, and find that at the end of the log, there is only the log related to the closing process, and there is no information about osd startup. Then check the time of the log, which is the time when the service is turned off. In other words, osd did not start after the second restart of the service. Since it doesn't start, it's not the osd itself, but the command systemctl restart ceph-osd.target that restarts the service.

Check the status of the osd service first.

$systemctl status ceph-osd.target ● ceph-osd.target-ceph target allowing to start/stop all ceph-osd@.service instances at once Loaded: loaded (/ lib/systemd/system/ceph-osd.target; enabled; vendor preset: enabled) Active: inactive (dead) since Sun 2017-03-05 16:52:04 CST; 3s ago

Sure enough, the service is inactvice. Then check the service-related logs:

$journalctl-xeMar 05 14:21:43 node3 systemd [1]: ceph-osd@0.service: Start request repeated too quickly.Mar 05 14:21:43 node3 systemd [1]: Failed to start Ceph object storage daemon.

Sure enough, the service failed to start, and the reason given was that the startup request was too fast. This is probably related to the configuration of the osd service. Open the osd service configuration file / etc/systemd/system/ceph-osd.target.wants/ceph-osd@2.service and find that there is a limit on the server startup interval and the time limit is 30 minutes. No wonder the first time the service was started successfully, but the second time failed.

$vi / etc/systemd/system/ceph-osd.target.wants/ceph-osd@0.serviceStartLimitInterval=30min solution

Comment out the startup interval limit for the service profile and reload the service configuration.

$systemctl daemon-reload

Restart the osd service and check the status of the osd service.

$systemctl restart ceph-osd.target$ systemctl status ceph-osd.target ● ceph-osd.target-ceph target allowing to start/stop all ceph-osd@.service instances at once Loaded: loaded (/ lib/systemd/system/ceph-osd.target; enabled; vendor preset: enabled) Active: active since Sun 2017-03-05 16:47:53 CST; 5s agoMar 05 16:47:53 node2 systemd [1]: Reached target ceph target allowing to start/stop all ceph-osd@.service instances at once.

The service status changes to active and the problem is resolved.

The above is all the contents of the article "what to do if you fail to restart the osd service in Ubuntu". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report