forked from pool/mdadm
- Add cron job to run 'mdcheck' regularly to
verify all md arrays. (bnc#869261) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=120
This commit is contained in:
parent
252d4aff0d
commit
2c15bc8dc2
9
cron.d.mdadm
Normal file
9
cron.d.mdadm
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# cron.d/mdadm - regular redundancy checks
|
||||||
|
#
|
||||||
|
|
||||||
|
# Start checking each month early in the morning.
|
||||||
|
# Continue each day until all done
|
||||||
|
|
||||||
|
0 1 * * 0 root source /etc/sysconfig/mdadm; [ -n "$MDADM_CHECK_DURATION" -a -x /usr/share/mdadm/mdcheck -a $(date +\%d) -le 7 ] && /usr/share/mdadm/mdcheck --duration "$MDADM_CHECK_DURATION"
|
||||||
|
0 1 * * 1-6 root source /etc/sysconfig/mdadm; [ -n "$MDADM_CHECK_DURATION" -a -x /usr/share/mdadm/mdcheck ] && /usr/share/mdadm/mdcheck --continue --duration "$MDADM_CHECK_DURATION"
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 16 01:04:36 UTC 2014 - nfbrown@suse.com
|
||||||
|
|
||||||
|
- Add cron job to run 'mdcheck' regularly to
|
||||||
|
verify all md arrays. (bnc#869261)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 25 11:48:12 UTC 2014 - p.drouand@gmail.com
|
Fri Jul 25 11:48:12 UTC 2014 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
24
mdadm.spec
24
mdadm.spec
@ -28,7 +28,6 @@ BuildRequires: pkgconfig(systemd)
|
|||||||
PreReq: %fillup_prereq /sbin/mkinitrd
|
PreReq: %fillup_prereq /sbin/mkinitrd
|
||||||
Recommends: cron
|
Recommends: cron
|
||||||
Recommends: smtp_daemon
|
Recommends: smtp_daemon
|
||||||
Obsoletes: raidtools
|
|
||||||
Url: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
Url: http://www.kernel.org/pub/linux/utils/raid/mdadm/
|
||||||
Summary: Utility for Configuring MD Setup
|
Summary: Utility for Configuring MD Setup
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
@ -37,6 +36,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.xz
|
Source: https://www.kernel.org/pub/linux/utils/raid/mdadm/%{name}-%{version}.tar.xz
|
||||||
Source1: Software-RAID.HOWTO.tar.bz2
|
Source1: Software-RAID.HOWTO.tar.bz2
|
||||||
Source2: sysconfig.mdadm
|
Source2: sysconfig.mdadm
|
||||||
|
Source3: cron.d.mdadm
|
||||||
Source7: mdadm.cron
|
Source7: mdadm.cron
|
||||||
# PATCH-FIX-UPSTREAM 0001-Makefile-install-mdadm-grow-continue-.service.patch nfbrown@suse.de
|
# PATCH-FIX-UPSTREAM 0001-Makefile-install-mdadm-grow-continue-.service.patch nfbrown@suse.de
|
||||||
Patch1: 0001-Makefile-install-mdadm-grow-continue-.service.patch
|
Patch1: 0001-Makefile-install-mdadm-grow-continue-.service.patch
|
||||||
@ -66,17 +66,32 @@ sgml2txt Software-RAID.HOWTO.sgml
|
|||||||
make install install-systemd install-udev DESTDIR=%{buildroot} SYSTEMD_DIR=%{_unitdir} UDEVDIR=%{_udevdir} SUSE=yes
|
make install install-systemd install-udev DESTDIR=%{buildroot} SYSTEMD_DIR=%{_unitdir} UDEVDIR=%{_udevdir} SUSE=yes
|
||||||
rm -rf %{buildroot}/lib/udev
|
rm -rf %{buildroot}/lib/udev
|
||||||
install -d %{buildroot}%{_var}/adm/fillup-templates
|
install -d %{buildroot}%{_var}/adm/fillup-templates
|
||||||
install -d %{buildroot}{%{_sbindir}
|
install -d %{buildroot}/usr/share/mdadm
|
||||||
|
install -m 755 misc/mdcheck %{buildroot}/usr/share/mdadm/mdcheck
|
||||||
install -d %{buildroot}/etc/cron.daily
|
install -d %{buildroot}/etc/cron.daily
|
||||||
|
install -d %{buildroot}/etc/cron.d
|
||||||
install -m 755 %{S:7} %{buildroot}/etc/cron.daily/mdadm
|
install -m 755 %{S:7} %{buildroot}/etc/cron.daily/mdadm
|
||||||
|
install -m 644 %{S:3} %{buildroot}/etc/cron.d/mdadm
|
||||||
install -m 644 %{S:2} %{buildroot}%{_var}/adm/fillup-templates/
|
install -m 644 %{S:2} %{buildroot}%{_var}/adm/fillup-templates/
|
||||||
install -d %{buildroot}%{_systemdshutdowndir}
|
install -d %{buildroot}%{_systemdshutdowndir}
|
||||||
|
install -d %{buildroot}%{_sbindir}
|
||||||
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcmdmonitor
|
||||||
|
|
||||||
|
%define services mdmonitor.service mdmon@.service mdadm-last-resort@.service mdadm-grow-continue@.service
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%service_add_pre %services
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
%service_add_post %services
|
||||||
%{?regenerate_initrd_post}
|
%{?regenerate_initrd_post}
|
||||||
%fillup_only
|
%fillup_only
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun %services
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%service_del_postun %services
|
||||||
%{?regenerate_initrd_post}
|
%{?regenerate_initrd_post}
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
@ -88,11 +103,16 @@ install -d %{buildroot}%{_systemdshutdowndir}
|
|||||||
%doc Software-RAID.HOWTO/Software-RAID.HOWTO*{.txt,.html}
|
%doc Software-RAID.HOWTO/Software-RAID.HOWTO*{.txt,.html}
|
||||||
%doc %{_mandir}/man?/*
|
%doc %{_mandir}/man?/*
|
||||||
/sbin/*
|
/sbin/*
|
||||||
|
%{_sbindir}/rcmdmonitor
|
||||||
|
%dir /usr/share/mdadm
|
||||||
|
/usr/share/mdadm/*
|
||||||
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
%{_var}/adm/fillup-templates/sysconfig.mdadm
|
||||||
%{_udevdir}/rules.d/63-md-raid-arrays.rules
|
%{_udevdir}/rules.d/63-md-raid-arrays.rules
|
||||||
%{_udevdir}/rules.d/64-md-raid-assembly.rules
|
%{_udevdir}/rules.d/64-md-raid-assembly.rules
|
||||||
%dir /etc/cron.daily
|
%dir /etc/cron.daily
|
||||||
/etc/cron.daily/mdadm
|
/etc/cron.daily/mdadm
|
||||||
|
%dir /etc/cron.d
|
||||||
|
%config /etc/cron.d/mdadm
|
||||||
%{_systemdshutdowndir}/mdadm.shutdown
|
%{_systemdshutdowndir}/mdadm.shutdown
|
||||||
%{_unitdir}/mdmon@.service
|
%{_unitdir}/mdmon@.service
|
||||||
%{_unitdir}/mdmonitor.service
|
%{_unitdir}/mdmonitor.service
|
||||||
|
@ -60,3 +60,15 @@ MDADM_SEND_MAIL_ON_START=no
|
|||||||
# increased. Setting this to '0' disables waiting for udev.
|
# increased. Setting this to '0' disables waiting for udev.
|
||||||
#
|
#
|
||||||
MDADM_DEVICE_TIMEOUT="60"
|
MDADM_DEVICE_TIMEOUT="60"
|
||||||
|
|
||||||
|
## Type: string
|
||||||
|
## Default: 6 hours
|
||||||
|
#
|
||||||
|
# Amount of time to spend checking md arrays each morning.
|
||||||
|
# A check will start on the first Sunday of the month and run
|
||||||
|
# for this long. If it does not complete, then it will be
|
||||||
|
# continued each subsequent morning until all arrays have
|
||||||
|
# been checked. Any string understood by "date --date="
|
||||||
|
# can be used. An empty string disables automatic checks.
|
||||||
|
#
|
||||||
|
MDADM_CHECK_DURATION="6 hours"
|
||||||
|
Loading…
Reference in New Issue
Block a user