-
Become root
-
vi /lib/systemd/system/ceph-osd@.service
Change the values of proc and files to the following (extracted from ulimit -a).
[Service]
LimitNOFILE=78452
LimitNPROC=80248
-
$ sudo systemctl daemon-reload
-
Restart OSDs
$ cat update-systemctl.sh
for ip in $(cat ip.list)
do
scp ceph-osd@.service $ip:/tmp
ssh $ip sudo cp /tmp/ceph-osd@.service /lib/systemd/system/ceph-osd@.service
ssh $ip sudo systemctl daemon-reload
ssh $ip sudo sudo systemctl start ceph\*.service ceph\*.target
done
$ cat ceph-osd@.service
[Unit]
Description=Ceph object storage daemon osd.%i
After=network-online.target local-fs.target time-sync.target ceph-mon.target
Wants=network-online.target local-fs.target time-sync.target
PartOf=ceph-osd.target
[Service]
LimitNOFILE=78452
LimitNPROC=80248
EnvironmentFile=-/etc/default/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
ExecStartPre=/usr/lib/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --id %i
ExecReload=/bin/kill -HUP $MAINPID
ProtectHome=true
ProtectSystem=full
PrivateTmp=true
TasksMax=infinity
Restart=on-failure
StartLimitInterval=30min
StartLimitBurst=0
RestartSec=20s
[Install]
WantedBy=ceph-osd.target
References
Written with StackEdit.
No comments:
Post a Comment