Add abrt script to retrieve /proc/mdstat output in case of crash

Resolves bz#867842

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
Jes Sorensen 2012-10-18 14:37:49 +02:00
parent dee78ce96b
commit eb7fecee11
2 changed files with 23 additions and 1 deletions

View File

@ -1,7 +1,7 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays) Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm Name: mdadm
Version: 3.2.5 Version: 3.2.5
Release: 11%{?dist} Release: 12%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
Source1: mdmonitor.init Source1: mdmonitor.init
Source2: raid-check Source2: raid-check
@ -11,6 +11,7 @@ Source5: mdadm-cron
Source6: mdmonitor.service Source6: mdmonitor.service
Source7: mdmonitor-takeover.service Source7: mdmonitor-takeover.service
Source8: mdadm.conf Source8: mdadm.conf
Source9: mdadm_event.conf
Patch1: mdadm-3.2.5-imsm-fix-correct-checking-volume-s-degradation.patch Patch1: mdadm-3.2.5-imsm-fix-correct-checking-volume-s-degradation.patch
Patch2: mdadm-3.2.5-Replace-sha1.h-with-slightly-older-version.patch Patch2: mdadm-3.2.5-Replace-sha1.h-with-slightly-older-version.patch
Patch3: mdadm-3.2.5-Add-zlib-license-to-crc32.c.patch Patch3: mdadm-3.2.5-Add-zlib-license-to-crc32.c.patch
@ -31,6 +32,9 @@ Requires(postun): systemd-units coreutils
%if "%{fedora}" <= "17" %if "%{fedora}" <= "17"
Requires: udev initscripts Requires: udev initscripts
%endif %endif
%if "%{fedora}" >= "17"
Requires: abrt
%endif
%description %description
The mdadm program is used to create, manage, and monitor Linux MD (software The mdadm program is used to create, manage, and monitor Linux MD (software
@ -89,6 +93,12 @@ install -m 0644 %{SOURCE8} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
mkdir -p %{buildroot}%{_localstatedir}/run/ mkdir -p %{buildroot}%{_localstatedir}/run/
install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/ install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/
# abrt
%if "%{fedora}" >= "17"
mkdir -p %{buildroot}/etc/libreport/events.d
install -m644 %{SOURCE9} %{buildroot}/etc/libreport/events.d
%endif
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -123,11 +133,18 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/sysconfig/* %config(noreplace) %{_sysconfdir}/sysconfig/*
%dir %{_localstatedir}/run/%{name}/ %dir %{_localstatedir}/run/%{name}/
%config(noreplace) %{_prefix}/lib/tmpfiles.d/%{name}.conf %config(noreplace) %{_prefix}/lib/tmpfiles.d/%{name}.conf
%if "%{fedora}" >= "17"
/etc/libreport/events.d/*
%endif
%files sysvinit %files sysvinit
%{_initrddir}/* %{_initrddir}/*
%changelog %changelog
* Thu Oct 18 2012 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.5-12
- Add abrt script to retrieve /proc/mdstat output in case of crash
- Resolves bz867842
* Wed Oct 17 2012 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.5-11 * Wed Oct 17 2012 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.2.5-11
- Remove package requirements for udev and initscripts for F18+ - Remove package requirements for udev and initscripts for F18+
- Resolves bz864562 - Resolves bz864562

5
mdadm_event.conf Normal file
View File

@ -0,0 +1,5 @@
# Save /proc/mdstat in case of crash in mdadm/mdmon
EVENT=post-create component=mdadm
cat /proc/mdstat >> mdstat_data
echo "Saved output of /proc/mdstat"