From b6ec0894056737a8d82d81a6ca9d8b78b11b40a4 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Thu, 15 Dec 2011 12:44:56 +0100 Subject: [PATCH 1/4] specfile --- thin-provisioning-tools.spec | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 thin-provisioning-tools.spec diff --git a/thin-provisioning-tools.spec b/thin-provisioning-tools.spec new file mode 100644 index 0000000..1c7b840 --- /dev/null +++ b/thin-provisioning-tools.spec @@ -0,0 +1,66 @@ +# +# Copyright (C) 2011 Red Hat GmbH. All rights reserved. +# +# See file LICENSE at the top of this source tree for license information. +# + +Summary: Device-mapper thin provisioning tools +Name: thin-provisioning-tools +Version: 1.0.0 +Release: 1%{?dist} +License: GPLv2+ +Group: System Environment/Base +URL: http://sources.redhat.com/lvm2 +BuildRequires: expat-devel, libstdc++-devel +Source0: ftp://sources.redhat.com/pub/lvm2/thin-provisoning-tools.%{version}.tgz +Requires: expat, libstdc++ + +%description +thin-provisioning-tools contains dump,restore and repair tools to +manage device-mapper thin provisioning target metadata devices. + +%package -n dmraid-events-logwatch +Summary: dmraid logwatch-based email reporting +Group: System Environment/Base +Requires: dmraid-events = %{version}-%{release}, logwatch, /etc/cron.d + +%description -n dmraid-events-logwatch +Provides device failure reporting via logwatch-based email reporting. +Device failure reporting has to be activated manually by activating the +/etc/cron.d/dmeventd-logwatch entry and by calling the dmevent_tool +(see manual page for examples) for any active RAID sets. + +%prep +%setup -q -n thin-provisioning-tools.%{version} + +%build +%define _exec_prefix "" +%define _bindir /bin +%define _sbindir /usr/sbin +%define _libdir /%{_lib} + +%configure --enable-testing + +%install +make install + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc COPYING COPYING.LIB INSTALL README VERSION WHATS_NEW +/%{_mandir}/man8/thin_dump.8.gz +/%{_mandir}/man8/thin_repair.8.gz +/%{_mandir}/man8/thin_restore.8.gz +%{_sbindir}/thin_dump +%{_sbindir}/thin_repair +%{_sbindir}/thin_restore + +%changelog +* Thu Dec 15 2011 Heinz Mauelshagen - 1.0.0-1 +- Initial version From e20d84d4c37afa893683f97812a0141636cc8424 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Thu, 15 Dec 2011 12:50:10 +0100 Subject: [PATCH 2/4] Adjust license to GPLv3 --- thin-provisioning-tools.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thin-provisioning-tools.spec b/thin-provisioning-tools.spec index 1c7b840..29589cd 100644 --- a/thin-provisioning-tools.spec +++ b/thin-provisioning-tools.spec @@ -8,7 +8,7 @@ Summary: Device-mapper thin provisioning tools Name: thin-provisioning-tools Version: 1.0.0 Release: 1%{?dist} -License: GPLv2+ +License: GPLv3 Group: System Environment/Base URL: http://sources.redhat.com/lvm2 BuildRequires: expat-devel, libstdc++-devel From 79c26ee253c68d2b4128f3e28b3928a75bbab517 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Thu, 15 Dec 2011 12:53:54 +0100 Subject: [PATCH 3/4] Remove erroneous subpackage --- thin-provisioning-tools.spec | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/thin-provisioning-tools.spec b/thin-provisioning-tools.spec index 29589cd..a32278b 100644 --- a/thin-provisioning-tools.spec +++ b/thin-provisioning-tools.spec @@ -19,17 +19,6 @@ Requires: expat, libstdc++ thin-provisioning-tools contains dump,restore and repair tools to manage device-mapper thin provisioning target metadata devices. -%package -n dmraid-events-logwatch -Summary: dmraid logwatch-based email reporting -Group: System Environment/Base -Requires: dmraid-events = %{version}-%{release}, logwatch, /etc/cron.d - -%description -n dmraid-events-logwatch -Provides device failure reporting via logwatch-based email reporting. -Device failure reporting has to be activated manually by activating the -/etc/cron.d/dmeventd-logwatch entry and by calling the dmevent_tool -(see manual page for examples) for any active RAID sets. - %prep %setup -q -n thin-provisioning-tools.%{version} From 977716d6739781b73cd45fe61676b4bbb836247e Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Thu, 15 Dec 2011 13:56:48 +0100 Subject: [PATCH 4/4] Man pages --- man8/thin_dump.8 | 43 ++++++++++++++++++++++++++++++++++++ man8/thin_repair.8 | 35 +++++++++++++++++++++++++++++ man8/thin_restore.8 | 39 ++++++++++++++++++++++++++++++++ thin-provisioning-tools.spec | 2 +- 4 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 man8/thin_dump.8 create mode 100644 man8/thin_repair.8 create mode 100644 man8/thin_restore.8 diff --git a/man8/thin_dump.8 b/man8/thin_dump.8 new file mode 100644 index 0000000..e28c92e --- /dev/null +++ b/man8/thin_dump.8 @@ -0,0 +1,43 @@ +.TH THIN-PROVISIONING-TOOLS 8 "Thin Provisioning Tools" "Red Hat GmbH" \" -*- nroff -*- +.SH NAME +thin_dump \- dump thin provisioning metadata from device or file to standard output + +.SH SYNOPSIS +.B thin_dump [options] {metadata device|file} + +.SH DESCRIPTION +thin_dump dumps thin provisioning metadata created by the device-mapper +thin provisioning target on a device or file to standard output for +analysis or postprocessing in either XML or human redable format. +XML formated metadata can be fed into thin_restore (see +.B thin_restore(8) +) in order to put it back onto a metadata device (to process by +the device-mapper target) or file. + +.B thin_dump + {-i|--input} {device|file} + [{-f|--format} {xml|human_readable}] + +.B thin_dump + {-h|--help} + +.B thin_dump + {-V|--version} + +.SH EXAMPLES +"thin_dump -f human_redable -i /dev/vg/metadata" +dumps the thin provisioning metadata on logical volume /dev/vg/metadata +to standard output in human readable format. + +"thin_dump /dev/vg/metadata" +dumps the thin provisioning metadata on logical volume /dev/vg/metadata +to standard output in XML format. + +.SH DIAGNOSTICS +thin_dump returns an exit code of 0 for success or 1 for error. + +.SH SEE ALSO +.B thin_repair(8), thin_restore(8) + +.SH AUTHOR +Heinz Mauelshagen diff --git a/man8/thin_repair.8 b/man8/thin_repair.8 new file mode 100644 index 0000000..2194117 --- /dev/null +++ b/man8/thin_repair.8 @@ -0,0 +1,35 @@ +.TH THIN-PROVISIONING-TOOLS 8 "Thin Provisioning Tools" "Red Hat GmbH" \" -*- nroff -*- +.SH NAME +thin_repair \- repair thin provisioning metadata on device or file + +.SH SYNOPSIS +.B thin_repair {metadata device|file} + +.SH DESCRIPTION +thin_repair analyses and repairs thin provisioning metadata created by +the device-mapper thin provisioning target on a device or file (see +.B thin_dump(8) +) on how to dump metadata to a file. + +.B thin_repair (device|file} + +.B thin_repair + {-h|--help} + +.B thin_dump + {-V|--version} + +.SH EXAMPLE +"thin_repair /dev/vg/metadata" +analyses and repairs thin provisioning metadata on logical volume +/dev/vg/metadata. The device may not be actively used by the target +when repairing! + +.SH DIAGNOSTICS +thin_repair returns an exit code of 0 for success or 1 for error. + +.SH SEE ALSO +.B thin_dump(8), thin_restore(8) + +.SH AUTHOR +Heinz Mauelshagen diff --git a/man8/thin_restore.8 b/man8/thin_restore.8 new file mode 100644 index 0000000..f1cf3b8 --- /dev/null +++ b/man8/thin_restore.8 @@ -0,0 +1,39 @@ +.TH THIN-PROVISIONING-TOOLS 8 "Thin Provisioning Tools" "Red Hat GmbH" \" -*- nroff -*- +.SH NAME +thin_restore \- restore thin provisioning metadata file to device or file + +.SH SYNOPSIS +.B thin_restore [options] file {metadata device|file} + +.SH DESCRIPTION +thin_restore restores thin provisioning metadata created by the +respective device-mapper target dumped into an XML formated (see +.B thin_dump(8) +) file, which optionally can be preproccessed to another device or file. +If restored to a metadata device, the metadata can be processed +by the device-mapper target. + +.B thin_restore + {-i|--input} {device|file} + {-o|--output} {device|file} + +.B thin_restore + -h|--help + +.B thin_dump + {-V|--version} + +.SH EXAMPLE +"thin_restore -i metadata -o /dev/vg/metadata" +restores the XML formatted thin provisioning metadata on file "metadata" +to logical volume /dev/vg/metadata for further processing by the +respective device-mapper target. + +.SH DIAGNOSTICS +thin_dump returns an exit code of 0 for success or 1 for error. + +.SH SEE ALSO +.B thin_dump(8), thin_repair(8) + +.SH AUTHOR +Heinz Mauelshagen diff --git a/thin-provisioning-tools.spec b/thin-provisioning-tools.spec index a32278b..07c9cb0 100644 --- a/thin-provisioning-tools.spec +++ b/thin-provisioning-tools.spec @@ -28,7 +28,7 @@ manage device-mapper thin provisioning target metadata devices. %define _sbindir /usr/sbin %define _libdir /%{_lib} -%configure --enable-testing +%configure %install make install