Hello community, here is the log from the commit of package device-mapper.721 for openSUSE:12.2:Update checked in at 2012-08-02 18:30:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.2:Update/device-mapper.721 (Old) and /work/SRC/openSUSE:12.2:Update/.device-mapper.721.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "device-mapper.721", Maintainer is "" Changes: -------- New Changes file: --- /dev/null 2012-07-29 18:28:42.219591462 +0200 +++ /work/SRC/openSUSE:12.2:Update/.device-mapper.721.new/device-mapper.changes 2012-08-02 18:30:50.000000000 +0200 @@ -0,0 +1,617 @@ +------------------------------------------------------------------- +Thu Jul 26 17:15:54 UTC 2012 - fcrozat@suse.com + +- Add blkid-builtin.patch: use built-in blkid from udev + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + (cf. packaging guidelines) +- Use %_smp_mflags for parallel build + +------------------------------------------------------------------- +Fri May 27 09:07:22 UTC 2011 - lnussel@suse.de + +- don't enable boot.device-mapper by default and don't load dm-mod + unconditionally in initrd. udev creates /dev/mapper/control so + dm-mod is automatically loaded when needed. + +------------------------------------------------------------------- +Tue Feb 15 08:57:07 UTC 2011 - xwhu@novell.com + +- Update to device mapper 1.2.63 + - Add configure --with-device-nodes-on=create for previous + behaviour. + - Move creation of device nodes from 'create' to 'resume'. + - Add dmeventd -R to restart dmeventd without losing monitoring + state + +------------------------------------------------------------------- +Fri Jan 14 10:08:08 UTC 2011 - lnussel@suse.de + +- the lsmod|grep in boot.device-mapper is superfluous, modprobe does + that internally anyways + +------------------------------------------------------------------- +Wed Dec 15 16:30:55 CST 2010 - cmeng@novell.com + +- sleep and try to wait opne_count to be 0 while lvremove. + (Bug #642296) + +------------------------------------------------------------------- +Sun Oct 31 12:37:02 UTC 2010 - jengelh@medozas.de + +- Use %_smp_mflags + +------------------------------------------------------------------- +Tue Oct 12 17:44:09 UTC 2010 - cristian.rodriguez@opensuse.org + +- mkinitrd-devmapper-boot.sh: do not complain if /dev/mapper + directory already exists and contains the control device. + +------------------------------------------------------------------- +Thu Sep 30 07:32:27 UTC 2010 - stefan.fent@novell.com + +- add device-mapper-devel to baselibs.conf to be able to link lilo + against libdevmapper (bnc #642400) + +------------------------------------------------------------------- +Fri Jul 16 10:11:59 UTC 2010 - xwhu@novell.com + +- bnc#556177, undefined symbol error while loading dmevent so. + +------------------------------------------------------------------- +Mon Jul 5 09:43:41 UTC 2010 - xwhu@novell.com + +- bnc#619566, fix error in "dmsetup export" patch, + +------------------------------------------------------------------- +Wed Jun 23 05:53:43 UTC 2010 - xwhu@novell.com + +- Update to LVM.1.02.49 + - Support autoloading of dm-mod module for kernels from 2.6.35 + - Use -d to control level of messages sent to syslog by dmeventd + - Do not print encryption key in message debug output + - Add support for new IMPORT{db} udev rule + - Add DM_UDEV_PRIMARY_SOURCE_FLAG udev flag to recognize proper + DM events + - Also include udev libs in libdevmapper.pc when udev_sync is + enabled + - Add support for ioctl's DM_UEVENT_GENERATED_FLAG +- Use the upcoming udev rules update of dm, to cooperate with + artificial uevent (bnc#598193) + +------------------------------------------------------------------- +Tue Jun 1 13:08:00 UTC 2010 - xwhu@novell.com + +- Link device-mapper to libudev + +------------------------------------------------------------------- +Fri May 21 03:40:34 UTC 2010 - xwhu@novell.com + +- Fix mkinitrd-devmapper to use udev rules for device mapper + +------------------------------------------------------------------- +Mon Apr 26 16:51:40 CEST 2010 - ro@suse.de + +- fix pkgconfig file for device mapper + +------------------------------------------------------------------- +Sat Apr 3 03:07:44 UTC 2010 - xwhu@novell.com + +- Upgrade to device-mapper 1.02. + - Add libdevmapper functions to support synchronisation with udev + - Check udev is running when processing cookies and retain state + internally. + - Add support for the "snapshot-merge" kernel target + +------------------------------------------------------------------- +Sun Dec 20 17:12:29 UTC 2009 - coolo@novell.com + +- use -j1 - parallel build breaks with symlinks_generated + +------------------------------------------------------------------- +Mon Dec 7 15:47:57 CET 2009 - meissner@suse.de + +- added type punning patch from pth@suse.de + +------------------------------------------------------------------- +Sun Nov 15 10:40:44 CET 2009 - meissner@suse.de + +- refreshed patches to avoid fuzz + +------------------------------------------------------------------- +Wed Sep 23 06:39:29 UTC 2009 - xwhu@novell.com + +- Add -devmapper- infix to mkinitrd scripts + +------------------------------------------------------------------- +Thu May 21 16:46:43 CST 2009 - xwhu@suse.de + +- specify usrlibdir for configuration + +------------------------------------------------------------------- +Mon May 11 15:36:05 CST 2009 - xwhu@suse.de + +- Enable pkgconfig for GNOME 2.28 + +------------------------------------------------------------------- +Mon Apr 27 18:37:32 CST 2009 - xwhu@suse.de + +- Upgrade to 1.02.31 + . Add "all" field to reports expanding to all fields of report type. + . Enforce device name length and character limitations in libdm. + . Replace _dm_snprintf with EMIT_PARAMS macro for creating target lines. + . Only resume devices in dm_tree_preload_children if size changes. + . Extend deptree buffers so the largest possible device numbers fit. + . Generate versioned libdevmapper-event.so. + . Underline longer report help text headings. + +------------------------------------------------------------------- +Tue Apr 21 10:11:35 CEST 2009 - xwhu@suse.de + +- bnc#479104, export additional information + +------------------------------------------------------------------- +Tue Feb 3 08:42:58 CET 2009 - hare@suse.de + +- No whitespace for DM_STATE export variable (bnc#440959) +- Remove obsolete reference to boot.scsidev from init script + +------------------------------------------------------------------- +Wed Dec 10 12:34:56 CET 2008 - olh@suse.de + +- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade + (bnc#437293) + +------------------------------------------------------------------- +Wed Nov 5 16:57:47 CET 2008 - werner@suse.de + +- As boot.crypto depends on boot.device-mapper, the later one has + even on shutdown to depend on boot.udev to make sure that events + will be processed (bnc#413059) + +------------------------------------------------------------------- +Thu Oct 30 12:34:56 CET 2008 - olh@suse.de + +- obsolete old -XXbit packages (bnc#437293) + +------------------------------------------------------------------- +Sat Sep 13 07:03:44 CEST 2008 - xwhu@suse.de + +- Fix typo for correct compiling +- Timeout if udevd's not running (bnc#425436) + +------------------------------------------------------------------- +Wed Sep 10 11:56:17 CEST 2008 - xwhu@suse.de + +- update to 1.02.27 + Align struct memblock in dbg_malloc for sparc. + Add --unquoted and --rows to dmsetup. + Avoid compiler warning about cast in dmsetup.c's OFFSET_OF macro. + Fix inverted no_flush debug message. + Remove --enable-jobs from configure. (Set at runtime instead.) + Bring configure.in and list.h into line with the lvm2 versions. + +------------------------------------------------------------------- ++++ 420 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:12.2:Update/.device-mapper.721.new/device-mapper.changes New Changes file: --- /dev/null 2012-07-29 18:28:42.219591462 +0200 +++ /work/SRC/openSUSE:12.2:Update/.device-mapper.721.new/lvm2-clvm.changes 2012-08-02 18:30:50.000000000 +0200 @@ -0,0 +1,94 @@ +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + (cf. packaging guidelines) +- Use %_smp_mflags for parallel build + +------------------------------------------------------------------- +Tue Feb 22 07:32:46 UTC 2011 - xwhu@novell.com + +- Re-enable clvmd build + - Cleanup unused patches + - Build against corosync instead of openais + +------------------------------------------------------------------- +Sun Oct 31 12:37:02 UTC 2010 - jengelh@medozas.de + +- Use %_smp_mflags + +------------------------------------------------------------------- +Thu Sep 9 12:17:25 UTC 2010 - coolo@novell.com + +- massive rebase of the patches + +------------------------------------------------------------------- +Mon Apr 26 16:51:35 CEST 2010 - ro@suse.de + +- fix lvm2-clvm specfile so that patches apply + +------------------------------------------------------------------- +Sat Apr 3 03:17:12 UTC 2010 - xwhu@novell.com + +- Upgrade to LVM2 2.02.58 + - Rename liblvm.so to liblvm2app.so + - Introduce lvconvert --use_policies + - Add readonly locking type to replace implementation of + --ignorelockingfailure + - Add liblvm APIs to implement creation and deletion of VGs + - Add activation/udev_sync to lvm.conf + - Enable dmeventd monitoring section of config file by default + - Add --pvmetadatacopies for pvcreate, vgcreate, vgextend, + vgconvert. + +------------------------------------------------------------------- +Sun Nov 15 10:41:04 CET 2009 - meissner@suse.de + +- refreshed patches to avoid fuzz-0 + +------------------------------------------------------------------- +Mon Apr 27 18:37:32 CST 2009 - xwhu@suse.de + +- Upgrade to LVM2 2.02.45 + Avoid scanning empty metadata areas for VG names + Pass --test from lvresize to fsadm as --dry-run. + Remove duplicate cpg_initialize from clvmd startup. + Add option to /etc/sysconfig/cluster to select cluster type for clvmd. + Remove external dependency on the 'cut' command from fsadm. + Fix pvs segfault when pv mda attributes requested for not available PV. + Fix lvresize size conversion for fsadm when block size is not 1K. + Add pv_mda_size to pvs and vg_mda_size to vgs. + Add "--refresh" functionality to vgchange and vgmknodes. + Fix vgrename using UUID if there are VGs with identical names. + Fix segfault when invalid field given in reporting commands. + Merge device-mapper into the lvm2 tree. + Exit with non-zero status from vgdisplay if couldn't show any requested VG. + Fix snapshot monitoring library to not cancel monitoring invalid snapshot. + Fix conversion of md chunk size into sectors. + Fix misleading error message when there are no allocatable extents in VG. + Fix handling of PVs which reappeared with old metadata version. + Fix mirror DSO to call vgreduce with proper parameters. + Fix validation of --minor and --major in lvcreate to require -My always. + Fix release: clvmd build, vgreduce consolidate & tests, /dev/ioerror warning. + +------------------------------------------------------------------- +Tue Apr 1 01:10:00 CST 2009 - lmb@suse.de + +- clvmd: Ensure that the lockspace is released locally even we were the + lock master, avoiding an unclean shutdown (bnc#490415). + +------------------------------------------------------------------- +Tue Mar 31 19:16:18 CST 2009 - xwhu@suse.de + +- Call cpg_leave before shutting down clvmd + +------------------------------------------------------------------- +Wed Mar 25 23:14:29 CST 2009 - xwhu@suse.de + +- Do not filter out tmp device file(bnc#485572) + +------------------------------------------------------------------- +Wed Mar 25 22:50:50 CST 2009 - xwhu@suse.de + +- Newly splitted off from lvm2, as a independent package now + New Changes file: --- /dev/null 2012-07-29 18:28:42.219591462 +0200 +++ /work/SRC/openSUSE:12.2:Update/.device-mapper.721.new/lvm2.changes 2012-08-02 18:30:50.000000000 +0200 @@ -0,0 +1,1012 @@ +------------------------------------------------------------------- +Fri Apr 20 07:52:09 UTC 2012 - rmilasan@suse.com + +- Run update of initrd at %post and %postun. + We need this to make sure initrd reflects the updates. + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + (cf. packaging guidelines) +- Use %_smp_mflags for parallel build + +------------------------------------------------------------------- +Fri May 27 09:09:35 UTC 2011 - lnussel@suse.de + +- don't unconditionally enable boot.lvm by default. yast takes care + of enabling the script when creating lvm volumes. +- don't hard require boot.device-mapper in boot.dmraid. dm-mod is + autoloaded when accessing /dev/mapper/control anyways. + +------------------------------------------------------------------- +Thu Mar 10 11:07:22 UTC 2011 - coolo@novell.com + +- prereq sysvinit(boot.device-mapper) to fix build + +------------------------------------------------------------------- +Tue Feb 15 08:48:48 UTC 2011 - xwhu@novell.com + +- Update to LVM 2.02.84 + - Fix handling of simultaneous mirror image and mirrored log + image failure. + - Fix vgremove to allow removal of VG with missing PVs + - Remove log directly if all mirror images of a mirrored log fail + - Fix potential for corruption during cluster mirror device + failure + - Allow internal suspend and resume of origin without its + snapshots + - Allow exclusive activation of snapshots in a cluster + +------------------------------------------------------------------- +Thu Nov 11 12:24:04 UTC 2010 - coolo@novell.com + +- own parent directories for device-mapper files + +------------------------------------------------------------------- +Sun Oct 31 12:37:02 UTC 2010 - jengelh@medozas.de + +- Use %_smp_mflags + +------------------------------------------------------------------- +Fri Jul 16 10:11:59 UTC 2010 - xwhu@novell.com + +- bnc#556177, undefined symbol error while loading dmevent so. + +------------------------------------------------------------------- +Wed Jun 23 05:50:12 UTC 2010 - xwhu@novell.com + +- Update to LVM.2.02.67 + - Require partial option in lvchange --refresh for partial LVs + - Add replicators' LVs to dtree for activation + - Add lvm2app interfaces to lookup a vgname from a pvid and pvname + - Fix memory leak for invalid regex pattern input + - Disallow the direct removal of a merging snapshot + - Fix lvconvert error message when existing mirrored LV is not found + - Add LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable + - Improve snapshot merge metadata import validation + +------------------------------------------------------------------- +Tue Jun 1 14:06:38 UTC 2010 - xwhu@novell.com + +- Specify udev_sync and udev_rules in /etc/lvm/lvm.conf + +------------------------------------------------------------------- +Fri May 21 03:41:47 UTC 2010 - xwhu@novell.com + +- Fix mkinitrd-lvm2 to use udev rules for lvm2 + +------------------------------------------------------------------- +Mon Apr 26 16:51:10 CEST 2010 - ro@suse.de + +- fix lvm2-clvm specfile so that patches apply + +------------------------------------------------------------------- +Sat Apr 3 03:17:12 UTC 2010 - xwhu@novell.com + +- Upgrade to LVM2 2.02.58 + - Rename liblvm.so to liblvm2app.so + - Introduce lvconvert --use_policies + - Add readonly locking type to replace implementation of + --ignorelockingfailure + - Add liblvm APIs to implement creation and deletion of VGs + - Add activation/udev_sync to lvm.conf + - Enable dmeventd monitoring section of config file by default + - Add --pvmetadatacopies for pvcreate, vgcreate, vgextend, + vgconvert. + +------------------------------------------------------------------- +Sun Nov 29 06:58:45 UTC 2009 - xwhu@novell.com + +- Link liblvm2cmd.so to libdevmapper-event.so (bnc#556177) + +------------------------------------------------------------------- +Sun Nov 15 10:40:19 CET 2009 - meissner@suse.de + +- quilt refreshed all patches. + +------------------------------------------------------------------- +Mon Oct 12 13:31:12 UTC 2009 - xwhu@novell.com + +- make $tmp_mnt/etc/sysconfig before copying file into (bnc#525237) + +------------------------------------------------------------------- +Wed Sep 23 06:38:47 UTC 2009 - xwhu@novell.com + +- Add -lvm2- infix to mkinitrd scripts +- collect_lvm reads /etc/sysconfig/lvm (bnc#523944) + +------------------------------------------------------------------- +Fri Aug 28 07:37:13 UTC 2009 - xwhu@novell.com + +- Support extended dev with major 259 + +------------------------------------------------------------------- +Fri Jun 26 11:08:39 CST 2009 - xwhu@suse.de + +- bnc#510058, typo in dont_ignore_tmp_device_file.diff, which hangs + mkinitrd + +Mon May 25 16:47:18 CST 2009 - xwhu@suse.de +------------------------------------------------------------------- + +- Cleanup scripts for mkinitrd, so that udev can activate root LV. + +Mon Apr 27 18:37:32 CST 2009 - xwhu@suse.de +------------------------------------------------------------------- + +- Upgrade to LVM2 2.02.45 + Avoid scanning empty metadata areas for VG names + Pass --test from lvresize to fsadm as --dry-run. + Remove duplicate cpg_initialize from clvmd startup. + Add option to /etc/sysconfig/cluster to select cluster type for clvmd. + Remove external dependency on the 'cut' command from fsadm. + Fix pvs segfault when pv mda attributes requested for not available PV. + Fix lvresize size conversion for fsadm when block size is not 1K. + Add pv_mda_size to pvs and vg_mda_size to vgs. + Add "--refresh" functionality to vgchange and vgmknodes. + Fix vgrename using UUID if there are VGs with identical names. + Fix segfault when invalid field given in reporting commands. + Merge device-mapper into the lvm2 tree. + Exit with non-zero status from vgdisplay if couldn't show any requested VG. + Fix snapshot monitoring library to not cancel monitoring invalid snapshot. + Fix conversion of md chunk size into sectors. + Fix misleading error message when there are no allocatable extents in VG. + Fix handling of PVs which reappeared with old metadata version. + Fix mirror DSO to call vgreduce with proper parameters. + Fix validation of --minor and --major in lvcreate to require -My always. + Fix release: clvmd build, vgreduce consolidate & tests, /dev/ioerror warning. + +------------------------------------------------------------------- +Tue Mar 31 11:59:03 CST 2009 - xwhu@suse.de + +- Handle the case that drbd virtual device has the same PV uuid + with the underlining physical device. + +------------------------------------------------------------------- +Wed Mar 25 23:14:29 CST 2009 - xwhu@suse.de + +- Do not filter out tmp device file(bnc#485572) +- Do not try to activate VG when all paths are down already(bnc#479104) + +------------------------------------------------------------------- +Wed Mar 25 22:50:50 CST 2009 - xwhu@suse.de + +- Split CLVMD as a independent package + +------------------------------------------------------------------- +Tue Mar 24 00:23:13 CST 2009 - xwhu@suse.de + +- Fix for bnc#486952 + use "killproc -INT" instead of "killproc" + handle signal in the main loop thread only + +------------------------------------------------------------------- +Thu Feb 26 14:08:22 CST 2009 - xwhu@suse.de + +- add daemon_options parameter to clvmd.ocf +- check EUNLOCK for dlm_ls_unlock_wait + +------------------------------------------------------------------- +Wed Feb 25 18:39:26 CST 2009 - xwhu@suse.de + +- bnc#479422, check both lksb.sb_status and status. + +------------------------------------------------------------------- +Fri Feb 20 10:24:00 CET 2009 - xwhu@suse.de + ++++ 815 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:12.2:Update/.device-mapper.721.new/lvm2.changes New: ---- 64-lvm2.rules LVM2.2.02.84.tgz baselibs.conf blkid-builtin.patch boot.device-mapper boot.lvm clvmd.ocf cmdline_large_minor.diff collect_lvm device-mapper-dmsetup-deps-export.patch device-mapper-dmsetup-export.patch device-mapper-gcc-warning.diff device-mapper-type_punning.diff device-mapper.changes device-mapper.spec dont_ignore_tmp_device_file.diff handle_extended_devt.diff improve_probing.diff k_dev_t.dif lvm-pv-create-link.diff lvm.conf lvm2-clvm.changes lvm2-clvm.spec lvm2.changes lvm2.spec man_page_sectors.diff mkinitrd-devmapper-boot.sh mkinitrd-devmapper-setup.sh mkinitrd-lvm2-boot.sh mkinitrd-lvm2-setup.sh no-inc-audit.diff no_buildroot_shared.diff pipe_buff-definition.diff sleep-try-open-count.diff support-drbd-filter.diff sys_mount_instead_linux_fs.diff sysconfig.lvm udev-rules_update.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ device-mapper.spec ++++++ # # spec file for package device-mapper # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: device-mapper # bug437293 %ifarch ppc64 Obsoletes: device-mapper-64bit %endif # Version: 1.02.63 Release: 0 Summary: Device Mapper Tools License: GPL-2.0+ ; LGPL-2.1+ Group: System/Base Source: LVM2.2.02.84.tgz Source1: boot.device-mapper Source2: mkinitrd-devmapper-setup.sh Source3: mkinitrd-devmapper-boot.sh Source4: baselibs.conf #Patches for device mapper Patch60: k_dev_t.dif Patch61: device-mapper-dmsetup-export.patch Patch62: device-mapper-gcc-warning.diff Patch65: device-mapper-dmsetup-deps-export.patch Patch66: device-mapper-type_punning.diff Patch67: udev-rules_update.diff #Patch68: device-mapper-pkgconfig.patch Patch70: sleep-try-open-count.diff Patch71: blkid-builtin.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libselinux-devel BuildRequires: libudev-devel PreReq: %insserv_prereq %fillup_prereq %description Programs, libraries, and man pages for configuring and using the device mapper. %package devel Summary: Development package for the device mapper Group: System/Base Requires: %name = %version %description devel Files needed for software development using the device mapper %prep %setup -n LVM2.2.02.84 %patch60 -p1 %patch61 -p1 %patch62 -p1 #%patch63 -p1 %patch65 -p1 %patch66 -p0 %patch67 -p1 #%patch68 -p0 %patch70 -p1 #%patch80 -p0 %patch71 -p1 %build CFLAGS="$RPM_OPT_FLAGS" \ %configure --bindir=/bin --libdir=/%_lib --with-usrlibdir=%_libdir \ --sbindir=/sbin --enable-dmeventd \ --with-udevdir=/lib/udev/rules.d \ --enable-selinux --enable-cmdlib \ --with-dmeventd-path=/sbin/dmeventd \ --with-device-uid=0 --with-device-gid=6 --with-device-mode=0640 \ --enable-udev_sync --enable-udev_rules --enable-compat \ --enable-pkgconfig --enable-realtime export SUSE_ASNEEDED=0 make -j1 # symlinks are generated in parallel! %{?_smp_mflags} %install #%makeinstall make install_device-mapper DESTDIR=$RPM_BUILD_ROOT #make libdir=$RPM_BUILD_ROOT/%_libdir install_static_lib mkdir -p $RPM_BUILD_ROOT/%_libdir #ln -s /%_lib/libdevmapper.so.1.02 $RPM_BUILD_ROOT/%_libdir/libdevmapper.so #ln -s /%_lib/libdevmapper-event.so.1.02 $RPM_BUILD_ROOT/%_libdir/libdevmapper-event.so #rm $RPM_BUILD_ROOT/%_lib/libdevmapper.so #rm $RPM_BUILD_ROOT/%_lib/libdevmapper-event.so #install -m 744 scripts/devmap_mknod.sh $RPM_BUILD_ROOT/sbin/ mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m 744 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-dm.sh install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dm.sh %post %{run_ldconfig} [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup %{insserv_cleanup} %postun %{run_ldconfig} [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup %{insserv_cleanup} %files %defattr(-,root,root) %doc INSTALL COPYING COPYING.LIB README VERSION_DM WHATS_NEW_DM %config /etc/init.d/boot.device-mapper /%_lib/libdevmapper.so.1.02 /%_lib/libdevmapper-event.so.1.02 %dir /lib/udev/rules.d %dir /lib/udev /lib/udev/rules.d/10-dm.rules #/lib/udev/rules.d/12-dm-permissions.rules /lib/udev/rules.d/13-dm-disk.rules /lib/udev/rules.d/95-dm-notify.rules /sbin/dmsetup /sbin/dmeventd #/sbin/devmap_mknod.sh %{_mandir}/man8/dmsetup.8.gz %{_mandir}/man8/dmeventd.8.gz %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/setup-dm.sh /lib/mkinitrd/scripts/boot-dm.sh %files devel %defattr(-,root,root) /%_libdir/libdevmapper.so /%_libdir/libdevmapper-event.so /%_libdir/pkgconfig/*.pc #%attr(644, root, root) %_libdir/libdevmapper.a /usr/include/libdevmapper.h /usr/include/libdevmapper-event.h %changelog ++++++ lvm2-clvm.spec ++++++ # # spec file for package lvm2-clvm # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Url: http://sources.redhat.com/cluster/clvm/ Name: lvm2-clvm BuildRequires: device-mapper-devel BuildRequires: libcorosync-devel BuildRequires: libdlm-devel BuildRequires: libopenais-devel BuildRequires: libselinux-devel BuildRequires: readline-devel Version: 2.02.84 Release: 0 Requires: device-mapper >= 1.02.25 Requires: lvm2 = %{version} Requires: openais Provides: clvm PreReq: %fillup_prereq %insserv_prereq Summary: Clustered LVM2 License: GPL-2.0+ ; LGPL-2.1+ Group: System/Base Source: LVM2.%{version}.tgz Source1: lvm.conf Source2: boot.lvm Source3: sysconfig.lvm Source4: mkinitrd-lvm2-setup.sh Source5: mkinitrd-lvm2-boot.sh Source6: 64-lvm2.rules Source7: collect_lvm Source8: clvmd.ocf Patch: improve_probing.diff Patch2: no-inc-audit.diff Patch3: no_buildroot_shared.diff Patch4: sys_mount_instead_linux_fs.diff Patch6: man_page_sectors.diff Patch11: cmdline_large_minor.diff Patch13: pipe_buff-definition.diff Patch14: lvm-pv-create-link.diff Patch19: dont_ignore_tmp_device_file.diff Patch20: support-drbd-filter.diff Patch22: handle_extended_devt.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A daemon for using LVM2 Logival Volumes in a clustered environment. %prep %setup -n LVM2.%{version} %patch %patch2 %patch3 %patch4 %patch6 %patch11 %patch13 #%patch14 -p1 %patch19 -p1 %patch20 -p1 %patch22 -p1 %build MODPROBE_CMD=/sbin/modprobe \ LDFLAGS="-L /usr/%_lib/openais" \ %configure --prefix=/ \ --enable-selinux \ --enable-cmdlib \ --libdir=/%_lib --with-usrlibdir=%_libdir --enable-dmeventd --enable-cmdlib \ --with-clvmd=corosync --datarootdir=/usr/share make %{?_smp_mflags} %install pushd daemons/clvmd make install DESTDIR=$RPM_BUILD_ROOT popd pushd man make install DESTDIR=$RPM_BUILD_ROOT popd install -D -m 755 $RPM_BUILD_ROOT/sbin/clvmd $RPM_BUILD_ROOT/usr/sbin/clvmd rm $RPM_BUILD_ROOT/sbin/clvmd rm -rf $RPM_BUILD_ROOT/%{_mandir}/man5 rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/lv* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/pv* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/vg* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/dmsetup* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/fsadm* rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/dmeventd* install -m755 -D %{S:8} $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/lvm2/clvmd %files %defattr(-,root,root) /usr/sbin/clvmd %dir /usr/lib/ocf %dir /usr/lib/ocf/resource.d %dir /usr/lib/ocf/resource.d/lvm2 /usr/lib/ocf/resource.d/lvm2/clvmd %{_mandir}/man8/clvmd.8.gz %changelog ++++++ lvm2.spec ++++++ # # spec file for package lvm2 # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Url: http://sources.redhat.com/cluster/clvm/ Name: lvm2 BuildRequires: libselinux-devel BuildRequires: libudev-devel BuildRequires: readline-devel Requires: device-mapper >= 1.02.25 Provides: lvm PreReq: %fillup_prereq %insserv_prereq /sbin/mkinitrd %if %suse_version > 1130 PreReq: sysvinit(boot.device-mapper) %endif Version: 2.02.84 Release: 0 Summary: LVM2 Tools License: GPL-2.0+ ; LGPL-2.1+ Group: System/Base Source: LVM2.%{version}.tgz Source1: lvm.conf Source2: boot.lvm Source3: sysconfig.lvm Source4: mkinitrd-lvm2-setup.sh Source5: mkinitrd-lvm2-boot.sh Source6: 64-lvm2.rules Source7: collect_lvm Source8: clvmd.ocf Patch: improve_probing.diff Patch2: no-inc-audit.diff Patch3: no_buildroot_shared.diff Patch4: sys_mount_instead_linux_fs.diff #Patch5: pvscan_2TB_limit.diff Patch6: man_page_sectors.diff Patch11: cmdline_large_minor.diff Patch13: pipe_buff-definition.diff Patch14: lvm-pv-create-link.diff Patch19: dont_ignore_tmp_device_file.diff Patch22: handle_extended_devt.diff #Patch23: lvm2cmd-link-to-devmapper-event.diff #Patches for device mapper Patch60: k_dev_t.dif Patch61: device-mapper-dmsetup-export.patch Patch62: device-mapper-gcc-warning.diff Patch65: device-mapper-dmsetup-deps-export.patch Patch81: udev-rules_update.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # Not a real replacement but we drop evms Provides: evms = 2.5.5 Provides: evms-devel = 2.5.5 Provides: evms-gui = 2.5.5 Provides: evms-ha = 2.5.5 Obsoletes: evms <= 2.5.5 Obsoletes: evms-devel <= 2.5.5 Obsoletes: evms-gui <= 2.5.5 Obsoletes: evms-ha <= 2.5.5 %description Programs and man pages for configuring and using the LVM2 Logical Volume Manager. %prep %setup -n LVM2.%{version} %patch %patch2 %patch3 %patch4 #%patch5 %patch6 %patch11 %patch13 #%patch14 -p1 %patch19 -p1 %patch22 -p1 #%patch23 -p1 # patch to device-mapper %patch60 -p1 %patch61 -p1 %patch62 -p1 #%patch63 -p1 %patch65 -p1 #%patch80 -p0 %patch81 -p1 %build MODPROBE_CMD=/sbin/modprobe \ %configure --prefix=/ \ --bindir=/bin --libdir=/%_lib --with-userlibdir=%_libdir \ --sbindir=/sbin --enable-dmeventd \ --with-udevdir=/lib/udev/rules.d \ --with-dmeventd_path=/sbin/dmeventd \ --enable-udev_sync --enable-udev_rules --enable-compat \ --enable-cmdlib --enable-dmeventd \ --enable-realtime --enable-pkgconfig export SUSE_ASNEEDED=0 make %{?_smp_mflags} %install make install_lvm2 DESTDIR=$RPM_BUILD_ROOT install -d -m 755 $RPM_BUILD_ROOT/etc/lvm install -d -m 755 $RPM_BUILD_ROOT/etc/lvm/backup install -d -m 755 $RPM_BUILD_ROOT/etc/lvm/archive install -d -m 755 $RPM_BUILD_ROOT/etc/lvm/metadata install -d -m 755 $RPM_BUILD_ROOT/var/lock/lvm install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/lvm mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts install -m 755 %{SOURCE4} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-lvm2.sh install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-lvm2.sh mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/var/adm/fillup-templates [ %_lib != lib ] && mv $RPM_BUILD_ROOT/lib/liblvm2cmd.so $RPM_BUILD_ROOT/%_lib/liblvm2cmd.so [ %_lib != lib ] && mv $RPM_BUILD_ROOT/lib/libdevmapper-event-lvm2.so $RPM_BUILD_ROOT/%_lib/libdevmapper-event-lvm2.so pushd $RPM_BUILD_ROOT/%_lib ln -sf device-mapper/libdevmapper-event-lvm2mirror.so libdevmapper-event-lvm2mirror.so.2.02 ln -sf device-mapper/libdevmapper-event-lvm2snapshot.so libdevmapper-event-lvm2snapshot.so.2.02 popd mkdir -p $RPM_BUILD_ROOT/usr/share mv $RPM_BUILD_ROOT/share/man $RPM_BUILD_ROOT/%{_mandir} rmdir $RPM_BUILD_ROOT/share rm $RPM_BUILD_ROOT/usr/include/lvm2cmd.h # install 64-lvm2.rules and collect_lvm #install -m644 -D %{S:6} $RPM_BUILD_ROOT/lib/udev/rules.d/64-lvm2.rules install -m755 -D %{S:7} $RPM_BUILD_ROOT/lib/udev/collect_lvm # remove all device mapper files rm $RPM_BUILD_ROOT/%{_mandir}/man8/fsadm.* %post %{fillup_and_insserv -n lvm boot.lvm} [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of /var/lib/no_initrd_recreation_by_suspend" elif [ -x /sbin/mkinitrd ]; then /sbin/mkinitrd fi /sbin/ldconfig %preun %{stop_on_removal boot.lvm} %postun %{insserv_cleanup} [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup if [ -e /var/lib/no_initrd_recreation_by_suspend ]; then echo "Skipping recreation of existing initial ramdisks, due" echo "to presence of /var/lib/no_initrd_recreation_by_suspend" elif [ -x /sbin/mkinitrd ]; then /sbin/mkinitrd fi /sbin/ldconfig %files %defattr(-,root,root) %doc INSTALL README WHATS_NEW doc/* %dir /etc/lvm %dir /etc/lvm/backup %dir /etc/lvm/archive %dir /etc/lvm/metadata %dir /var/lock/lvm %config /etc/lvm/lvm.conf %config /etc/init.d/boot.lvm %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts %dir /lib/udev %dir /lib/udev/rules.d #/lib/udev/rules.d/64-lvm2.rules /lib/udev/rules.d/11-dm-lvm.rules /lib/udev/collect_lvm /lib/mkinitrd/scripts/setup-lvm2.sh /lib/mkinitrd/scripts/boot-lvm2.sh /var/adm/fillup-templates/sysconfig.lvm /sbin/fsadm /sbin/lvchange /sbin/lvconvert /sbin/lvcreate /sbin/lvdisplay /sbin/lvextend /sbin/lvm /sbin/lvmchange /sbin/lvmdiskscan /sbin/lvmdump /sbin/lvmsadc /sbin/lvmsar /sbin/lvreduce /sbin/lvremove /sbin/lvrename /sbin/lvresize /sbin/lvs /sbin/lvscan /sbin/pvchange /sbin/pvck /sbin/pvcreate /sbin/pvdisplay /sbin/pvmove /sbin/pvremove /sbin/pvresize /sbin/pvs /sbin/pvscan /sbin/vgcfgbackup /sbin/vgcfgrestore /sbin/vgchange /sbin/vgck /sbin/vgconvert /sbin/vgcreate /sbin/vgdisplay /sbin/vgexport /sbin/vgextend /sbin/vgimport /sbin/vgimportclone /sbin/vgmerge /sbin/vgmknodes /sbin/vgreduce /sbin/vgremove /sbin/vgrename /sbin/vgs /sbin/vgscan /sbin/vgsplit /sbin/lvmconf %dir /%_lib/device-mapper /%_lib/device-mapper/libdevmapper-event-lvm2mirror.so /%_lib/device-mapper/libdevmapper-event-lvm2snapshot.so /%_lib/libdevmapper-event-lvm2mirror.so /%_lib/libdevmapper-event-lvm2snapshot.so /%_lib/liblvm2cmd.so /%_lib/libdevmapper-event-lvm2mirror.so.2.02 /%_lib/libdevmapper-event-lvm2snapshot.so.2.02 /%_lib/liblvm2cmd.so.2.02 /%_lib/libdevmapper-event-lvm2.so /%_lib/libdevmapper-event-lvm2.so.2.02 %{_mandir}/man5/lvm.conf.5.gz %{_mandir}/man8/lvchange.8.gz %{_mandir}/man8/lvcreate.8.gz %{_mandir}/man8/lvconvert.8.gz %{_mandir}/man8/lvdisplay.8.gz %{_mandir}/man8/lvmdump.8.gz %{_mandir}/man8/lvextend.8.gz %{_mandir}/man8/lvm.8.gz %{_mandir}/man8/lvmchange.8.gz %{_mandir}/man8/lvmdiskscan.8.gz %{_mandir}/man8/lvreduce.8.gz %{_mandir}/man8/lvremove.8.gz %{_mandir}/man8/lvrename.8.gz %{_mandir}/man8/lvresize.8.gz %{_mandir}/man8/lvs.8.gz %{_mandir}/man8/lvscan.8.gz %{_mandir}/man8/pvchange.8.gz %{_mandir}/man8/pvck.8.gz %{_mandir}/man8/pvcreate.8.gz %{_mandir}/man8/pvdisplay.8.gz %{_mandir}/man8/pvmove.8.gz %{_mandir}/man8/pvremove.8.gz %{_mandir}/man8/pvresize.8.gz %{_mandir}/man8/pvs.8.gz %{_mandir}/man8/pvscan.8.gz %{_mandir}/man8/vgcfgbackup.8.gz %{_mandir}/man8/vgcfgrestore.8.gz %{_mandir}/man8/vgchange.8.gz %{_mandir}/man8/vgck.8.gz %{_mandir}/man8/vgconvert.8.gz %{_mandir}/man8/vgcreate.8.gz %{_mandir}/man8/vgdisplay.8.gz %{_mandir}/man8/vgexport.8.gz %{_mandir}/man8/vgextend.8.gz %{_mandir}/man8/vgimport.8.gz %{_mandir}/man8/vgimportclone.8.gz %{_mandir}/man8/vgmerge.8.gz %{_mandir}/man8/vgmknodes.8.gz %{_mandir}/man8/vgreduce.8.gz %{_mandir}/man8/vgremove.8.gz %{_mandir}/man8/vgrename.8.gz %{_mandir}/man8/vgs.8.gz %{_mandir}/man8/vgscan.8.gz %{_mandir}/man8/vgsplit.8.gz %{_mandir}/man8/lvmconf.8.gz %{_mandir}/man8/lvmsadc.8.gz %{_mandir}/man8/lvmsar.8.gz %changelog ++++++ 64-lvm2.rules ++++++ # This file causes block devices with LVM signatures to be automatically # added to their volume group. # See udev(8) for syntax SUBSYSTEM!="block", GOTO="lvm_end" ACTION!="add|change", GOTO="lvm_end" ENV{ID_FS_TYPE}!="LVM2_member", GOTO="lvm_end" ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-id/lvm2-pvuuid-$env{ID_FS_UUID_ENC}" ENV{DMDEPS}=="0", GOTO="lvm_end" IMPORT{PROGRAM}="collect_lvm $tempnode" ENV{VGUUID}!="?*", GOTO="lvm_end" ENV{VGNAME}!="?*", GOTO="lvm_end" # If all related PV's available already, active all LVs inside. ENV{COLLECT}=="0", RUN+="/sbin/vgchange -a y $env{VGNAME}" LABEL="lvm_end" ++++++ baselibs.conf ++++++ device-mapper device-mapper-devel ++++++ blkid-builtin.patch ++++++
From a2e5d2cb9c53cff13e48efa7ba2791d9deb36314 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha
Date: Thu, 16 Feb 2012 14:39:02 +0000 Subject: [PATCH] Switch to using built-in blkid in 13-dm-disk.rules.
Available in udev since version 176.
---
WHATS_NEW_DM | 1 +
udev/13-dm-disk.rules | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
Index: LVM2.2.02.84/udev/13-dm-disk.rules
===================================================================
--- LVM2.2.02.84.orig/udev/13-dm-disk.rules
+++ LVM2.2.02.84/udev/13-dm-disk.rules
@@ -20,7 +20,7 @@ ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id
ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end"
-IMPORT{program}="$env{DM_SBIN_PATH}/blkid -o udev -p $tempnode"
+IMPORT{builtin}="blkid"
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
OPTIONS+="watch"
ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
++++++ boot.device-mapper ++++++
#! /bin/sh
#
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
#
# /etc/init.d/boot.device-mapper
#
### BEGIN INIT INFO
# Provides: boot.device-mapper
# Required-Start: boot.udev boot.rootfsck
# Required-Stop: boot.udev
# Default-Start: B
# Default-Stop:
# Description: activate device mapper
### END INIT INFO
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Activating device mapper..."
modprobe dm-mod || rc_failed 1
rc_status -v
;;
stop)
rc_failed 3
rc_status -v
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
rc_exit
++++++ boot.lvm ++++++
#! /bin/sh
#
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
#
# /etc/init.d/boot.lvm
#
### BEGIN INIT INFO
# Provides: boot.lvm
# Required-Start: boot.udev boot.rootfsck
# Should-Start: boot.device-mapper boot.multipath boot.md boot.dmraid
# Required-Stop: $null
# Should-Stop: $null
# Default-Start: B
# Default-Stop:
# Description: start logical volumes
### END INIT INFO
. /etc/rc.status
. /etc/sysconfig/lvm
# udev interaction
if [ -x /sbin/udevadm ] ; then
[ -z "$LVM_DEVICE_TIMEOUT" ] && LVM_DEVICE_TIMEOUT=60
else
LVM_DEVICE_TIMEOUT=0
fi
rc_reset
case "$1" in
start)
#
# Find and activate volume groups (HM 1/1/1999)
#
if test -d /etc/lvm -a -x /sbin/vgscan -a -x /sbin/vgchange ; then
# Waiting for udev to settle
if [ "$LVM_DEVICE_TIMEOUT" -gt 0 ] ; then
echo "Waiting for udev to settle..."
/sbin/udevadm settle --timeout=$LVM_DEVICE_TIMEOUT
fi
echo "Scanning for LVM volume groups..."
/sbin/vgscan --mknodes
echo "Activating LVM volume groups..."
/sbin/vgchange -a y $LVM_VGS_ACTIVATED_ON_BOOT
rc_status -v -r
fi
;;
stop)
if test -d /etc/lvm -a -x /sbin/vgchange ; then
/sbin/vgchange -a n
fi
rc_status -v
;;
status)
rc_failed 4
rc_status -v
;;
reload)
$0 start
;;
*)
echo "Usage: $0 {start|stop|status|reload}"
exit 1
;;
esac
rc_exit
++++++ clvmd.ocf ++++++
#!/bin/bash
# Copyright (c) 2008 Xinwei Hu
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Further, this software is distributed without any warranty that it is
# free of the rightful claim of any third person regarding infringement
# or the like. Any license provided herein, whether implied or
# otherwise, applies only to this software file. Patent licenses, if
# any, provided herein do not apply to combinations of this program with
# other software, or any other product whatsoever.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
#
#######################################################################
# OCF initialization
. ${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs
# Parameter defaults
: ${OCF_RESKEY_CRM_meta_gloablly_unique:="false"}
: ${OCF_RESKEY_daemon_timeout:="80"}
: ${OCF_RESKEY_daemon_options:="-d0"}
# Common variables
DAEMON="/usr/sbin/clvmd"
status_daemon()
{
PID=`pidofproc "$DAEMON"`
if [ -n "$PID" ]; then
return $OCF_SUCCESS
fi
return $OCF_NOT_RUNNING
}
bringup_daemon()
{
if [ ! -e "$DAEMON" ]; then
ocf_log err "Required binary not found: $DAEMON"
return $OCF_ERR_INSTALLED
fi
start_daemon "$DAEMON" "$OCF_RESKEY_daemon_options"; rc=$?
if [ $rc != 0 ]; then
ocf_log err "Could not start $DAEMON"
return $OCF_ERR_GENERIC
fi
sleep 1
COUNT=0
rc=$OCF_NOT_RUNNING
while [ $rc = $OCF_NOT_RUNNING ]; do
COUNT=`expr $COUNT + 1`
if [ $COUNT -gt $OCF_RESKEY_daemon_timeout ]; then
ocf_log err "`basename $DAEMON` did not come up"
return $OCF_ERR_GENERIC
fi
status_daemon; rc=$?
sleep 1
done
return $rc
}
kill_daemon()
{
status_daemon; rc=$?
if [ $rc != $OCF_SUCCESS ]; then
return rc
fi
ocf_log info "Stopping `basename "$DAEMON"`"
killproc -INT "$DAEMON"
sleep 1
status_daemon; rc=$?
COUNT=0
while [ $rc = $OCF_SUCCESS ]; do
COUNT=`expr $COUNT + 1`
if [ $COUNT -gt $OCF_RESKEY_daemon_timeout ]; then
ocf_log err "`basename $DAEMON` shutdown emergency"
killproc -9 "$DAEMON"
status_daemon; rc=$?
if [ $rc = $OCF_NOT_RUNNING ]; then
return $OCF_SUCCESS
else
return $OCF_ERR_GENERIC
fi
fi
killproc -INT "$DAEMON"
sleep 1
status_daemon; rc=$?
done
return $OCF_SUCCESS
}
clvmd_start() {
clvmd_monitor; rc=$?
if [ $rc != $OCF_NOT_RUNNING ]; then
return $rc
fi
ocf_log info "Starting $OCF_RESOURCE_INSTANCE"
bringup_daemon
return $?
}
clvmd_stop() {
clvmd_monitor; rc=$?
case $rc in
$OCF_NOT_RUNNING) return $OCF_SUCCESS;;
esac
ocf_log info "Stopping $OCF_RESOURCE_INSTANCE"
kill_daemon
}
clvmd_monitor() {
clvmd_validate
status_daemon
return $?
}
clvmd_usage() {
echo "usage: $0 {start|stop|monitor|validate-all|meta-data}"
echo " Expects to have a fully populated OCF RA-compliant environment set."
echo " In particualr, a value for OCF_ROOT"
}
clvmd_validate() {
: TODO: check for gloablly_unique=true and return OCF_ERR_CONFIGURED
case ${OCF_RESKEY_CRM_meta_gloablly_unique} in
yes|Yes|true|True|1)
ocf_log err "$OCF_RESOURCE_INSTANCE must be configured with the gloablly_unique=false meta attribute"
exit $OCF_ERR_CONFIGURED
;;
esac
return $OCF_SUCCESS
}
meta_data() {
cat <