Skip to content
Advertisements

Updating systemctl limits on Debian

  1. Become root

  2. 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
  1. $ sudo systemctl daemon-reload

  2. 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.

Categories

Uncategorized

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: