]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in,debian/rules: change aio-max-nr to 1048576
authorchenliuzhong <liuzhong.chen@easystack.cn>
Tue, 24 Oct 2017 02:54:33 +0000 (10:54 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 27 Oct 2017 14:18:37 +0000 (16:18 +0200)
when osd is more than 14 in one host,it report error that aio is not enough.
As the default aio-max-nr is 65536, one OSD needs 4096 aios and other programs may use aios.
This patch change aio-max-nr to 1048576 when install ceph-osd rpm package and debian package

Signed-off-by: chenliuzhong <liuzhong.chen@easystack.cn>
(cherry picked from commit 36326dc7104fc2f20f19d51b6f618a029ba072d7)

Conflicts:
   debian/ceph-osd.install - omit "usr/share/man/man8/ceph-bluestore-tool.8"
       coming from 7b91e50dbd289e65f10cb98c5eea9f3171c2d1f1 (a commit not
       backported to luminous at this time)

ceph.spec.in
debian/ceph-osd.install
debian/ceph-osd.postinst
debian/rules
src/90-ceph-osd.conf [new file with mode: 0644]

index 079832f6582d49427ed02c32ea9c7979bb40110d..41fc9bb93b39dc2d9f96b0f7651094ad02092fd6 100644 (file)
@@ -933,6 +933,7 @@ mkdir -p %{buildroot}%{_sbindir}
 install -m 0644 -D src/logrotate.conf %{buildroot}%{_sysconfdir}/logrotate.d/ceph
 chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
 install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
+install -m 0644 -D src/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf
 
 # firewall templates and /sbin/mount.ceph symlink
 %if 0%{?suse_version}
@@ -1468,6 +1469,7 @@ fi
 %{_unitdir}/ceph-osd@.service
 %{_unitdir}/ceph-osd.target
 %attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
+%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
 
 %post osd
 %if 0%{?suse_version}
@@ -1481,6 +1483,11 @@ fi
 if [ $1 -eq 1 ] ; then
 /usr/bin/systemctl start ceph-osd.target >/dev/null 2>&1 || :
 fi
+%if 0%{?sysctl_apply}
+    %sysctl_apply 90-ceph-osd.conf
+%else
+    /usr/lib/systemd/systemd-sysctl %{_sysctldir}/90-ceph-osd.conf > /dev/null 2>&1 || :
+%endif
 
 %preun osd
 %if 0%{?suse_version}
index 262082cfdfe961499719d0b6f72db2bcb772084d..fe6f96399739a760cdacce7932a2074b4924e6e3 100644 (file)
@@ -19,3 +19,4 @@ usr/share/man/man8/ceph-disk.8
 usr/share/man/man8/ceph-volume.8
 usr/share/man/man8/ceph-volume-systemd.8
 usr/share/man/man8/ceph-osd.8
+etc/sysctl.d/30-ceph-osd.conf
index b642dfe346455526d82b6c5ad97b989a97ff7fcb..5e44548fe826177d9c78c589f0611207d334d7e5 100644 (file)
@@ -23,6 +23,7 @@ set -e
 
 case "$1" in
     configure)
+       [ -x /etc/init.d/procps ] && invoke-rc.d procps restart || :
        [ -x /sbin/start ] && start ceph-osd-all || :
     ;;
     abort-upgrade|abort-remove|abort-deconfigure)
index 92bc0b5877660b60adfd5aac156d35af382b6a0f..857888f84e764632b5e3eee1f4d37a41ccdd3f97 100755 (executable)
@@ -50,6 +50,7 @@ override_dh_auto_install:
        install -D -m 644 udev/95-ceph-osd.rules $(DESTDIR)/lib/udev/rules.d/95-ceph-osd.rules
        install -D -m 644 udev/60-ceph-by-parttypeuuid.rules $(DESTDIR)/lib/udev/rules.d/60-ceph-by-parttypeuuid.rules
        install -D -m 644 src/etc-rbdmap $(DESTDIR)/etc/ceph/rbdmap
+       install -D -m 644 src/90-ceph-osd.conf $(DESTDIR)/etc/sysctl.d/30-ceph-osd.conf
 
 # doc/changelog is a directory, which confuses dh_installchangelogs
 override_dh_installchangelogs:
diff --git a/src/90-ceph-osd.conf b/src/90-ceph-osd.conf
new file mode 100644 (file)
index 0000000..c5c64bb
--- /dev/null
@@ -0,0 +1 @@
+fs.aio-max-nr = 1048576