Stephan Kulow
2012-10-18 08:15:42 +00:00
committed by Git OBS Bridge
parent c114ca9b11
commit 56e5ad2fa6
44 changed files with 1005 additions and 2318 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a6c93a4f1a0cfa1abe41e7a3f3e7bfb8c7b77e8c6983c99fc030ccdc1841c7bc
size 592703

3
LVM2.2.02.84.tgz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9238f3400208f26c0e5be896dd3bf41c4d515ab534de23aae8ef4d6ad0d3576d
size 980421

View File

@@ -1 +1,2 @@
device-mapper
device-mapper-devel

24
blkid-builtin.patch Normal file
View File

@@ -0,0 +1,24 @@
From a2e5d2cb9c53cff13e48efa7ba2791d9deb36314 Mon Sep 17 00:00:00 2001
From: Peter Rajnoha <prajnoha@redhat.com>
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"

View File

@@ -18,15 +18,14 @@
rc_reset
case "$1" in
start)
echo "Activating device mapper..."
lsmod | grep "^dm[-_]mod[ ]" >/dev/null 2>&1 || modprobe dm-mod
rc_status -v -r
start)
echo -n "Activating device mapper..."
modprobe dm-mod || rc_failed 1
rc_status -v
;;
stop)
# module unloading seems to be uneliable in kernel 2.6
# rmmod dm-mod
# rc_status -v
rc_failed 3
rc_status -v
;;
status)
rc_failed 4

View File

@@ -6,8 +6,8 @@
#
### BEGIN INIT INFO
# Provides: boot.lvm
# Required-Start: boot.device-mapper boot.udev boot.rootfsck
# Should-Start: boot.multipath boot.md boot.dmraid
# 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

View File

@@ -1,22 +0,0 @@
Index: LVM2.2.02.39/daemons/clvmd/clvmd-openais.c
===================================================================
--- LVM2.2.02.39.orig/daemons/clvmd/clvmd-openais.c
+++ LVM2.2.02.39/daemons/clvmd/clvmd-openais.c
@@ -368,7 +368,16 @@ static void _cluster_closedown(void)
DEBUGLOG("cluster_closedown\n");
unlock_all();
- dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
+ int r;
+ r = dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
+ if (r == -1) {
+ if (errno == EBUSY) {
+ syslog(LOG_ERR, "Some locks still active, close by force\n");
+ dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
+ } else {
+ syslog(LOG_ERR, "dlm_release_lockspace failed\n");
+ }
+ }
cpg_finalize(cpg_handle);
}

View File

@@ -1,44 +0,0 @@
Index: LVM2.2.02.39/daemons/clvmd/clvmd-openais.c
===================================================================
--- LVM2.2.02.39.orig/daemons/clvmd/clvmd-openais.c 2009-04-01 20:12:52.000000000 +0800
+++ LVM2.2.02.39/daemons/clvmd/clvmd-openais.c 2009-04-01 20:13:23.000000000 +0800
@@ -342,7 +342,7 @@
err = cpg_join(cpg_handle, &cpg_group_name);
if (err != SA_AIS_OK) {
cpg_finalize(cpg_handle);
- dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
+ dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
syslog(LOG_ERR, "Cannot join clvmd process group");
DEBUGLOG("Cannot join clvmd process group: %d\n", err);
return ais_to_errno(err);
@@ -351,8 +351,9 @@
err = cpg_local_get(cpg_handle,
&our_nodeid);
if (err != SA_AIS_OK) {
+ cpg_leave(cpg_handle, &cpg_group_name);
cpg_finalize(cpg_handle);
- dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
+ dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
syslog(LOG_ERR, "Cannot get local node id\n");
return ais_to_errno(err);
}
@@ -369,15 +370,11 @@
unlock_all();
int r;
- r = dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
- if (r == -1) {
- if (errno == EBUSY) {
- syslog(LOG_ERR, "Some locks still active, close by force\n");
- dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
- } else {
- syslog(LOG_ERR, "dlm_release_lockspace failed\n");
- }
+ r = dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
+ if (r != 0) {
+ syslog(LOG_ERR, "dlm_release_lockspace failed: %d\n", errno);
}
+ cpg_leave(cpg_handle, &cpg_group_name);
cpg_finalize(cpg_handle);
}

View File

@@ -1,378 +0,0 @@
Index: LVM2.2.02.39/daemons/clvmd/clvmd-openais.c
===================================================================
--- LVM2.2.02.39.orig/daemons/clvmd/clvmd-openais.c 2008-06-20 20:46:21.000000000 +0800
+++ LVM2.2.02.39/daemons/clvmd/clvmd-openais.c 2009-02-25 22:13:32.000000000 +0800
@@ -34,9 +34,9 @@
#include <syslog.h>
#include <assert.h>
#include <libdevmapper.h>
+#include <libdlm.h>
#include <openais/saAis.h>
-#include <openais/saLck.h>
#include <openais/cpg.h>
#include "list.h"
@@ -50,6 +50,8 @@
/* Timeout value for several openais calls */
#define TIMEOUT 10
+#define LOCKSPACE_NAME "clvmd"
+
static void cpg_deliver_callback (cpg_handle_t handle,
struct cpg_name *groupName,
uint32_t nodeid,
@@ -66,9 +68,6 @@
/* Hash list of nodes in the cluster */
static struct dm_hash_table *node_hash;
-/* For associating lock IDs & resource handles */
-static struct dm_hash_table *lock_hash;
-
/* Number of active nodes */
static int num_nodes;
static unsigned int our_nodeid;
@@ -77,9 +76,15 @@
/* OpenAIS handles */
static cpg_handle_t cpg_handle;
-static SaLckHandleT lck_handle;
static struct cpg_name cpg_group_name;
+static dlm_lshandle_t *lockspace;
+
+struct lock_wait {
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ struct dlm_lksb lksb;
+};
/* Openais callback structs */
cpg_callbacks_t cpg_callbacks = {
@@ -93,13 +98,6 @@
int nodeid;
};
-struct lock_info
-{
- SaLckResourceHandleT res_handle;
- SaLckLockIdT lock_id;
- SaNameT lock_name;
-};
-
/* Set errno to something approximating the right value and return 0 or -1 */
static int ais_to_errno(SaAisErrorT err)
{
@@ -309,22 +307,11 @@
num_nodes = member_list_entries;
}
-static int lck_dispatch(struct local_client *client, char *buf, int len,
- const char *csid, struct local_client **new_client)
-{
- *new_client = NULL;
- saLckDispatch(lck_handle, SA_DISPATCH_ONE);
- return 1;
-}
-
static int _init_cluster(void)
{
SaAisErrorT err;
- SaVersionT ver = { 'B', 1, 1 };
- int select_fd;
node_hash = dm_hash_create(100);
- lock_hash = dm_hash_create(10);
err = cpg_initialize(&cpg_handle,
&cpg_callbacks);
@@ -335,16 +322,19 @@
return ais_to_errno(err);
}
- err = saLckInitialize(&lck_handle,
- NULL,
- &ver);
- if (err != SA_AIS_OK) {
- cpg_initialize(&cpg_handle, &cpg_callbacks);
- syslog(LOG_ERR, "Cannot initialise OpenAIS lock service: %d",
- err);
- DEBUGLOG("Cannot initialise OpenAIS lock service: %d\n\n", err);
- return ais_to_errno(err);
+ /* Create a lockspace for LV & VG locks to live in */
+ lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);
+ if (!lockspace) {
+ if (errno == EEXIST) {
+ lockspace = dlm_open_lockspace(LOCKSPACE_NAME);
+ }
+ if (!lockspace) {
+ syslog(LOG_ERR, "Unable to create lockspace for CLVM: %m");
+ return -1;
+ }
}
+ dlm_ls_pthread_init(lockspace);
+ DEBUGLOG("DLM initialisation complete\n");
/* Connect to the clvmd group */
strcpy((char *)cpg_group_name.value, "clvmd");
@@ -352,7 +342,7 @@
err = cpg_join(cpg_handle, &cpg_group_name);
if (err != SA_AIS_OK) {
cpg_finalize(cpg_handle);
- saLckFinalize(lck_handle);
+ dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
syslog(LOG_ERR, "Cannot join clvmd process group");
DEBUGLOG("Cannot join clvmd process group: %d\n", err);
return ais_to_errno(err);
@@ -362,15 +352,12 @@
&our_nodeid);
if (err != SA_AIS_OK) {
cpg_finalize(cpg_handle);
- saLckFinalize(lck_handle);
+ dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
syslog(LOG_ERR, "Cannot get local node id\n");
return ais_to_errno(err);
}
DEBUGLOG("Our local node id is %d\n", our_nodeid);
- saLckSelectionObjectGet(lck_handle, (SaSelectionObjectT *)&select_fd);
- add_internal_client(select_fd, lck_dispatch);
-
DEBUGLOG("Connected to OpenAIS\n");
return 0;
@@ -381,7 +368,7 @@
DEBUGLOG("cluster_closedown\n");
unlock_all();
- saLckFinalize(lck_handle);
+ dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 0);
cpg_finalize(cpg_handle);
}
@@ -472,156 +459,69 @@
return somedown;
}
-/* Real locking */
-static int _lock_resource(char *resource, int mode, int flags, int *lockid)
+static int _sync_lock(const char *resource, int mode, int flags, int *lockid)
{
- struct lock_info *linfo;
- SaLckResourceHandleT res_handle;
- SaAisErrorT err;
- SaLckLockIdT lock_id;
- SaLckLockStatusT lockStatus;
-
- /* This needs to be converted from DLM/LVM2 value for OpenAIS LCK */
- if (flags & LCK_NONBLOCK) flags = SA_LCK_LOCK_NO_QUEUE;
-
- linfo = malloc(sizeof(struct lock_info));
- if (!linfo)
- return -1;
+ struct dlm_lksb lksb;
+ int err;
DEBUGLOG("lock_resource '%s', flags=%d, mode=%d\n", resource, flags, mode);
- linfo->lock_name.length = strlen(resource)+1;
- strcpy((char *)linfo->lock_name.value, resource);
-
- err = saLckResourceOpen(lck_handle, &linfo->lock_name,
- SA_LCK_RESOURCE_CREATE, TIMEOUT, &res_handle);
- if (err != SA_AIS_OK)
- {
- DEBUGLOG("ResourceOpen returned %d\n", err);
- free(linfo);
- return ais_to_errno(err);
- }
+ if (flags & LKF_CONVERT)
+ lksb.sb_lkid = *lockid;
- err = saLckResourceLock(
- res_handle,
- &lock_id,
+ err = dlm_ls_lock_wait(lockspace,
mode,
+ &lksb,
flags,
+ resource,
+ strlen(resource),
0,
- SA_TIME_END,
- &lockStatus);
- if (err != SA_AIS_OK && lockStatus != SA_LCK_LOCK_GRANTED)
+ NULL, NULL, NULL);
+
+ if (err != 0)
{
- free(linfo);
- saLckResourceClose(res_handle);
- return ais_to_errno(err);
+ DEBUGLOG("dlm_ls_lock returned %d\n", errno);
+ return err;
+ }
+ errno = lksb.sb_status;
+ if (lksb.sb_status != 0)
+ {
+ DEBUGLOG("dlm_ls_lock returns lksb.sb_status %d\n", lksb.sb_status);
+ return -1;
}
-
- /* Wait for it to complete */
-
- DEBUGLOG("lock_resource returning %d, lock_id=%llx\n", err,
- lock_id);
- linfo->lock_id = lock_id;
- linfo->res_handle = res_handle;
+ DEBUGLOG("lock_resource returning %d, lock_id=%x\n", err, lksb.sb_lkid);
- dm_hash_insert(lock_hash, resource, linfo);
+ *lockid = lksb.sb_lkid;
- return ais_to_errno(err);
+ return 0;
}
-
-static int _unlock_resource(char *resource, int lockid)
+static int _sync_unlock(const char *resource, int lockid)
{
- SaAisErrorT err;
- struct lock_info *linfo;
+ struct dlm_lksb lksb;
+ int err;
- DEBUGLOG("unlock_resource %s\n", resource);
- linfo = dm_hash_lookup(lock_hash, resource);
- if (!linfo)
- return 0;
+ DEBUGLOG("unlock_resource: %s lockid: %x\n", resource, lockid);
+ lksb.sb_lkid = lockid;
- DEBUGLOG("unlock_resource: lockid: %llx\n", linfo->lock_id);
- err = saLckResourceUnlock(linfo->lock_id, SA_TIME_END);
- if (err != SA_AIS_OK)
+ err = dlm_ls_unlock_wait(lockspace,
+ lockid,
+ 0,
+ &lksb);
+ if (err != 0)
{
DEBUGLOG("Unlock returned %d\n", err);
- return ais_to_errno(err);
+ return err;
}
-
- /* Release the resource */
- dm_hash_remove(lock_hash, resource);
- saLckResourceClose(linfo->res_handle);
- free(linfo);
-
- return ais_to_errno(err);
-}
-
-static int _sync_lock(const char *resource, int mode, int flags, int *lockid)
-{
- int status;
- char lock1[strlen(resource)+3];
- char lock2[strlen(resource)+3];
-
- snprintf(lock1, sizeof(lock1), "%s-1", resource);
- snprintf(lock2, sizeof(lock2), "%s-2", resource);
-
- switch (mode)
+ errno = lksb.sb_status;
+ if (lksb.sb_status != EUNLOCK)
{
- case LCK_EXCL:
- status = _lock_resource(lock1, SA_LCK_EX_LOCK_MODE, flags, lockid);
- if (status)
- goto out;
-
- /* If we can't get this lock too then bail out */
- status = _lock_resource(lock2, SA_LCK_EX_LOCK_MODE, LCK_NONBLOCK,
- lockid);
- if (status == SA_LCK_LOCK_NOT_QUEUED)
- {
- _unlock_resource(lock1, *lockid);
- status = -1;
- errno = EAGAIN;
- }
- break;
-
- case LCK_PREAD:
- case LCK_READ:
- status = _lock_resource(lock1, SA_LCK_PR_LOCK_MODE, flags, lockid);
- if (status)
- goto out;
- _unlock_resource(lock2, *lockid);
- break;
-
- case LCK_WRITE:
- status = _lock_resource(lock2, SA_LCK_EX_LOCK_MODE, flags, lockid);
- if (status)
- goto out;
- _unlock_resource(lock1, *lockid);
- break;
-
- default:
- status = -1;
- errno = EINVAL;
- break;
+ DEBUGLOG("dlm_ls_unlock_wait returns lksb.sb_status: %x\n", lksb.sb_status);
+ return -1;
}
-out:
- *lockid = mode;
- return status;
-}
-
-static int _sync_unlock(const char *resource, int lockid)
-{
- int status = 0;
- char lock1[strlen(resource)+3];
- char lock2[strlen(resource)+3];
-
- snprintf(lock1, sizeof(lock1), "%s-1", resource);
- snprintf(lock2, sizeof(lock2), "%s-2", resource);
-
- _unlock_resource(lock1, lockid);
- _unlock_resource(lock2, lockid);
+ return 0;
- return status;
}
/* We are always quorate ! */
Index: LVM2.2.02.39/daemons/clvmd/Makefile.in
===================================================================
--- LVM2.2.02.39.orig/daemons/clvmd/Makefile.in 2009-02-25 18:52:32.000000000 +0800
+++ LVM2.2.02.39/daemons/clvmd/Makefile.in 2009-02-25 18:52:32.000000000 +0800
@@ -59,7 +59,7 @@
ifeq ("$(OPENAIS)", "yes")
SOURCES += clvmd-openais.c
- LMLIBS += -lSaLck -lcpg
+ LMLIBS += -ldlm -lcpg
DEFS += -DUSE_OPENAIS
endif
Index: LVM2.2.02.39/daemons/clvmd/clvm.h
===================================================================
--- LVM2.2.02.39.orig/daemons/clvmd/clvm.h 2009-02-25 18:52:32.000000000 +0800
+++ LVM2.2.02.39/daemons/clvmd/clvm.h 2009-02-25 18:52:32.000000000 +0800
@@ -79,6 +79,7 @@
/* Locking flags - these match the ones
* in dlm.h
*/
+#ifndef LKF_NOQUEUE
#define LKF_NOQUEUE (0x00000001)
#define LKF_CANCEL (0x00000002)
#define LKF_CONVERT (0x00000004)
@@ -94,3 +95,4 @@
#define LKF_HEADQUE (0x00001000)
#define LKF_NOORDER (0x00002000)
#endif
+#endif

View File

@@ -1,12 +1,14 @@
--- tools/lvmcmdline.c
+++ tools/lvmcmdline.c 2008/02/20 10:45:12
@@ -265,8 +265,8 @@
if (!_get_int_arg(a, &ptr) || (*ptr) || (a->sign == SIGN_MINUS))
Index: tools/lvmcmdline.c
===================================================================
--- tools/lvmcmdline.c.orig 2011-01-13 23:00:29.000000000 +0800
+++ tools/lvmcmdline.c 2011-02-15 14:59:30.000000000 +0800
@@ -380,8 +380,8 @@
if (!_get_int_arg(av, &ptr) || (*ptr) || (av->sign == SIGN_MINUS))
return 0;
- if (a->i_value > 255) {
- if (av->i_value > 255) {
- log_error("Minor number outside range 0-255");
+ if (a->i_value > 1048575) {
+ if (av->i_value > 1048575) {
+ log_error("Minor number outside range 0-1048575");
return 0;
}

View File

@@ -1,6 +1,8 @@
#!/bin/sh
PVNAME=$1
source /etc/sysconfig/lvm
/sbin/lvm pvs --config "devices {filter = [ \"a|$PVNAME|\", \"r/.*/\" ]}" --partial -o vg_name,vg_attr,pv_uuid,vg_uuid --ignorelockingfailure --noheadings $PVNAME 2>/dev/null | while read vgname vgattr pvuuid vguuid; do
if [[ $vgattr =~ mode. ]]; then
continue
@@ -32,6 +34,20 @@ PVNAME=$1
echo VGUUID=$vguuid
echo VGNAME=$vgname
if [[ -n $LVM_VGS_ACTIVATED_ON_BOOT ]]; then
found=0
for autovg in $LVM_VGS_ACTIVATED_ON_BOOT; do
if [[ $vgname == $autovg ]]; then
found=1
break
fi
done
if [[ $found == 0 ]]; then
echo COLLECT=1
exit 0
fi
fi
collected=0
for pv in $pvlist; do
if [[ x$pv = x$pvuuid ]]; then

View File

@@ -1,8 +1,8 @@
Index: LVM2.2.02.45/tools/dmsetup.c
Index: LVM2.2.02.84/tools/dmsetup.c
===================================================================
--- LVM2.2.02.45.orig/tools/dmsetup.c 2009-04-27 17:46:16.000000000 +0800
+++ LVM2.2.02.45/tools/dmsetup.c 2009-04-27 17:58:50.000000000 +0800
@@ -1087,6 +1087,7 @@
--- LVM2.2.02.84.orig/tools/dmsetup.c 2011-02-15 15:00:52.000000000 +0800
+++ LVM2.2.02.84/tools/dmsetup.c 2011-02-15 15:00:54.000000000 +0800
@@ -1645,6 +1645,7 @@
const char *name = NULL;
const char *uuid = NULL;
struct dm_info info;
@@ -10,7 +10,7 @@ Index: LVM2.2.02.45/tools/dmsetup.c
if (data)
name = names->name;
@@ -1156,6 +1157,22 @@
@@ -1714,6 +1715,28 @@
printf("\n");
}
@@ -19,6 +19,12 @@ Index: LVM2.2.02.45/tools/dmsetup.c
+ if (!(dmt = dm_task_create(DM_DEVICE_DEPS)))
+ goto out;
+
+ name = NULL;
+ if (data)
+ name = names->name;
+ else if (argc == 2)
+ name = argv[1];
+
+ if (!_set_task_device(dmt, name, 0))
+ goto out;
+

View File

@@ -1,8 +1,8 @@
Index: LVM2.2.02.45/tools/dmsetup.c
Index: LVM2.2.02.84/tools/dmsetup.c
===================================================================
--- LVM2.2.02.45.orig/tools/dmsetup.c 2008-10-31 01:52:06.000000000 +0800
+++ LVM2.2.02.45/tools/dmsetup.c 2009-04-27 17:46:16.000000000 +0800
@@ -1075,6 +1075,94 @@
--- LVM2.2.02.84.orig/tools/dmsetup.c 2011-02-05 06:17:55.000000000 +0800
+++ LVM2.2.02.84/tools/dmsetup.c 2011-02-15 14:44:42.000000000 +0800
@@ -1633,6 +1633,94 @@
return r;
}
@@ -95,9 +95,9 @@ Index: LVM2.2.02.45/tools/dmsetup.c
+}
+
/* Show target names and their version numbers */
static int _targets(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused)))
static int _targets(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused)))
{
@@ -2115,6 +2203,7 @@
@@ -2735,6 +2823,7 @@
{"info", "[<device>]", 0, 1, _info},
{"deps", "[<device>]", 0, 1, _deps},
{"status", "[<device>] [--target <target_type>]", 0, 1, _status},
@@ -105,11 +105,11 @@ Index: LVM2.2.02.45/tools/dmsetup.c
{"table", "[<device>] [--target <target_type>] [--showkeys]", 0, 1, _status},
{"wait", "<device> [<event_nr>]", 0, 2, _wait},
{"mknodes", "[<device>]", 0, 1, _mknodes},
Index: LVM2.2.02.45/man/dmsetup.8.in
Index: LVM2.2.02.84/man/dmsetup.8.in
===================================================================
--- LVM2.2.02.45.orig/man/dmsetup.8.in 2007-12-28 23:13:38.000000000 +0800
+++ LVM2.2.02.45/man/dmsetup.8.in 2009-04-27 17:48:53.000000000 +0800
@@ -46,6 +46,9 @@
--- LVM2.2.02.84.orig/man/dmsetup.8.in 2011-02-05 03:33:54.000000000 +0800
+++ LVM2.2.02.84/man/dmsetup.8.in 2011-02-15 14:44:42.000000000 +0800
@@ -50,6 +50,9 @@
.I [--noheadings] [--separator separator] [-o fields] [-O|--sort sort_fields]
.I [device_name]
.br
@@ -119,7 +119,7 @@ Index: LVM2.2.02.45/man/dmsetup.8.in
.B dmsetup deps
.I [device_name]
.br
@@ -146,6 +149,10 @@
@@ -200,6 +203,10 @@
If successful a device will appear as
/dev/device-mapper/<device-name>.
See below for information on the table format.

View File

@@ -1,7 +1,7 @@
Index: LVM2.2.02.45/libdm/datastruct/hash.c
Index: LVM2.2.02.84/libdm/datastruct/hash.c
===================================================================
--- LVM2.2.02.45.orig/libdm/datastruct/hash.c 2008-11-04 02:59:59.000000000 +0800
+++ LVM2.2.02.45/libdm/datastruct/hash.c 2009-04-27 17:52:05.000000000 +0800
--- LVM2.2.02.84.orig/libdm/datastruct/hash.c 2010-10-01 05:06:52.000000000 +0800
+++ LVM2.2.02.84/libdm/datastruct/hash.c 2011-02-15 14:45:59.000000000 +0800
@@ -19,7 +19,7 @@
struct dm_hash_node *next;
void *data;
@@ -11,7 +11,7 @@ Index: LVM2.2.02.45/libdm/datastruct/hash.c
};
struct dm_hash_table {
@@ -140,7 +140,7 @@
@@ -136,7 +136,7 @@
static struct dm_hash_node **_find(struct dm_hash_table *t, const char *key,
uint32_t len)
{
@@ -19,27 +19,27 @@ Index: LVM2.2.02.45/libdm/datastruct/hash.c
+ unsigned h = _hash((unsigned char*)key, len) & (t->num_slots - 1);
struct dm_hash_node **c;
for (c = &t->slots[h]; *c; c = &((*c)->next))
for (c = &t->slots[h]; *c; c = &((*c)->next)) {
@@ -235,7 +235,7 @@
char *dm_hash_get_key(struct dm_hash_table *t __attribute((unused)),
char *dm_hash_get_key(struct dm_hash_table *t __attribute__((unused)),
struct dm_hash_node *n)
{
- return n->key;
+ return (char*)n->key;
}
void *dm_hash_get_data(struct dm_hash_table *t __attribute((unused)),
Index: LVM2.2.02.45/libdm/ioctl/libdm-iface.c
void *dm_hash_get_data(struct dm_hash_table *t __attribute__((unused)),
Index: LVM2.2.02.84/libdm/ioctl/libdm-iface.c
===================================================================
--- LVM2.2.02.45.orig/libdm/ioctl/libdm-iface.c 2009-02-13 04:42:07.000000000 +0800
+++ LVM2.2.02.45/libdm/ioctl/libdm-iface.c 2009-04-27 17:53:30.000000000 +0800
@@ -1668,7 +1668,8 @@
dmt->no_open_count ? 'N' : 'O',
dmt->no_flush ? 'N' : 'F',
--- LVM2.2.02.84.orig/libdm/ioctl/libdm-iface.c 2011-02-05 05:26:33.000000000 +0800
+++ LVM2.2.02.84/libdm/ioctl/libdm-iface.c 2011-02-15 14:45:59.000000000 +0800
@@ -1983,7 +1983,8 @@
dmt->skip_lockfs ? "S " : "",
- dmt->sector, dmt->message ? dmt->message : "",
dmt->secure_data ? "W " : "",
dmt->query_inactive_table ? "I " : "",
- dmt->sector, _sanitise_message(dmt->message),
+ (unsigned long long int)dmt->sector,
+ dmt->message ? dmt->message : "",
+ _sanitise_message(dmt->message),
dmi->data_size);
#ifdef DM_IOCTLS
if (ioctl(_control_fd, command, dmi) < 0) {

View File

@@ -1,21 +0,0 @@
Index: LVM2.2.02.45/libdm/Makefile.in
===================================================================
--- LVM2.2.02.45.orig/libdm/Makefile.in 2009-04-27 17:41:57.000000000 +0800
+++ LVM2.2.02.45/libdm/Makefile.in 2009-04-27 17:56:06.000000000 +0800
@@ -78,7 +78,6 @@
$(libdir)/libdevmapper.$(LIB_SUFFIX)
install_static: install_@interface@_static
- $(LN_S) -f libdevmapper.a.$(LIB_VERSION_DM) $(libdir)/libdevmapper.a
install_ioctl: ioctl/libdevmapper.$(LIB_SUFFIX)
$(INSTALL) -D -m 555 $(STRIP) $< \
@@ -90,7 +89,7 @@
install_ioctl_static: ioctl/libdevmapper.a
$(INSTALL) -D -m 555 $(STRIP) $< \
- $(libdir)/libdevmapper.a.$(LIB_VERSION_DM)
+ $(libdir)/libdevmapper.a
$(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION_DM): $(interface)/%.$(LIB_SUFFIX)
rm -f $@

View File

@@ -0,0 +1,13 @@
Index: lib/device/device.c
===================================================================
--- lib/device/device.c.orig 2009-08-02 01:14:52.000000000 +0800
+++ lib/device/device.c 2010-02-04 14:02:42.000000000 +0800
@@ -38,7 +38,7 @@
uint8_t end_cyl;
uint32_t start_sect;
uint32_t nr_sects;
-} __attribute__((packed));
+} __attribute__((packed,may_alias));
static int _is_partitionable(struct device *dev)
{

View File

@@ -1,132 +0,0 @@
Index: LVM2.2.02.45/libdm/ioctl/libdm-iface.c
===================================================================
--- LVM2.2.02.45.orig/libdm/ioctl/libdm-iface.c 2009-04-27 17:53:30.000000000 +0800
+++ LVM2.2.02.45/libdm/ioctl/libdm-iface.c 2009-04-27 17:57:54.000000000 +0800
@@ -129,6 +129,67 @@
# define DM_EXISTS_FLAG 0x00000004
#endif
+static unsigned long long get_seq()
+{
+ struct stat s;
+ int r;
+ unsigned long long seq = 0;
+ FILE* fp;
+ r = stat("/sys/kernel/uevent_seqnum", &s);
+ if (r) { return seq; }
+ if (!S_ISREG(s.st_mode)) { return seq; }
+ fp = fopen("/sys/kernel/uevent_seqnum", "r");
+ if (fp == NULL) { return seq; }
+ fscanf(fp, "%llu\n", &seq);
+ fclose(fp);
+ return seq;
+}
+
+static int wait_4_udev(unsigned long long start_seq, unsigned long long end_seq)
+{
+ FILE* fp;
+ struct stat s;
+ int r;
+ int ite=30; /* Iterate 30 times. Otherwise, it's considered timed out */
+ unsigned long long seq;
+ /*
+ * len("/dev/.udev/queue/") + len(str(0xffffffffffffffff)) = 38
+ */
+ #define PATH_SIZE 40
+ char filename[PATH_SIZE];
+ #undef PATH_SIZE
+
+ if (start_seq > end_seq || end_seq == 0) return 1;
+
+ /* Wait until end_seq is enqueued into udev */
+ r = stat("/dev/.udev/uevent_seqnum", &s);
+ if (r) { return 1; }
+ if (!S_ISREG(s.st_mode)) { return 1; }
+ while (ite-- > 0) {
+ fp = fopen("/dev/.udev/uevent_seqnum", "r");
+ if (fp == NULL) { return 1; }
+ fscanf(fp, "%llu\n", &seq);
+ fclose(fp);
+ if (seq >= end_seq) { break; }
+ usleep(200000);
+ }
+ if (ite <=0 ) return 1;
+
+ /* Loop to make sure all $seq are unlinked in /dev/.udev/queue then */
+ for (seq = start_seq; seq <= end_seq; seq++) {
+ ite = 30;
+ while (ite-- > 0) {
+ snprintf(filename, sizeof(filename), "/dev/.udev/queue/%llu", seq);
+ r = open(filename, O_RDONLY);
+ if (r == -1 && errno == ENOENT) break;
+ if (r >= 0) close(r);
+ usleep(200000);
+ }
+ if (ite <=0 ) return 1;
+ }
+ return 0;
+}
+
static void *_align(void *ptr, unsigned int a)
{
register unsigned long agn = --a;
@@ -679,6 +740,7 @@
{
struct dm_ioctl_v1 *dmi;
unsigned int command;
+ unsigned long long before_seq, after_seq;
dmi = _flatten_v1(dmt);
if (!dmi) {
@@ -705,6 +767,8 @@
dmi->name, dmi->uuid, dmt->newname ? " " : "",
dmt->newname ? dmt->newname : "",
dmi->data_size);
+
+ before_seq = get_seq();
if (dmt->type == DM_DEVICE_LIST) {
if (!_dm_names_v1(dmi))
goto bad;
@@ -724,10 +788,13 @@
#else /* Userspace alternative for testing */
#endif
+ after_seq = get_seq();
if (dmi->flags & DM_BUFFER_FULL_FLAG)
/* FIXME Increase buffer size and retry operation (if query) */
log_error("WARNING: libdevmapper buffer too small for data");
+ wait_4_udev(before_seq, after_seq);
+
switch (dmt->type) {
case DM_DEVICE_CREATE:
add_dev_node(dmt->dev_name, MAJOR(dmi->dev), MINOR(dmi->dev),
@@ -1706,6 +1773,7 @@
{
struct dm_ioctl *dmi;
unsigned command;
+ unsigned long long before_seq, after_seq;
#ifdef DM_COMPAT
if (_dm_version == 1)
@@ -1736,9 +1804,11 @@
return 0;
repeat_ioctl:
+ before_seq = get_seq();
if (!(dmi = _do_dm_ioctl(dmt, command, _ioctl_buffer_double_factor)))
return 0;
+ after_seq = get_seq();
if (dmi->flags & DM_BUFFER_FULL_FLAG) {
switch (dmt->type) {
case DM_DEVICE_LIST_VERSIONS:
@@ -1755,6 +1825,8 @@
}
}
+ wait_4_udev(before_seq, after_seq);
+
switch (dmt->type) {
case DM_DEVICE_CREATE:
if (dmt->dev_name && *dmt->dev_name)

View File

@@ -1,3 +1,148 @@
-------------------------------------------------------------------
Thu Sep 27 01:08:44 UTC 2012 - nfbrown@suse.com
- mkinitrd-devmapper-*: tidy up dm_modules handling.
It is confusing that 'save_var' isn't called on it,
so call it.
As these modules need to be in initrd, but not
forcibly loaded, they could be listed as
'udevmodules'.
Also filter out 'snapshot-origin' - a table without
a module. (bnc#779965)
-------------------------------------------------------------------
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

View File

@@ -1,7 +1,7 @@
#
# spec file for package device-mapper (Version 1.02.31)
# spec file for package device-mapper
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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
@@ -16,64 +16,43 @@
#
Name: device-mapper
License: GPL v2 or later; LGPL v2.1 or later
Group: System/Base
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: device-mapper-64bit
%endif
#
Version: 1.02.31
Release: 2
Version: 1.02.63
Release: 0
Summary: Device Mapper Tools
Source: LVM2.2.02.45.tar.bz2
License: GPL-2.0+ ; LGPL-2.1+
Group: System/Base
Source: LVM2.2.02.84.tgz
Source1: boot.device-mapper
Source2: mkinitrd-setup.sh
Source3: mkinitrd-boot.sh
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
Patch10: lvm-no_chown.diff
Patch11: cmdline_large_minor.diff
Patch12: enable-clvmd.patch
Patch13: pipe_buff-definition.diff
Patch14: lvm-pv-create-link.diff
#Patch15: dmeventd-link-libcmd.diff
Patch16: clvmd-openais-use-dlm.diff
Patch17: bug-486952_clvmd-check-returncode-of-dlmrelease.diff
Patch18: sigterm_in_main_thread.diff
Patch19: dont_ignore_tmp_device_file.diff
Patch20: support-drbd-filter.diff
Patch21: call_cpg_leave_before_shutdown.diff
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
Patch63: device-mapper-static.diff
Patch64: device-mapper-wait_udev.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.
Authors:
--------
Joe Thornber <thornber@sistina.com>
%package devel
License: GPL v2 or later; LGPL v2.1 or later
Summary: Development package for the device mapper
Group: System/Base
Requires: %name = %version
@@ -81,61 +60,42 @@ Requires: %name = %version
%description devel
Files needed for software development using the device mapper
Authors:
--------
Joe Thornber <thornber@sistina.com>
%prep
%setup -n LVM2.2.02.45
%patch
%patch2
%patch3
%patch4
%patch5
%patch6
%patch10
%patch11
%patch12
%patch13
%patch14 -p1
#%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%setup -n LVM2.2.02.84
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -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 --sbindir=/sbin --enable-dmeventd \
%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-pkgconfig
make %{?jobs:-j %jobs}
--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
rm $RPM_BUILD_ROOT/%_lib/libdevmapper-event-lvm2mirror.so
rm $RPM_BUILD_ROOT/%_lib/libdevmapper-event-lvm2mirror.so.2.02
rm $RPM_BUILD_ROOT/%_lib/libdevmapper-event-lvm2snapshot.so
rm $RPM_BUILD_ROOT/%_lib/libdevmapper-event-lvm2snapshot.so.2.02
#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
@@ -146,7 +106,7 @@ install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dm.sh
%post
%{run_ldconfig}
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{fillup_and_insserv -y boot.device-mapper}
%{insserv_cleanup}
%postun
%{run_ldconfig}
@@ -159,10 +119,17 @@ install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dm.sh
%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
@@ -178,259 +145,3 @@ install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dm.sh
/usr/include/libdevmapper-event.h
%changelog
* Mon May 11 2009 xwhu@suse.de
- Enable pkgconfig for GNOME 2.28
* Mon Apr 27 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 2009 xwhu@suse.de
- bnc#479104, export additional information
* Tue Feb 03 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 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
(bnc#437293)
* Wed Nov 05 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 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Fri Sep 12 2008 xwhu@suse.de
- Fix typo for correct compiling
- Timeout if udevd's not running (bnc#425436)
* Wed Sep 10 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.
* Wed Sep 03 2008 hare@suse.de
- Call mkinitrd_setup during %%post and %%postun (bnc#413709)
* Mon Aug 25 2008 prusnak@suse.cz
- enabled SELinux support [Fate#303662]
* Fri Aug 22 2008 xwhu@suse.de
- Remove the -p option for fillup_and_insserv
* Tue Aug 12 2008 xwhu@suse.de
- Add Should-Stop to boot.device-mapper
* Wed Jul 23 2008 hare@suse.de
- Include mkinitrd scriptlets.
* Wed Jul 16 2008 xwhu@suse.de
- repack device-mapper.1.02.26.tar.bz2 into bzip2.
- change the owner of device to root:disk, with permission
0640 (bnc#407952)
* Mon Jun 23 2008 xwhu@suse.de
- update to new version 1.02.26
Initialise params buffer to empty string in _emit_segment.
Skip add_dev_node when ioctls disabled.
Make dm_hash_iter safe against deletion.
Accept a NULL pointer to dm_free silently.
Add tables_loaded, readonly and suspended columns to reports.
Add --nameprefixes to dmsetup.
Add field name prefix option to reporting functions.
Calculate string size within dm_pool_grow_object.
Remove redundant if-before-free tests.
Use log_warn for reporting field help text instead of log_print.
Change cluster mirror log type name (s/clustered_/clustered-/)
* Fri May 30 2008 xwhu@suse.de
- Hold on mknod until udev finish it's job.
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
for multilib support
* Wed Feb 27 2008 dmueller@suse.de
- fix static library installation again
* Tue Feb 26 2008 dmueller@suse.de
- fix "binary contains trace of $RPM_BUILD_ROOT" failure
* Thu Feb 07 2008 hare@suse.de
- Enable dmeventd (FATE#303381)
* Thu Jan 31 2008 fehr@suse.de
- update to new version 1.02.24
Fix deptree to pass new name to _resume_node after a rename.
Suppress other node operations if node is deleted.
Report error when empty device name passed to readahead functions.
* Mon Dec 10 2007 fehr@suse.de
- update to new version 1.02.23
Add readahead support to libdevmapper and dmsetup.
Fix double free in a libdevmapper-event error path.
Allow a DM_DEV_DIR environment variable to override /dev.
* Thu Nov 22 2007 fehr@suse.de
- update to new version 1.02.22
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
Fix dmsetup -o devno string termination.
Fix default dmsetup report buffering and add --unbuffered.
Add tree-based and dependency fields to dmsetup reports.
* Mon May 07 2007 kay.sievers@suse.de
- update to new version 1.02.19
Avoid trailing separator in reports when there are hidden sort fields.
Fix segfault in 'dmsetup status' without --showkeys against crypt target.
Migrate dmsetup column-based output over to new libdevmapper report framework.
Add descriptions to reporting field definitions.
Add basic reporting functions to libdevmapper.
- remove dmsetup option patch (upstream provides it)
- add dmsetup export command
* Sun Feb 11 2007 ro@suse.de
- fix build as non-root
* Tue Jan 16 2007 fehr@suse.de
- remove superfluouus /lib/libdevmapper.so (#235359)
- add call to ldconfig (#235359)
* Wed Dec 06 2006 fehr@suse.de
- update to new version 1.02.13
Update dmsetup man page (setgeometry & message).
Fix dmsetup free after getline with debug.
Suppress encryption key in 'dmsetup table' output unless --showkeys supplied.
* Mon Oct 16 2006 fehr@suse.de
- update to new version 1.02.12
Avoid deptree attempting to suspend a device that's already suspended.
Add suspend noflush support.
Add basic dmsetup loop support.
Switch dmsetup to use dm_malloc and dm_free.
* Wed Sep 20 2006 fehr@suse.de
- update to new version 1.02.10
Add dm_snprintf(), dm_split_words() and dm_split_lvm_name() to libdevmapper.
Reorder mm bounds_check code to reduce window for a dmeventd race.
* Thu Sep 14 2006 mkoenig@suse.de
- fixed permissions for static lib
- removed static lib version extension
* Tue Sep 12 2006 hvogel@suse.de
- split device-mapper-devel subpackage
- install static libs (needed to link cryptsetup from
util-linux-crypto static)
* Wed Aug 30 2006 hare@suse.de
- Fix gcc warnings
- Fix field display for 'dmsetup info'.
* Wed Aug 30 2006 hare@suse.de
- Add 'major', 'minor', and 'uuid' as valid fields for
'dmsetup info -o XXX'.
* Wed Aug 16 2006 fehr@suse.de
- update to new version 1.02.09
Add --table argument to dmsetup for a one-line table.
Abort if errors are found during cmdline option processing.
Add lockfs indicator to debug output.
* Wed Jul 26 2006 fehr@suse.de
- update to new version 1.02.08
Update dmsetup man page.
Add --force to dmsetup remove* to load error target.
dmsetup remove_all also performs mknodes.
Don't suppress identical table reloads if permission changes.
Fix corelog segment line.
* Mon May 22 2006 fehr@suse.de
- update to new version 1.02.07
Add DM_CORELOG flag to dm_tree_node_add_mirror_target().
Avoid a dmeventd compiler warning.
- update to new version 1.02.06
Move DEFS into configure.h.
Fix leaks in error paths found by coverity.
Remove dmsetup line buffer limitation.
* Thu Apr 20 2006 fehr@suse.de
- update to new version 1.02.05
Separate install_include target in makefiles.
Separate out DEFS from CFLAGS.
Support pkg-config.
Check for libsepol.
* Wed Apr 19 2006 fehr@suse.de
- update to new version 1.02.04
Bring dmsetup man page up-to-date.
Use name-based device refs if kernel doesn't support device number refs.
Fix memory leak (struct dm_ioctl) when struct dm_task is reused.
If _create_and_load_v4 fails part way through, revert the creation.
dmeventd thread/fifo fixes.
Add file & line to dm_strdup_aux().
Add setgeometry.
* Tue Mar 14 2006 fehr@suse.de
- update to new version 1.02.03
Add exported functions to set uid, gid and mode.
Rename _log to dm_log and export.
Add dm_tree_skip_lockfs.
Fix dm_strdup debug definition.
Fix hash function to avoid using a negative array offset.
Don't inline _find in hash.c and tidy signed/unsigned etc.
Fix libdevmapper.h #endif.
Fix dmsetup version driver version.
Add sync, nosync and block_on_error mirror log parameters.
Add hweight32.
Fix dmeventd build.
* Thu Mar 02 2006 hare@suse.de
- Do not call devmap_mknod.sh (#150818)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 24 2006 fehr@suse.de
- fix exit code of "dmsetup version" (#144794)
* Mon Jan 23 2006 fehr@suse.de
- add boot.udev to Required-Start section of init script (#144586)
* Tue Dec 06 2005 fehr@suse.de
- update to new version 1.02.02
* Tue Sep 27 2005 fehr@suse.de
- update to new version 1.01.05
* Wed Sep 21 2005 fehr@suse.de
- increase ioctl buffer size from 16k to 256k to allow larger number
of dm device visible by "dmsetup ls" and "dmsetup table"
* Wed Aug 03 2005 fehr@suse.de
- update to new version 1.01.04
* Thu Jun 30 2005 meissner@suse.de
- use RPM_OPT_FLAGS.
* Tue Jun 14 2005 fehr@suse.de
- update to new version 1.01.03
* Wed May 18 2005 fehr@suse.de
- update to new version 1.01.02
* Mon Apr 11 2005 fehr@suse.de
- use -py instead of -pY as option for fillup_and_insserv (#76689)
- update to new version 1.01.01
* Tue Jan 18 2005 fehr@suse.de
- update to new version 1.01.00
* Tue Jan 11 2005 fehr@suse.de
- update to new version 1.00.21
* Thu Aug 26 2004 fehr@suse.de
- /dev/mapper directory is now part of devs.rpm (#44258)
* Wed Jul 14 2004 fehr@suse.de
- update to new version 1.00.19
* Thu May 27 2004 fehr@suse.de
- do not unload dm modules on shutdown, this hangs on some machines
* Sat Apr 10 2004 aj@suse.de
- devicemapper does not need 2.6 kernelsources.
* Thu Apr 01 2004 fehr@suse.de
- update to new version 1.00.09
* Tue Mar 16 2004 fehr@suse.de
- fix typo in start script (#36168)
* Mon Mar 15 2004 fehr@suse.de
- do not depend on existence of /dev/mapper dir (#35825)
* Mon Mar 01 2004 ro@suse.de
- remove root-fsck stuff in bootscript
- instead depend on boot.rootfsck
* Fri Dec 05 2003 fehr@suse.de
- update to new version 1.00.07
* Mon Nov 17 2003 odabrunz@suse.de
- fix spec file to make it compile with both new and old glibc
(__kernel_dev_t)
* Thu Oct 02 2003 fehr@suse.de
- add fix to make it compile with new glibc (use __kernel_old_dev_t)
* Thu Sep 18 2003 fehr@suse.de
- fix boot.devicemapper to cope with LABEL= and UUID= in /etc/fstab
also check reiser filesystem (#31060)
* Wed Sep 17 2003 fehr@suse.de
- add comment when remounting root fs read-only (#31060)
* Tue Sep 16 2003 kukuk@suse.de
- Add missing PreRequires [Bug #31006]
* Tue Sep 02 2003 fehr@suse.de
- update to version 1.00.05
* Mon Aug 25 2003 fehr@suse.de
- update to version 1.00.04
* Thu Aug 21 2003 fehr@suse.de
- update to version 1.00.03
* Mon Aug 18 2003 garloff@suse.de
- (#29083) Add # X-UnitedLinux-Should-Start: boot.scsidev
* Fri Jul 25 2003 fehr@suse.de
- update to version 1.00.02
* Tue Jul 01 2003 fehr@suse.de
- add boot script for automated startup in system
- fix typos in boot script
* Mon Jun 30 2003 fehr@suse.de
- created initial version of a SuSE package

View File

@@ -1,8 +1,8 @@
Index: LVM2.2.02.39/lib/device/dev-cache.c
Index: LVM2.2.02.58/lib/device/dev-cache.c
===================================================================
--- LVM2.2.02.39.orig/lib/device/dev-cache.c 2008-05-29 06:27:47.000000000 +0800
+++ LVM2.2.02.39/lib/device/dev-cache.c 2009-03-16 23:14:49.000000000 +0800
@@ -356,7 +356,11 @@
--- LVM2.2.02.58.orig/lib/device/dev-cache.c 2009-07-16 04:02:46.000000000 +0800
+++ LVM2.2.02.58/lib/device/dev-cache.c 2010-02-04 15:32:59.000000000 +0800
@@ -358,7 +358,11 @@
dirent_count = scandir(dir, &dirent, NULL, alphasort);
if (dirent_count > 0) {
for (n = 0; n < dirent_count; n++) {
@@ -11,7 +11,7 @@ Index: LVM2.2.02.39/lib/device/dev-cache.c
+ free(dirent[n]);
+ continue;
+ }
+ if (dirent[0]->d_name[0] == '.' && dirent[n]->d_name[1] == '.' && dirent[n]->d_name[2] == '\0') {
+ if (dirent[n]->d_name[0] == '.' && dirent[n]->d_name[1] == '.' && dirent[n]->d_name[2] == '\0') {
free(dirent[n]);
continue;
}

View File

@@ -1,65 +0,0 @@
--- daemons/clvmd/clvmd.c
+++ daemons/clvmd/clvmd.c
@@ -37,7 +37,7 @@
#include <syslog.h>
#include <errno.h>
#include <limits.h>
-#include <libdlm.h>
+//#include <libdlm.h>
#include "clvmd-comms.h"
#include "lvm-functions.h"
--- daemons/clvmd/clvmd-command.c
+++ daemons/clvmd/clvmd-command.c
@@ -65,7 +65,7 @@
#include <unistd.h>
#include <errno.h>
#include <libdevmapper.h>
-#include <libdlm.h>
+//#include <libdlm.h>
#include "list.h"
#include "locking.h"
--- daemons/clvmd/clvm.h
+++ daemons/clvmd/clvm.h
@@ -68,4 +68,29 @@
#define CLVMD_CMD_GET_CLUSTERNAME 41
#define CLVMD_CMD_SET_DEBUG 42
#define CLVMD_CMD_VG_BACKUP 43
+
+/* Lock modes: */
+#define LKM_NLMODE 0 /* null lock */
+#define LKM_CRMODE 1 /* concurrent read */
+#define LKM_CWMODE 2 /* concurrent write */
+#define LKM_PRMODE 3 /* protected read */
+#define LKM_PWMODE 4 /* protected write */
+#define LKM_EXMODE 5 /* exclusive */
+/* Locking flags - these match the ones
+ * in dlm.h
+ */
+#define LKF_NOQUEUE (0x00000001)
+#define LKF_CANCEL (0x00000002)
+#define LKF_CONVERT (0x00000004)
+#define LKF_VALBLK (0x00000008)
+#define LKF_QUECVT (0x00000010)
+#define LKF_IVVALBLK (0x00000020)
+#define LKF_CONVDEADLK (0x00000040)
+#define LKF_PERSISTENT (0x00000080)
+#define LKF_NODLCKWT (0x00000100)
+#define LKF_NODLCKBLK (0x00000200)
+#define LKF_EXPEDITE (0x00000400)
+#define LKF_NOQUEUEBAST (0x00000800)
+#define LKF_HEADQUE (0x00001000)
+#define LKF_NOORDER (0x00002000)
#endif
--- daemons/clvmd/lvm-functions.c
+++ daemons/clvmd/lvm-functions.c
@@ -31,7 +31,7 @@
#include <syslog.h>
#include <assert.h>
#include <libdevmapper.h>
-#include <libdlm.h>
+//#include <libdlm.h>
#include "list.h"
#include "lvm-types.h"

15
handle_extended_devt.diff Normal file
View File

@@ -0,0 +1,15 @@
Index: LVM2.2.02.45/lib/filters/filter.c
===================================================================
--- LVM2.2.02.45.orig/lib/filters/filter.c
+++ LVM2.2.02.45/lib/filters/filter.c
@@ -179,6 +179,10 @@ static int _scan_proc_dev(const char *pr
/* All types unrecognised initially */
memset(_max_partitions_by_major, 0, sizeof(int) * NUMBER_OF_MAJORS);
+ /* Extended devt will use MAJOR 259
+ Consider it an non-partitionable block device */
+ _max_partitions_by_major[259] = 1;
+
if (dm_snprintf(proc_devices, sizeof(proc_devices),
"%s/devices", proc) < 0) {
log_error("Failed to create /proc/devices string");

View File

@@ -1,7 +1,7 @@
Index: lib/filters/filter.c
===================================================================
--- lib/filters/filter.c.orig 2009-04-27 16:15:37.000000000 +0800
+++ lib/filters/filter.c 2009-04-27 16:15:39.000000000 +0800
--- lib/filters/filter.c.orig 2011-01-27 08:21:37.000000000 +0800
+++ lib/filters/filter.c 2011-02-15 14:56:43.000000000 +0800
@@ -13,6 +13,12 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -15,17 +15,16 @@ Index: lib/filters/filter.c
#include "lib.h"
#include "dev-cache.h"
#include "filter.h"
@@ -103,11 +109,18 @@
@@ -147,11 +153,18 @@
}
/* Check it's accessible */
- if (!dev_open_flags(dev, O_RDONLY, 0, 1)) {
+ if (!dev_open_flags(dev, O_RDONLY|O_NONBLOCK, 0, 1)) {
- if (!dev_open_flags(dev, O_RDONLY, 1, 1)) {
+ if (!dev_open_flags(dev, O_RDONLY|O_NONBLOCK, 1, 1)) {
log_debug("%s: Skipping: open failed", name);
return 0;
}
-
+
+ /* Skip cdrom device */
+ #define CDROM_GET_CAPABILITY 0x5331
+ if (ioctl(dev->fd, CDROM_GET_CAPABILITY) >= 0) {

View File

@@ -1,303 +0,0 @@
Index: daemons/clvmd/Makefile.in
===================================================================
--- daemons/clvmd/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ daemons/clvmd/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -107,7 +107,7 @@
.PHONY: install_clvmd
install_clvmd: $(TARGETS)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) clvmd \
+ $(INSTALL) -D -m 555 $(STRIP) clvmd \
$(usrsbindir)/clvmd
install: $(INSTALL_TARGETS)
Index: doc/Makefile.in
===================================================================
--- doc/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ doc/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -23,7 +23,7 @@
install:
@if [ ! -e $(confdir)/$(CONFDEST) ]; then \
echo "Installing $(CONFSRC) as $(confdir)/$(CONFDEST)"; \
- @INSTALL@ -D $(OWNER) $(GROUP) -m 644 $(CONFSRC) \
+ @INSTALL@ -D -m 644 $(CONFSRC) \
$(confdir)/$(CONFDEST); \
fi
Index: lib/format1/Makefile.in
===================================================================
--- lib/format1/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ lib/format1/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -31,7 +31,7 @@
include $(top_srcdir)/make.tmpl
install: liblvm2format1.so
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/liblvm2format1.so.$(LIB_VERSION)
$(LN_S) -f liblvm2format1.so.$(LIB_VERSION) $(libdir)/liblvm2format1.so
Index: lib/format_pool/Makefile.in
===================================================================
--- lib/format_pool/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ lib/format_pool/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -28,7 +28,7 @@
include $(top_srcdir)/make.tmpl
install: liblvm2formatpool.so
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/liblvm2formatpool.so.$(LIB_VERSION)
$(LN_S) -f liblvm2formatpool.so.$(LIB_VERSION) \
$(libdir)/liblvm2formatpool.so
Index: lib/locking/Makefile.in
===================================================================
--- lib/locking/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ lib/locking/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -24,7 +24,7 @@
include $(top_srcdir)/make.tmpl
install install_cluster: liblvm2clusterlock.so
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/liblvm2clusterlock.so.$(LIB_VERSION)
$(LN_S) -f liblvm2clusterlock.so.$(LIB_VERSION) \
$(libdir)/liblvm2clusterlock.so
Index: lib/mirror/Makefile.in
===================================================================
--- lib/mirror/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ lib/mirror/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -24,7 +24,7 @@
include $(top_srcdir)/make.tmpl
install: liblvm2mirror.so
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/liblvm2mirror.so.$(LIB_VERSION)
$(LN_S) -f liblvm2mirror.so.$(LIB_VERSION) $(libdir)/liblvm2mirror.so
Index: lib/snapshot/Makefile.in
===================================================================
--- lib/snapshot/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ lib/snapshot/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -24,7 +24,7 @@
include $(top_srcdir)/make.tmpl
install: liblvm2snapshot.so
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/liblvm2snapshot.so.$(LIB_VERSION)
$(LN_S) -f liblvm2snapshot.so.$(LIB_VERSION) \
$(libdir)/liblvm2snapshot.so
Index: man/Makefile.in
===================================================================
--- man/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ man/Makefile.in 2009-04-27 16:52:20.000000000 +0800
@@ -62,14 +62,14 @@
@for f in $(MAN8); \
do \
$(RM) $(MAN8DIR)/$$f; \
- @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \
+ @INSTALL@ -D -m 444 $$f $(MAN8DIR)/$$f; \
done
@echo "Installing $(MAN5) in $(MAN5DIR)"
@for f in $(MAN5); \
do \
$(RM) $(MAN5DIR)/$$f; \
- @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN5DIR)/$$f; \
+ @INSTALL@ -D -m 444 $$f $(MAN5DIR)/$$f; \
done
install_cluster:
@@ -77,7 +77,7 @@
@for f in $(MAN8CLUSTER); \
do \
$(RM) $(MAN8DIR)/$$f; \
- @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \
+ @INSTALL@ -D -m 444 $$f $(MAN8DIR)/$$f; \
done
install_device-mapper:
@@ -85,5 +85,5 @@
@for f in $(MAN8DM); \
do \
$(RM) $(MAN8DIR)/$$f; \
- @INSTALL@ -D $(OWNER) $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \
+ @INSTALL@ -D -m 444 $$f $(MAN8DIR)/$$f; \
done
Index: po/Makefile.in
===================================================================
--- po/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ po/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -53,13 +53,13 @@
@echo Installing translation files in $(localedir)
@( \
for lang in $(LANGS); do \
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \
+ $(INSTALL) -D -m 444 $$lang.mo \
$(localedir)/$$lang/LC_MESSAGES/lvm2.mo;\
done; \
)
@( \
for lang in $(LANGS); do \
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \
+ $(INSTALL) -D -m 444 $$lang.mo \
$(localedir)/$$lang/LC_MESSAGES/device-mapper.mo;\
done; \
)
Index: scripts/Makefile.in
===================================================================
--- scripts/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ scripts/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -18,9 +18,9 @@
include $(top_srcdir)/make.tmpl
install:
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) lvm_dump.sh \
+ $(INSTALL) -D -m 555 $(STRIP) lvm_dump.sh \
$(sbindir)/lvmdump
ifeq ("@FSADM@", "yes")
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) fsadm.sh \
+ $(INSTALL) -D -m 555 $(STRIP) fsadm.sh \
$(sbindir)/fsadm
endif
Index: tools/Makefile.in
===================================================================
--- tools/Makefile.in.orig 2009-04-27 16:51:29.000000000 +0800
+++ tools/Makefile.in 2009-04-27 16:51:32.000000000 +0800
@@ -156,21 +156,21 @@
endif
install_cmdlib_dynamic: liblvm2cmd.$(LIB_SUFFIX)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) liblvm2cmd.$(LIB_SUFFIX) \
+ $(INSTALL) -D -m 555 $(STRIP) liblvm2cmd.$(LIB_SUFFIX) \
$(libdir)/liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION_LVM)
$(LN_S) -f liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION_LVM) $(libdir)/liblvm2cmd.$(LIB_SUFFIX)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 lvm2cmd.h \
+ $(INSTALL) -D -m 444 lvm2cmd.h \
$(includedir)/lvm2cmd.h
install_cmdlib_static: liblvm2cmd-static.a
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) liblvm2cmd-static.a \
+ $(INSTALL) -D -m 555 $(STRIP) liblvm2cmd-static.a \
$(libdir)/liblvm2cmd.a.$(LIB_VERSION_LVM)
$(LN_S) -f liblvm2cmd.a.$(LIB_VERSION_LVM) $(libdir)/liblvm2cmd.a
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 lvm2cmd.h \
+ $(INSTALL) -D -m 444 lvm2cmd.h \
$(includedir)/lvm2cmd.h
install_tools_dynamic: lvm .commands
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) lvm \
+ $(INSTALL) -D -m 555 $(STRIP) lvm \
$(sbindir)/lvm
@echo Creating symbolic links for individual commands in $(sbindir)
@( \
@@ -181,14 +181,14 @@
)
install_tools_static: lvm.static
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) lvm.static \
+ $(INSTALL) -D -m 555 $(STRIP) lvm.static \
$(staticdir)/lvm.static
install_dmsetup_dynamic: dmsetup
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$<
+ $(INSTALL) -D -m 555 $(STRIP) $< $(sbindir)/$<
install_dmsetup_static: dmsetup.static
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$<
+ $(INSTALL) -D -m 555 $(STRIP) $< $(sbindir)/$<
install_device-mapper: $(INSTALL_DMSETUP_TARGETS)
Index: daemons/dmeventd/Makefile.in
===================================================================
--- daemons/dmeventd/Makefile.in.orig 2008-11-05 01:25:32.000000000 +0800
+++ daemons/dmeventd/Makefile.in 2009-04-27 16:57:01.000000000 +0800
@@ -64,24 +64,24 @@
install_device-mapper: install
install_include:
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper-event.h \
+ $(INSTALL) -D -m 444 libdevmapper-event.h \
$(includedir)/libdevmapper-event.h
install_dynamic: libdevmapper-event.$(LIB_SUFFIX)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/libdevmapper-event.$(LIB_SUFFIX).$(LIB_VERSION)
$(LN_S) -f libdevmapper-event.$(LIB_SUFFIX).$(LIB_VERSION) \
$(libdir)/libdevmapper-event.$(LIB_SUFFIX)
install_dmeventd: dmeventd
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$<
+ $(INSTALL) -D -m 555 $(STRIP) $< $(sbindir)/$<
install_pkgconfig:
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper-event.pc \
+ $(INSTALL) -D -m 444 libdevmapper-event.pc \
$(usrlibdir)/pkgconfig/devmapper-event.pc
install_static: libdevmapper-event.a
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/libdevmapper-event.a.$(LIB_VERSION)
$(LN_S) -f libdevmapper-event.a.$(LIB_VERSION) $(libdir)/libdevmapper-event.a
Index: daemons/dmeventd/plugins/mirror/Makefile.in
===================================================================
--- daemons/dmeventd/plugins/mirror/Makefile.in.orig 2008-11-04 06:14:26.000000000 +0800
+++ daemons/dmeventd/plugins/mirror/Makefile.in 2009-04-27 16:55:45.000000000 +0800
@@ -32,6 +32,6 @@
include $(top_srcdir)/make.tmpl
install: libdevmapper-event-lvm2mirror.$(LIB_SUFFIX)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/$<.$(LIB_VERSION)
$(LN_S) -f $<.$(LIB_VERSION) $(libdir)/$<
Index: daemons/dmeventd/plugins/snapshot/Makefile.in
===================================================================
--- daemons/dmeventd/plugins/snapshot/Makefile.in.orig 2008-11-04 06:14:27.000000000 +0800
+++ daemons/dmeventd/plugins/snapshot/Makefile.in 2009-04-27 16:56:00.000000000 +0800
@@ -32,6 +32,6 @@
include $(top_srcdir)/make.tmpl
install: libdevmapper-event-lvm2snapshot.$(LIB_SUFFIX)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/$<.$(LIB_VERSION)
$(LN_S) -f $<.$(LIB_VERSION) $(libdir)/$<
Index: libdm/Makefile.in
===================================================================
--- libdm/Makefile.in.orig 2008-11-15 04:59:56.000000000 +0800
+++ libdm/Makefile.in 2009-04-27 16:57:28.000000000 +0800
@@ -70,7 +70,7 @@
install_device-mapper: install
install_include:
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper.h \
+ $(INSTALL) -D -m 444 libdevmapper.h \
$(includedir)/libdevmapper.h
install_dynamic: install_@interface@
@@ -81,15 +81,15 @@
$(LN_S) -f libdevmapper.a.$(LIB_VERSION_DM) $(libdir)/libdevmapper.a
install_ioctl: ioctl/libdevmapper.$(LIB_SUFFIX)
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION_DM)
install_pkgconfig:
- $(INSTALL) -D $(OWNER) $(GROUP) -m 444 libdevmapper.pc \
+ $(INSTALL) -D -m 444 libdevmapper.pc \
$(usrlibdir)/pkgconfig/devmapper.pc
install_ioctl_static: ioctl/libdevmapper.a
- $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \
+ $(INSTALL) -D -m 555 $(STRIP) $< \
$(libdir)/libdevmapper.a.$(LIB_VERSION_DM)
$(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION_DM): $(interface)/%.$(LIB_SUFFIX)

View File

@@ -1,7 +1,7 @@
Index: LVM2.2.02.45/tools/pvremove.c
Index: LVM2.2.02.67/tools/pvremove.c
===================================================================
--- LVM2.2.02.45.orig/tools/pvremove.c 2009-04-27 16:35:32.000000000 +0800
+++ LVM2.2.02.45/tools/pvremove.c 2009-04-27 16:49:48.000000000 +0800
--- LVM2.2.02.67.orig/tools/pvremove.c 2009-12-03 20:18:34.000000000 +0100
+++ LVM2.2.02.67/tools/pvremove.c 2010-09-09 13:51:21.370385527 +0200
@@ -18,6 +18,30 @@
const char _really_wipe[] =
"Really WIPE LABELS from physical volume \"%s\" of volume group \"%s\" [y/n]? ";
@@ -33,7 +33,7 @@ Index: LVM2.2.02.45/tools/pvremove.c
/*
* Decide whether it is "safe" to wipe the labels on this device.
* 0 indicates we may not.
@@ -125,6 +149,8 @@
@@ -125,6 +149,8 @@ static int pvremove_single(struct cmd_co
log_print("Labels on physical volume \"%s\" successfully wiped",
pv_name);
@@ -42,136 +42,10 @@ Index: LVM2.2.02.45/tools/pvremove.c
ret = ECMD_PROCESSED;
error:
Index: LVM2.2.02.45/tools/pvcreate.c
Index: LVM2.2.02.67/tools/pvchange.c
===================================================================
--- LVM2.2.02.45.orig/tools/pvcreate.c 2009-04-27 16:35:32.000000000 +0800
+++ LVM2.2.02.45/tools/pvcreate.c 2009-04-27 16:45:34.000000000 +0800
@@ -36,6 +36,89 @@
const char _really_init[] =
"Really INITIALIZE physical volume \"%s\" of volume group \"%s\" [y/n]? ";
+static const char* pv_follow_if_link (const char* path)
+{
+ int r;
+ int len = 60;
+ char *fpath = NULL;
+ char *npath = NULL;
+ struct stat st;
+
+ r = lstat(path, &st);
+ if (r == -1) return NULL; //shouldn't happen
+
+ if (S_ISLNK(st.st_mode)) {
+ while (1) {
+ npath = realloc(fpath, sizeof(char)*len);
+ if (npath == NULL) {
+ if (fpath != NULL) free(fpath);
+ return NULL;
+ }
+ fpath = npath;
+
+ memset(fpath, 0, sizeof(char)*len);
+ r = readlink(path, fpath, len);
+ if (r != -1 && fpath[len-1] == 0) break;
+ if (r == -1) {
+ free(fpath);
+ return NULL;
+ } else {
+ len = len * 2;
+ }
+ }
+ }
+ else {
+ fpath = strdup(path);
+ }
+ return fpath;
+}
+
+
+static const char* pv_symlink_handle(struct cmd_context* cmd, const char* name, int create)
+{
+ struct physical_volume *pv;
+ char *pvuuid;
+ char *pvuuid_link;
+
+ pvuuid_link = malloc(70);
+ if (pvuuid_link == NULL) return NULL;
+
+ if (!(pv = pv_read(cmd, name, NULL, NULL, 0, 0))) {
+ free(pvuuid_link);
+ return NULL;
+ }
+
+ pvuuid = malloc(sizeof(char)*40);
+ if (pvuuid == NULL) {
+ free(pvuuid_link);
+ return NULL;
+ }
+
+ id_write_format(&pv->id, pvuuid, 40);
+
+ snprintf(pvuuid_link, 70, "/dev/disk/by-id/lvm2-pvuuid-%s", pvuuid);
+
+ //we really don't care if it successed or not.
+ if (create) {
+ const char* tname = NULL;
+ int r;
+ tname = pv_follow_if_link(name);
+ if (tname != NULL) {
+ r = symlink(tname, pvuuid_link);
+ free(tname);
+ }
+ else {
+ symlink(name, pvuuid_link);
+ }
+ } else {
+ //pvuuid_link is saved for future unlink
+ //unlink(pvuuid_link);
+ }
+
+ free(pvuuid);
+ return pvuuid_link;
+}
+
/*
* See if we may pvcreate on this device.
* 0 indicates we may not.
@@ -150,6 +233,8 @@
void *pv;
struct device *dev;
struct dm_list mdas;
+ const char *oldsymlink;
+
if (pp->idp) {
if ((dev = device_from_pvid(cmd, pp->idp)) &&
@@ -213,12 +298,22 @@
log_very_verbose("Writing physical volume data to disk \"%s\"",
pv_name);
+
+ oldsymlink = pv_symlink_handle(cmd, pv_name, 0);
+
if (!(pv_write(cmd, (struct physical_volume *)pv, &mdas,
pp->labelsector))) {
log_error("Failed to write physical volume \"%s\"", pv_name);
+ if (oldsymlink) free(oldsymlink);
goto error;
}
+ pv_symlink_handle(cmd, pv_name, 1);
+ if (oldsymlink) {
+ unlink(oldsymlink);
+ free(oldsymlink);
+ }
+
log_print("Physical volume \"%s\" successfully created", pv_name);
unlock_vg(cmd, VG_ORPHANS);
Index: LVM2.2.02.45/tools/pvchange.c
===================================================================
--- LVM2.2.02.45.orig/tools/pvchange.c 2009-04-27 16:35:32.000000000 +0800
+++ LVM2.2.02.45/tools/pvchange.c 2009-04-27 16:45:18.000000000 +0800
--- LVM2.2.02.67.orig/tools/pvchange.c 2010-05-19 17:34:10.000000000 +0200
+++ LVM2.2.02.67/tools/pvchange.c 2010-09-09 13:51:21.370385527 +0200
@@ -15,6 +15,90 @@
#include "tools.h"
@@ -262,33 +136,126 @@ Index: LVM2.2.02.45/tools/pvchange.c
+
/* FIXME Locking. PVs in VG. */
static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
@@ -202,11 +286,23 @@
return 0;
}
backup(vg);
- } else if (!(pv_write(cmd, pv, NULL, INT64_C(-1)))) {
- unlock_vg(cmd, vg_name);
- log_error("Failed to store physical volume \"%s\"",
- pv_name);
- return 0;
static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg,
Index: LVM2.2.02.67/lib/metadata/metadata.c
===================================================================
--- LVM2.2.02.67.orig/lib/metadata/metadata.c 2010-05-24 17:32:20.000000000 +0200
+++ LVM2.2.02.67/lib/metadata/metadata.c 2010-09-09 13:52:19.866385579 +0200
@@ -1424,6 +1424,88 @@ void pvcreate_params_set_defaults(struct
pp->yes = 0;
}
+static const char* pv_follow_if_link (const char* path)
+{
+ int r;
+ int len = 60;
+ char *fpath = NULL;
+ char *npath = NULL;
+ struct stat st;
+
+ r = lstat(path, &st);
+ if (r == -1) return NULL; //shouldn't happen
+
+ if (S_ISLNK(st.st_mode)) {
+ while (1) {
+ npath = realloc(fpath, sizeof(char)*len);
+ if (npath == NULL) {
+ if (fpath != NULL) free(fpath);
+ return NULL;
+ }
+ fpath = npath;
+
+ memset(fpath, 0, sizeof(char)*len);
+ r = readlink(path, fpath, len);
+ if (r != -1 && fpath[len-1] == 0) break;
+ if (r == -1) {
+ free(fpath);
+ return NULL;
+ } else {
+ len = len * 2;
+ }
+ }
+ } else {
+ const char* oldsymlink;
+ oldsymlink = pv_symlink_handle(cmd, pv_name, 0);
+ fpath = strdup(path);
+ }
+ return fpath;
+}
+
+ if (!(pv_write(cmd, pv, NULL, INT64_C(-1)))) {
+ unlock_vg(cmd, vg_name);
+ log_error("Failed to store physical volume \"%s\"",
+ pv_name);
+ if (oldsymlink) free(oldsymlink);
+ return 0;
+ }
+ pv_symlink_handle(cmd, pv_name, 1);
+ if (oldsymlink) {
+ unlink(oldsymlink);
+ free(oldsymlink);
+ }
+
+static const char* pv_symlink_handle(struct cmd_context* cmd, const char* name, int create)
+{
+ struct physical_volume *pv;
+ char *pvuuid;
+ char *pvuuid_link;
+
+ pvuuid_link = malloc(70);
+ if (pvuuid_link == NULL) return NULL;
+
+ if (!(pv = pv_read(cmd, name, NULL, NULL, 0, 0))) {
+ free(pvuuid_link);
+ return NULL;
+ }
+
+ pvuuid = malloc(sizeof(char)*40);
+ if (pvuuid == NULL) {
+ free(pvuuid_link);
+ return NULL;
+ }
+
+ id_write_format(&pv->id, pvuuid, 40);
+ snprintf(pvuuid_link, 70, "/dev/disk/by-id/lvm2-pvuuid-%s", pvuuid);
+
+ //we really don't care if it successed or not.
+ if (create) {
+ const char* tname = NULL;
+ int r;
+ tname = pv_follow_if_link(name);
+ if (tname != NULL) {
+ r = symlink(tname, pvuuid_link);
+ free(tname);
+ } else {
+ symlink(name, pvuuid_link);
+ }
+ } else {
+ //pvuuid_link is saved for future unlink
+ //unlink(pvuuid_link);
+ }
+
+ free(pvuuid);
+ return pvuuid_link;
+}
+
+
+
/*
* pvcreate_single() - initialize a device with PV label and metadata area
*
@@ -1444,6 +1526,7 @@ struct physical_volume * pvcreate_single
struct dm_list mdas;
struct pvcreate_params default_pp;
char buffer[64] __attribute((aligned(8)));
+ const char *oldsymlink;
pvcreate_params_set_defaults(&default_pp);
if (!pp)
@@ -1509,11 +1592,20 @@ struct physical_volume * pvcreate_single
log_very_verbose("Writing physical volume data to disk \"%s\"",
pv_name);
+ oldsymlink = pv_symlink_handle(cmd, pv_name, 0);
+
if (!(pv_write(cmd, pv, &mdas, pp->labelsector))) {
log_error("Failed to write physical volume \"%s\"", pv_name);
+ if (oldsymlink) free(oldsymlink);
goto error;
}
unlock_vg(cmd, vg_name);
+ pv_symlink_handle(cmd, pv_name, 1);
+ if (oldsymlink) {
+ unlink(oldsymlink);
+ free(oldsymlink);
+ }
+
log_print("Physical volume \"%s\" successfully created", pv_name);
return pv;

View File

@@ -241,6 +241,8 @@ activation {
# "@*" matches if any tag defined on the host is also set in the LV or VG
#
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
udev_rules = 1
udev_sync = 1
}

View File

@@ -1,3 +1,58 @@
-------------------------------------------------------------------
Thu Sep 27 01:12:17 UTC 2012 - nfbrown@suse.com
- lvm2-clvm.spec: make sure MODPROBE_CMD is set properly
when configure is run. Without it, modules are
not auto-loaded. Also fix problem with LDFLAGS (bnc#779965)
-------------------------------------------------------------------
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

View File

@@ -1,7 +1,7 @@
#
# spec file for package lvm2-clvm (Version 2.02.45)
# spec file for package lvm2-clvm
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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
@@ -19,23 +19,28 @@
Url: http://sources.redhat.com/cluster/clvm/
Name: lvm2-clvm
BuildRequires: device-mapper-devel libdlm-devel libopenais-devel readline-devel
BuildRequires: device-mapper-devel
BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel
BuildRequires: libopenais-devel
BuildRequires: libselinux-devel
License: GPL v2 or later; LGPL v2.1 or later
Group: System/Base
Version: 2.02.45
Release: 2
Requires: device-mapper >= 1.02.25 lvm2 = %{version} openais
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
AutoReqProv: on
Summary: Clustered LVM2
Source: LVM2.%{version}.tar.bz2
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-setup.sh
Source5: mkinitrd-boot.sh
Source4: mkinitrd-lvm2-setup.sh
Source5: mkinitrd-lvm2-boot.sh
Source6: 64-lvm2.rules
Source7: collect_lvm
Source8: clvmd.ocf
@@ -43,20 +48,13 @@ 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
Patch10: lvm-no_chown.diff
Patch11: cmdline_large_minor.diff
Patch12: enable-clvmd.patch
Patch13: pipe_buff-definition.diff
Patch14: lvm-pv-create-link.diff
#Patch15: dmeventd-link-libcmd.diff
Patch16: clvmd-openais-use-dlm.diff
Patch17: bug-486952_clvmd-check-returncode-of-dlmrelease.diff
Patch18: sigterm_in_main_thread.diff
Patch19: dont_ignore_tmp_device_file.diff
Patch20: support-drbd-filter.diff
Patch21: call_cpg_leave_before_shutdown.diff
Patch22: handle_extended_devt.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -70,35 +68,26 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
%patch2
%patch3
%patch4
%patch5
%patch6
%patch10
%patch11
%patch12
%patch13
%patch14 -p1
#%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
#%patch14 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%build
CFLAGS="$RPM_OPT_FLAGS" MODPROBE_CMD=/sbin/modprobe \
LDFLAGS="-L /usr/%_lib/openais" \
./configure --prefix=/ \
--mandir=%{_mandir} \
--includedir=/usr/include \
export MODPROBE_CMD=/sbin/modprobe
export LDFLAGS="-L /usr/%_lib/openais"
%configure --prefix=/ \
--enable-selinux \
--enable-cmdlib \
--libdir=/%_lib --enable-dmeventd --enable-cmdlib \
--with-clvmd=openais
make
--libdir=/%_lib --with-usrlibdir=%_libdir --enable-dmeventd --enable-cmdlib \
--with-clvmd=corosync --datarootdir=/usr/share
make %{?_smp_mflags}
%install
pushd daemons
pushd daemons/clvmd
make install DESTDIR=$RPM_BUILD_ROOT
popd
pushd man
@@ -106,22 +95,15 @@ 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 $RPM_BUILD_ROOT/sbin/dmeventd
rm $RPM_BUILD_ROOT/usr/include/libdevmapper-event.h
rm $RPM_BUILD_ROOT/%{_lib}/libdevmapper-event-lvm2mirror.*
rm $RPM_BUILD_ROOT/%{_lib}/libdevmapper-event-lvm2snapshot.*
rm $RPM_BUILD_ROOT/%{_lib}/libdevmapper-event.*
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
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/sbin/clvmd
@@ -132,34 +114,3 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/clvmd.8.gz
%changelog
* Mon Apr 27 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.
* Wed Apr 01 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 2009 xwhu@suse.de
- Call cpg_leave before shutting down clvmd
* Wed Mar 25 2009 xwhu@suse.de
- Do not filter out tmp device file(bnc#485572)
* Wed Mar 25 2009 xwhu@suse.de
- Newly splitted off from lvm2, as a independent package now

View File

@@ -1,5 +1,146 @@
-------------------------------------------------------------------
Thu Sep 27 01:11:17 UTC 2012 - nfbrown@suse.com
- lvm2.spec: make sure MODPROBE_CMD is set properly
when configure is run. Without it, modules are
not auto-loaded. (bnc#779965)
-------------------------------------------------------------------
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

705
lvm2.spec
View File

@@ -1,7 +1,7 @@
#
# spec file for package lvm2 (Version 2.02.45)
# spec file for package lvm2
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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
@@ -19,24 +19,26 @@
Url: http://sources.redhat.com/cluster/clvm/
Name: lvm2
BuildRequires: device-mapper-devel libdlm-devel libopenais-devel readline-devel
BuildRequires: libselinux-devel
License: GPL v2 or later; LGPL v2.1 or later
Group: System/Base
BuildRequires: libudev-devel
BuildRequires: readline-devel
Requires: device-mapper >= 1.02.25
Provides: lvm
Obsoletes: lvm
PreReq: %fillup_prereq %insserv_prereq
AutoReqProv: on
Version: 2.02.45
Release: 2
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
Source: LVM2.%{version}.tar.bz2
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-setup.sh
Source5: mkinitrd-boot.sh
Source4: mkinitrd-lvm2-setup.sh
Source5: mkinitrd-lvm2-boot.sh
Source6: 64-lvm2.rules
Source7: collect_lvm
Source8: clvmd.ocf
@@ -44,31 +46,31 @@ 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
#Patch5: pvscan_2TB_limit.diff
Patch6: man_page_sectors.diff
Patch10: lvm-no_chown.diff
Patch11: cmdline_large_minor.diff
Patch12: enable-clvmd.patch
Patch13: pipe_buff-definition.diff
Patch14: lvm-pv-create-link.diff
#Patch15: dmeventd-link-libcmd.diff
Patch16: clvmd-openais-use-dlm.diff
Patch17: bug-486952_clvmd-check-returncode-of-dlmrelease.diff
Patch18: sigterm_in_main_thread.diff
Patch19: dont_ignore_tmp_device_file.diff
Patch20: support-drbd-filter.diff
Patch21: call_cpg_leave_before_shutdown.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
Patch63: device-mapper-static.diff
Patch64: device-mapper-wait_udev.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 evms-gui = 2.5.5 evms-devel = 2.5.5 evms-ha = 2.5.5
Obsoletes: evms <= 2.5.5 evms-gui <= 2.5.5 evms-devel <= 2.5.5 evms-ha <= 2.5.5
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
@@ -82,48 +84,43 @@ Volume Manager.
%patch2
%patch3
%patch4
%patch5
#%patch5
%patch6
%patch10
%patch11
%patch12
%patch13
%patch14 -p1
#%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
#%patch14 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
#%patch23 -p1
# patch to device-mapper
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
#%patch63 -p1
%patch65 -p1
#%patch80 -p0
%patch81 -p1
%build
CFLAGS="$RPM_OPT_FLAGS" MODPROBE_CMD=/sbin/modprobe \
LDFLAGS="-L /usr/%_lib/openais" \
./configure --prefix=/ \
--mandir=%{_mandir} \
--includedir=/usr/include \
--enable-selinux \
--enable-cmdlib \
--libdir=/%_lib --enable-dmeventd --enable-cmdlib \
--with-clvmd=openais
make
export 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 DESTDIR=$RPM_BUILD_ROOT
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
rm $RPM_BUILD_ROOT/sbin/clvmd
rm $RPM_BUILD_ROOT/%{_mandir}/man8/clvmd*
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
@@ -132,26 +129,32 @@ 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 -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/%{_lib}/libdevmapper-event.so*
rm $RPM_BUILD_ROOT/%{_lib}/libdevmapper.so*
rm $RPM_BUILD_ROOT/sbin/dmeventd
rm $RPM_BUILD_ROOT/sbin/dmsetup
rm $RPM_BUILD_ROOT/usr/include/libdevmapper-event.h
rm $RPM_BUILD_ROOT/usr/include/libdevmapper.h
rm $RPM_BUILD_ROOT/%{_mandir}/man8/dmsetup.*
rm $RPM_BUILD_ROOT/%{_mandir}/man8/fsadm.*
%clean
rm -rf $RPM_BUILD_ROOT
%post
%{fillup_and_insserv -n lvm -y boot.lvm}
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{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
@@ -159,7 +162,14 @@ rm -rf $RPM_BUILD_ROOT
%postun
%{insserv_cleanup}
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
[ -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
@@ -176,7 +186,8 @@ rm -rf $RPM_BUILD_ROOT
%dir /lib/mkinitrd/scripts
%dir /lib/udev
%dir /lib/udev/rules.d
/lib/udev/rules.d/64-lvm2.rules
#/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
@@ -218,6 +229,7 @@ rm -rf $RPM_BUILD_ROOT
/sbin/vgexport
/sbin/vgextend
/sbin/vgimport
/sbin/vgimportclone
/sbin/vgmerge
/sbin/vgmknodes
/sbin/vgreduce
@@ -226,12 +238,18 @@ rm -rf $RPM_BUILD_ROOT
/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
@@ -267,6 +285,7 @@ rm -rf $RPM_BUILD_ROOT
%{_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
@@ -275,556 +294,8 @@ rm -rf $RPM_BUILD_ROOT
%{_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
* Mon Apr 27 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 2009 xwhu@suse.de
- Handle the case that drbd virtual device has the same PV uuid
with the underlining physical device.
* Wed Mar 25 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 2009 xwhu@suse.de
- Split CLVMD as a independent package
* Tue Mar 24 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 2009 xwhu@suse.de
- add daemon_options parameter to clvmd.ocf
- check EUNLOCK for dlm_ls_unlock_wait
* Wed Feb 25 2009 xwhu@suse.de
- bnc#479422, check both lksb.sb_status and status.
* Fri Feb 20 2009 xwhu@suse.de
- simplify patch of dlm lock to clvmd
* Fri Feb 20 2009 xwhu@suse.de
- bnc#476861, clvmd.ocf doesn't report the correct status when
kill -9 doesn't terminate the process
* Thu Jan 22 2009 xwhu@suse.de
- bnc#464851, use dlm instead of openais lck
* Wed Jan 21 2009 ro@suse.de
- do not require a specific package release from subpackage
(bnc#467704)
* Wed Dec 03 2008 xwhu@suse.de
- Add OCF script for clvmd
* Wed Nov 12 2008 xwhu@suse.de
- bnc#443677. dmeventd DSOs are linked against liblvm2cmd
* Thu Oct 09 2008 xwhu@suse.de
- bnc#432782. Remove vol_id in 64-lvm2.rules.
* Mon Sep 29 2008 ro@suse.de
- buildreq: replace openais-devel by libopenais-devel
* Wed Sep 24 2008 ro@suse.de
- change "udevsettle" to "udevadm settle"
* Sat Sep 13 2008 xwhu@novell.com
- added missing directories to filelist
* Wed Sep 10 2008 xwhu@novell.com
- Upgrade to 2.0.39
Fix up cache for PVs without mdas after consistent VG metadata is processed.
Update validation of safe mirror log type conversions in lvconvert.
Fix lvconvert to disallow snapshot and mirror combinations.
Fix reporting of LV fields alongside unallocated PV segments.
Add --unquoted and --rows to reporting tools.
Avoid undefined return value after _memlock manipulation in lvm2_run.
Avoid link failure if configured without --enable-cmdlib or --enable-readline.
Make clvmd return at once if other nodes down in a gulm or openais cluster.
Fix and improve readahead 'auto' calculation for stripe_size.
Fix lvchange output for -r auto setting if auto is already set.
Fix ambiguous use of identifier error_message_produced.
Fix add_mirror_images not to dereference uninitialized log_lv upon failure.
Don't call openlog for every debug line output by clvmd.
Add --force to lvextend and lvresize.
Fix vgchange to not activate mirror leg and log volumes directly.
Fix test directory clean up in make distclean.
- pvcreate/pvremove/pvchange will create symlinks in /dev/disk/by-id/
to the device file
* Wed Sep 03 2008 hare@suse.de
- Call mkinitrd_setup during %%post and %%postun (bnc#413709)
* Tue Sep 02 2008 hare@suse.de
- Fix initrd scripts if no 'root=' parameter is given
(bnc#421546)
* Mon Aug 25 2008 aj@suse.de
- Provide and obsolete evms.
* Mon Aug 25 2008 prusnak@suse.cz
- enabled SELinux support [Fate#303662]
* Fri Aug 22 2008 xwhu@suse.de
- Remove the -p option for fillup_and_insserv
* Tue Aug 12 2008 xwhu@suse.de
- Add Should-Stop to boot.lvm
* Thu Jul 31 2008 xwhu@suse.de
- repack LVM2.2.02.38.tar.bz2 into bz2 format
* Wed Jul 23 2008 hare@suse.de
- Include mkinitrd scriptlets.
* Thu Jun 26 2008 xwhu@suse.de
- update to 2.02.38
Fix tracking of validity of PVs with no mdas in lvmcache.
Fix return values for reporting commands when run with no PVs, LVs, or VGs.
Fix free_count when reading pool metadata.
Fix segfault when using pvcreate on a device containing pool metadata.
Fix segfault after _free_vginfo by remembering to remove vginfo from list.
Fix setpriority error message to signed int.
Fix uninitialised mutex in clvmd if all daemons are not running at startup.
Fix fsadm.sh to work with older blockdev, blkid & readlink binaries.
Fix lvresize to pass new size to fsadm when extending device.
Fix nodes list in clvmd-openais, and allow for broadcast messages.
Fix vgsplit internal counting of snapshot LVs.
Fix vgmerge snapshot_count when source VG contains snapshots.
Fix internal LV counter when a snapshot is removed.
Fix metadata corruption writing lvm1-formatted metadata with snapshots.
Fix lvconvert -m0 allocatable space check.
Fix vgdisplay 'Cur LV' field to match lvdisplay output.
Fix lv_count report field to exclude hidden LVs.
Fix vgsplit to only move hidden 'snapshotN' LVs when necessary.
Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.
Fix orphan VG name used for format_pool.
Fix output if overriding command_names on cmdline.
Fix vgsplit locking of new VG (2.02.30).
Fix redundant lvresize message if vg doesn't exist.
Fix another allocation bug with clvmd and large node IDs.
Fix uninitialised variable in clvmd that could cause odd hangs.
* Mon May 05 2008 aj@suse.de
- Fix requires of clvm.
* Wed Apr 30 2008 hare@suse.de
- Fixup build errors
* Wed Apr 30 2008 xwhu@suse.de
- Cleanup clvmd code on openais stack to make it work
- Split clvmd into a separate package (bnc#384708)
* Wed Apr 23 2008 xwhu@suse.de
- Change async lock primitives to sync
* Tue Apr 22 2008 xwhu@suse.de
- Fix build aginst beta
definition of PIPE_BUF is missing
* Tue Apr 22 2008 xwhu@suse.de
- Enable CLVM support in LVM2
* Wed Feb 20 2008 fehr@suse.de
- allow large minor number on command line with option --minor
(bnc#362960)
* Wed Feb 13 2008 fehr@suse.de
- update to new version 2.02.33
Fix mirror log name construction during lvconvert. (2.02.30)
Make monitor_dev_for_events recurse through the stack of LVs.
Clean up some more compiler warnings.
* Thu Feb 07 2008 hare@suse.de
- Enable dmeventd (FATE#303381)
* Thu Jan 31 2008 fehr@suse.de
- update to new version 2.02.32
Fix two check_lv_segments error messages to show whole segment
Refactor mirror log attachment code
Fix pvs, vgs, lvs error exit status on some error paths
Avoid readahead error message with default setting of lvcreate -M1
Set default readahead to twice maximium stripe size
Reinstate VG extent size and stripe size defaults (halved)
Change vgsplit -l (for unimplemented --list) into --maxlogicalvolumes
Fix process_all_pvs to detect non-orphans with no MDAs correctly
Don't use block_on_error with mirror targets version 1.12 and above
Update vgsplit to accept vgcreate options when new VG is destination
Update vgsplit to accept existing VG as destination
lvconvert waits for completion of initial sync by default
Refactor vgcreate for parameter validation and add tests
Add new convert_lv field to lvs output
Print warning when lvm tools are running as non-root
Prevent pvcreate from overwriting MDA-less PVs belonging to active VGs
Fix a segfault if using pvs with --all argument
Update --uuid argument description in man pages
Fix vgreduce PV list processing not to process every PV in the VG
Extend lvconvert to use polldaemon
Add support for stacked mirrors
Major restructuring of pvmove and lvconvert layer manipulation code
* Mon Dec 10 2007 fehr@suse.de
- update to new version 2.02.29
Accept sizes with --readahead argument.
Store size arguments as sectors internally.
Attempt to remove incomplete LVs with lvcreate zeroing/activation problems.
Add read_ahead activation code.
Extend readahead arg to accept "auto" and "none".
Prevent lvconvert -s from using same LV as origin and snapshot.
Fix human-readable output of odd numbers of sectors.
Show 'not usable' space when PV is too large for device in pvdisplay.
Ignore and fix up any excessive device size found in metadata.
Detect md superblocks version 1.0, 1.1 and 1.2.
Handle new sysfs subsystem/block/devices directory structure.
Add %%PVS extents option to lvresize, lvextend, and lvcreate.
Modify lvremove to prompt for removal if LV active on other cluster nodes.
Add '-f' to vgremove to force removal of VG even if LVs exist.
* Thu Nov 22 2007 fehr@suse.de
- adapt man page for pvdisplay to program (#342862)
- fix spec file to detect path to modprobe binary (#331968)
* Thu Nov 22 2007 fehr@suse.de
- update to new version 2.02.28
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
Add support for renaming mirrored LVs.
Add --mirrorlog argument to specify log type for mirrors.
Fix lvdisplay man page to say LV size is reported in sectors, not KB.
Fix snapshot cow area deactivation if origin is not active.
Add vg_mda_count and pv_mda_count columns to reports.
Handle vgsplit of an entire VG as a vgrename.
Print warnings to stderr instead of stdout.
Update vgcfgrestore man page.
Allow keyboard interrupt during user prompts when appropriate.
Add -f to vgcfgrestore to list metadata backup files.
Add pvdisplay --maps implementation.
Remove unsupported LVM1 options from vgcfgrestore man page.
Update vgcfgrestore man page to show mandatory VG name.
Update vgrename man page to include UUID and be consistent with lvrename.
* Mon May 07 2007 fehr@suse.de
- update to new version 2.02.25
Add devices/preferred_names config regex list for displayed device names
Update pvck to include text metadata area and record detection
Fix creation and conversion of mirrors with tags
Fix vgsplit for lvm1 format (set and validate VG name in PVs metadata)
Split metadata areas in vgsplit properly
Fix vgremove to require at least one vg argument
Fix reading of striped LVs in LVM1 format
Fix vgsplit to handle mirrors
Fix md signature check to handle both endiannesses
Add devices/ignore_suspended_devices to ignore suspended dm devices
* Tue Feb 20 2007 fehr@suse.de
- add boot.dmraid to Should-Start in boot.lvm2
* Sun Feb 11 2007 ro@suse.de
- fix build as non-root and use DESTDIR
* Mon Jan 08 2007 fehr@suse.de
- fix buggy pointer arithmetic (#232117)
* Mon Dec 18 2006 fehr@suse.de
- update to new version 2.02.17
Add missing pvremove error message when device doesn't exist.
When lvconvert allocates a mirror log, respect parallel area constraints.
Use loop to iterate through the now-ordered policy list in _allocate().
Check for failure to allocate just the mirror log.
Introduce calc_area_multiple().
Support mirror log allocation when there is only one PV: area_count now 0.
Fix detection of smallest area in _alloc_parallel_area() for cling policy.
Add manpage entry for clvmd -T
Fix gulm operation of clvmd, including a hang when doing lvchange -aey
Fix hang in clvmd if a pre-command failed.
* Wed Dec 06 2006 fehr@suse.de
- update to new version 2.02.16
Fix VG clustered read locks to use PR not CR.
Adjust some alignments for ia64/sparc.
Fix mirror segment removal to use temporary error segment.
Add -T (startup timeout) switch to clvmd.
Install lvmdump by default.
Fix check for snapshot module when activating snapshot.
Fix pvremove error path for case when PV is in use.
Warn if certain duplicate config file entries are seen.
Fix --autobackup argument which could never disable backups.
Fix a label_verify error path.
Fix adjusted_mirror_region_size() to handle 64-bit size.
Add some missing bounds checks on 32-bit extent counters.
Add Petabyte and Exabyte support.
Fix lvcreate error message when 0 extents requested.
lvremove man page: volumes must be cluster inactive before being removed.
Protect .cache manipulations with fcntl locking.
Change .cache timestamp comparisons to use ctime.
Fix mirror log LV writing to set all bits in whole LV.
Fix high-level free space check for partial allocations.
* Mon Oct 30 2006 fehr@suse.de
- update to new version 2.02.13 to finally fix bug #178321
Add couple of missing files to tools/Makefile CLEAN_TARGETS.
When adding snapshot leave cow LV mapped device active after zeroing.
Fix a clvmd debug message.
Add dev_flush() to set_lv().
Add lvchange --resync.
Perform high-level free space check before each allocation attempt.
Don't allow a node to remove an LV that's exclusively active on anther node.
Cope if same PV is included more than once in cmdline PE range list.
Set PV size to current device size if it is found to be zero.
Add segment parameter to target_present functions.
* Tue Oct 17 2006 fehr@suse.de
- update to new version 2.02.12
Fix pvdisplay to use vg_read() for non-orphans.
Fall back to internal locking if external locking lib is missing or fails.
Retain activation state after changing LV minor number with --force.
Propagate clustered flag in vgsplit and require resizeable flag.
Add clvmd function to return the cluster name. not used by LVM yet.
Add cling allocation policy.
Change _check_contiguous() to use _for_each_pv().
Extend _for_each_pv() to allow termination without error.
Abstract _is_contiguous().
Remove duplicated pv arg from _check_contiguous().
Accept regionsize with lvconvert.
Add report columns with underscore before field names ending 'size'.
Correct regionsize default on lvcreate man page (MB).
Fix clvmd bug that could cause it to die when a node with a long name crashed
Add device size to text metadata.
Fix format_text mda_setup pv->size and pv_setup pe_count calculations.
Fix _for_each_pv() for mirror with core log.
Add lvm_dump.sh script to create a tarball of debugging info from a system.
Capture error messages in clvmd and pass them back to the user.
Remove unused #defines from filter-md.c.
Make clvmd restart init script wait until clvmd has died before starting it.
Add -R to clvmd which tells running clvmds to reload their device cache.
Add LV column to reports listing kernel modules needed for activation.
Show available fields if report given invalid field. (e.g. lvs -o list)
Add timestamp functions with --disable-realtime configure option.
Add %%VG, %%LV and %%FREE suffices to lvcreate/lvresize --extents arg.
Fix two potential NULL pointer derefs in error cases in vg_read().
Separate --enable-cluster from locking lib options in lvmconf.sh.
Add a missing comma in lvcreate man page.
* Wed Sep 20 2006 fehr@suse.de
- update to new version 2.02.10
Fix lvconvert mirror change case detection logic.
Fix mirror log detachment so it correctly becomes a standalone LV.
Extend _check_contiguous() to detect single-area LVs.
Include mirror log (untested) in _for_each_pv() processing.
Use MIRROR_LOG_SIZE constant.
Remove struct seg_pvs from _for_each_pv() to generalise.
Avoid adding duplicates to list of parallel PVs to avoid.
Fix several incorrect comparisons in parallel area avoidance code.
Fix segment lengths when flattening existing parallel areas.
Log existing parallel areas prior to allocation.
Fix mirror log creation when activation disabled.
Don't attempt automatic recovery without proper locking.
When using local file locking, skip clustered VGs.
Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
lvm.static uses built-in cluster locking instead of external locking.
Don't attempt to load shared libraries if built statically.
Change default locking_lib to liblvm2clusterlock.so.
Add skip_dev_dir() to process command line VGs.
Stop clvmd complaining about nodes that have left the cluster.
Move lvm_snprintf(), split_words() and split_dm_name() into libdevmapper.
Add lvconvert man page.
Add mirror options to man pages.
Prevent mirror renames.
Move CMDLIB code into separate file and record whether static build.
* Wed Sep 13 2006 fehr@suse.de
- change BuildRequires to device-mapper-devel
* Mon Aug 21 2006 fehr@suse.de
- update to new version 2.02.09
Fix PE_ALIGN for pagesize over 32KB.
Separate out LVM1_PE_ALIGN and pe_align().
Add lvm_getpagesize wrapper.
Add --maxphysicalvolumes to vgchange.
* Wed Aug 16 2006 fehr@suse.de
- update to new version 2.02.08
Add checks for duplicate LV name, lvid and PV id before writing metadata.
Report all sanity check failures, not just the first.
Fix missing lockfs on first snapshot creation. (#197850)
Add unreliable --trustcache option to reporting commands.
Fix locking for mimage removal.
Fix clvmd_init_rhel4 'status' exit code.
* Fri Jul 28 2006 olh@suse.de
- remove dropped boot.ibmsis from boot.lvm
- boot.rootfsck should start before boot.lvm (#181972)
* Wed Jul 26 2006 fehr@suse.de
- update to new version 2.02.06
Fix activation logic in lvchange --persistent.
Don't ignore persistent minor numbers when activating.
Fix vgreduce --removemissing to return success if VG is already consistent.
Fix return code if VG specified on command line is not found.
Fix PV tools to include orphaned PVs in default output again.
Prevent snapshots of mirrors.
Fix lvcreate corelog validation.
Add --config for overriding most config file settings from cmdline.
Quote arguments when printing command line.
Remove linefeed from 'initialising logging' message.
Add 'Completed' debug message.
Don't attempt library exit after reloading config files.
Always compile with libdevmapper, even if device-mapper is disabled.
* Mon May 22 2006 fehr@suse.de
- update to new version 2.02.06
Propagate --monitor around cluster.
Add --monitor to vgcreate and lvcreate to control dmeventd registration.
Filter LCK_NONBLOCK in clvmd lock_vg.
Add --nosync to lvcreate with LV flag NOTSYNCED.
Use mirror's uuid for a core log.
Add mirror log fault-handling policy.
Improve mirror warning messages and tidy dmeventd syslog output.
Propagate nosync flag around cluster.
Allow vgreduce to handle mirror log failures.
Add --corelog to lvcreate and lvconvert.
Create a log header for replacement in-sync mirror log.
Use set_lv() and dev_set() to wipe sections of devices.
Add mirror_library description to example.conf.
Fix uuid_from_num() buffer overrun.
Increase maximum stripe size limit to physical extent size for lvm2 metadata.
Fix activation code to check for pre-existing mirror logs.
Ignore empty strings in config files.
Require non-zero regionsize and document parameter on lvcreate man page.
Invalidate cache if composition of VG changed externally.
* Wed Apr 26 2006 hare@suse.de
- add LVM_DEVICE_TIMEOUT sysconfig variable to make sure
udev has finished processing (#149979)
- Fix init script dependencies
* Mon Apr 24 2006 fehr@suse.de
- update to new version 2.02.05
Fix vgid string termination in recent cache code
* Thu Apr 20 2006 fehr@suse.de
- update to new version 2.02.04
Check for libsepol.
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
* Wed Apr 19 2006 fehr@suse.de
- update to new version 2.02.03
vgrename accepts vgid and exported VG.
Add --partial to pvs.
When choosing between identically-named VGs, also consider creation_host.
Provide total log suppression with 2.
Fix vgexport/vgimport to set/reset PV exported flag so pv_attr is correct.
Add vgid to struct physical_volume and pass with vg_name to some functions.
If two or more VGs are found with the same name, use one that is not exported.
Whenever vgname is captured, also capture vgid and whether exported.
Remove an incorrect unlock_vg() from process_each_lv().
Update extent size information in vgchange and vgcreate man pages.
Introduce origin_from_cow() and lv_is_visible().
pvremove without -f now fails if there's no PV label.
Support lvconvert -s.
Suppress locking library load failure message if --ignorelockingfailure.
Propagate partial mode around cluster.
Fix archive file expiration.
Fix dmeventd build.
clvmd now uses libcman rather than cman ioctls.
clvmd will allow new cman to shutdown on request.
* Thu Apr 06 2006 fehr@suse.de
- add option --mknodes to vgscan call in /etc/init.d/boot.lvm to
avoid potential inconsistencies in minor number of dm devices after
reboot when root fs is LVM LV (#139740)
* Tue Mar 14 2006 fehr@suse.de
- update to new version 2.02.02
Add %%.so: %%.a make template rule.
Switchover library building to use LIB_SUFFIX.
Only do lockfs filesystem sync when suspending snapshots.
Always print warning if activation is disabled.
vgreduce removes mirror images.
Add --mirrorsonly to vgreduce.
vgreduce replaces active LVs with error segment before removing them.
Set block_on_error parameter if available.
Add target_version.
Add details to format1 'Invalid LV in extent map' error message.
Fix lvscan snapshot full display.
Bring lvdisplay man page example into line.
Add mirror dmeventd library.
Add some activation logic to remove_mirror_images().
lvconvert can remove specified PVs from a mirror.
lvconvert turns an existing LV into a mirror.
Allow signed mirrors arguments.
Move create_mirror_log() into toollib.
Determine parallel PVs to avoid with ALLOC_NORMAL allocation.
Fix lv_empty.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Dec 19 2005 fehr@suse.de
- add new binary /sbin/lvconvert to file list
* Tue Dec 13 2005 fehr@suse.de
- add patch lvm-lock.diff to fix bug #138128
* Tue Dec 06 2005 fehr@suse.de
- update to new version 2.02.01
* Tue Nov 08 2005 fehr@suse.de
- add fix_striped_old_format.diff to allow striped volumes with
old metadata format (#130433)
- add fix_dm_as_pv.diff to allow usage of dm devices as PVs (#129960)
* Mon Oct 17 2005 fehr@suse.de
- update to new version 2.01.15
* Mon Sep 26 2005 fehr@suse.de
- fix bug in pvscan.c with PVs larger than 2TB in VGs
* Thu Aug 04 2005 fehr@suse.de
- update to new version 2.01.14
* Mon Jul 18 2005 fehr@suse.de
- update to new version 2.01.13
* Thu Jun 16 2005 fehr@suse.de
- update to new version 2.01.12
* Wed Jun 15 2005 meissner@suse.de
- add libselinux to nfb to enable selinux support.
- use RPM_OPT_FLAGS.
* Tue Jun 14 2005 fehr@suse.de
- update to new version 2.01.11
* Wed May 04 2005 fehr@suse.de
- update to new version 2.01.10
* Mon Apr 11 2005 fehr@suse.de
- use -y instead of -Y in options for call to fillup_and_insserv
(#76689)
- update to new version 2.01.09
* Wed Mar 09 2005 fehr@suse.de
- update to new version 2.01.07
* Mon Mar 07 2005 fehr@suse.de
- update to new version 2.01.06
* Thu Feb 10 2005 fehr@suse.de
- update to new version 2.01.04
* Wed Feb 02 2005 fehr@suse.de
- update to new version 2.01.03
* Mon Jan 24 2005 fehr@suse.de
- update to new version 2.01.02
* Thu Jan 20 2005 fehr@suse.de
- update to new version 2.01.01
* Wed Jan 19 2005 fehr@suse.de
- update to new version 2.01.00
* Tue Jan 11 2005 fehr@suse.de
- update to new version 2.00.33
* Wed Jan 05 2005 arvin@suse.de
- update to new version 2.00.32
* Fri Dec 17 2004 arvin@suse.de
- fixed -s option of vgdisplay (bug #49177)
* Mon Nov 29 2004 fehr@suse.de
- update to new version 2.00.29
* Thu Nov 25 2004 fehr@suse.de
- update to new version 2.00.27
* Wed Nov 24 2004 fehr@suse.de
- update to new version 2.00.26
* Wed Sep 29 2004 fehr@suse.de
- update to new version 2.00.25
* Wed Sep 22 2004 fehr@suse.de
- prevent buggy macro for MAJOR in kdev_t.h creep into code via
include of linux/fs.h
* Mon Sep 20 2004 fehr@suse.de
- update to new version 2.00.24
* Thu Sep 16 2004 fehr@suse.de
- update to new version 2.00.23
* Mon Sep 06 2004 fehr@suse.de
- update to new version 2.00.22
* Mon Aug 23 2004 fehr@suse.de
- update to new version 2.00.21
- new version obsoletes lvm2-vgscan.patch
* Wed Jul 14 2004 fehr@suse.de
- update to new version 2.00.20
* Mon Jun 07 2004 fehr@suse.de
- update to new version 2.00.16
- add forgotten patch no-inc-audit.diff needed for STABLE
* Mon May 24 2004 fehr@suse.de
- update to new version 2.00.15 to fix bug #41020
* Mon May 24 2004 hare@suse.de
- Fixed vgscan on S/390 (readdir returned DT_UNKNOWN)
* Thu May 13 2004 fehr@suse.de
- ignore udev names in default configuration to prevent yast2
confusion (#36869)
* Mon Apr 19 2004 fehr@suse.de
- accept additional devices (IDE->64, iseries/vd->8, #39114)
* Thu Apr 01 2004 fehr@suse.de
- update to new version 2.00.09 (fixes #34657 and #36877)
* Mon Mar 01 2004 ro@suse.de
- boot.lvm: root-fs is mounted-rw by boot.rootfsck
* Thu Feb 26 2004 fehr@suse.de
- skip cdroms and device with zero size on probing
* Wed Feb 04 2004 fehr@suse.de
- update to new version 2.00.08
- now lvm2 obsoletes lvm
* Thu Sep 18 2003 fehr@suse.de
- fix boot.lvm to cope with LABEL= and UUID= in /etc/fstab
also check reiser filesystem (#31060)
* Wed Sep 17 2003 fehr@suse.de
- update to new version 2.00.07
* Thu Aug 21 2003 fehr@suse.de
- update to new version 2.00.06
* Mon Aug 18 2003 garloff@suse.de
- (#29083) Add # X-UnitedLinux-Should-Start: boot.scsidev
* Tue Jul 01 2003 fehr@suse.de
- created initial version of a SuSE package

View File

@@ -1,8 +1,8 @@
Index: man/pvdisplay.8.in
===================================================================
--- man/pvdisplay.8.in.orig 2009-04-27 16:17:35.000000000 +0800
+++ man/pvdisplay.8.in 2009-04-27 16:17:50.000000000 +0800
@@ -25,7 +25,7 @@
--- man/pvdisplay.8.in.orig 2009-10-26 22:37:09.000000000 +0800
+++ man/pvdisplay.8.in 2010-02-04 11:00:40.000000000 +0800
@@ -51,7 +51,7 @@
* physical volume device name
* volume group name

View File

@@ -1,7 +1,7 @@
#!/bin/bash
#%stage: boot
#%depends: start
#%modules: $dm_modules dm-mod dm-snapshot
#%udevmodules: dm-mod dm-snapshot $dm_modules
#%programs: /sbin/dmsetup /sbin/blockdev
# dm-crypt dm-zero dm-mirror
#%if: -n "$root_dm"
@@ -19,5 +19,7 @@
load_modules
# because we run before udev we need to create the device node manually
mkdir /dev/mapper
mknod /dev/mapper/control c 10 63
mkdir -p /dev/mapper
if [ ! -c /dev/mapper/control ] ; then
mknod /dev/mapper/control c 10 63
fi

View File

@@ -21,7 +21,8 @@ if [ -x /sbin/dmsetup ]; then
# Add all dm modules
dm_modules=
for table in $(dmsetup table | cut -f 4 -d ' ' | sort | uniq); do
if [ "$table" ] && [ "$table" != "linear" ] && [ "$table" != "striped" ] ; then
if [ "$table" ] && [ "$table" != "linear" ] &&
[ "$table" != "striped" ] && [ "$table" != "snapshot-origin" ] ; then
dm_modules="$dm_modules dm-$table"
fi
done
@@ -30,5 +31,10 @@ if [ -x /sbin/dmsetup ]; then
# include dm block var from sysconfig
mkdir -p etc/sysconfig
grep DM_BLOCK /etc/sysconfig/kernel > etc/sysconfig/kernel
mkdir -p lib/udev/rules.d
cp /lib/udev/rules.d/10-dm.rules lib/udev/rules.d
cp /lib/udev/rules.d/13-dm-disk.rules lib/udev/rules.d
cp /lib/udev/rules.d/95-dm-notify.rules lib/udev/rules.d
save_var root_dm
save_var dm_modules
fi

78
mkinitrd-lvm2-boot.sh Normal file
View File

@@ -0,0 +1,78 @@
#!/bin/bash
#%stage: volumemanager
#%depends: evms
#%programs: /sbin/vgscan /sbin/vgchange /sbin/lvm
#%modules: linear
#%if: -n "$root_lvm2"
#
##### LVM (Logical Volume Management)
##
## This activates and waits for an LVM.
##
## Command line parameters
## -----------------------
##
## root_lvm2=1 use LVM
## root=/dev/mapper/... use this device as Volume Group
## vg_roots use this group as Volume Group
##
lvm2_get_vg() {
local param=$1
local vg_root vg_name
local sysdev
case $param in
/dev/disk/by-*/*)
vg_root=
;;
/dev/mapper/*)
vg_name=${o##root=/dev/mapper/}
vg_root=${vg_name%%-*}
;;
/dev/*)
set -- $(IFS=/ ; echo $param)
if [ "$#" = "3" ] ; then
# Check sysfs. If there are subdirectories
# matching this name it's a block device
for d in /sys/block/$2\!* ; do
if [ -d $d ] ; then
sysdev=$d
fi
done
# Not found in sysfs, looks like a VG then
if [ -z "$sysdev" ] ; then
vg_root=$2
fi
fi
;;
esac
echo $vg_root
}
# load the necessary module before we initialize the raid system
load_modules
if [ -n "$root_lvm2" ] ; then
o=$(get_param root)
# Fallback if 'root=' is not specified
[ -z "$o" ] && o=$rootdev
vg_root=$(lvm2_get_vg $o)
if [ "$vg_root" ] ; then
# We are waiting for a device-mapper device
root_major=$(sed -n 's/\(.*\) device-mapper/\1/p' /proc/devices)
fi
o=$(get_param resume)
vg_resume=$(lvm2_get_vg $o)
if [ "$vg_resume" ] ; then
resume_major=$(sed -n 's/\(.*\) device-mapper/\1/p' /proc/devices)
fi
fi
# initialize remebered and parameterized devices
for vgr in $vg_root $vg_resume $vg_roots; do
vgchange -a y $vgr
done
unset lvm2_get_vg

52
mkinitrd-lvm2-setup.sh Normal file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
#
#%stage: volumemanager
#%depends: evms
#
# get information about the current blockdev
update_blockdev
# Check whether we are using LVM2 (only available when not using EVMS)
if [ -z "$root_evms" ] && [ -x /sbin/lvdisplay ] ; then
lvm_blockdev=
for bd in $blockdev; do
update_blockdev $bd
vg_name=$(lvdisplay -c 2> /dev/null | sed -n "/.*:$blockmajor:$blockminor/p")
vg_dev=${vg_name%%:*}
vg_name=${vg_name#*:}
vg_root=${vg_name%%:*}
if [ "$vg_root" ] ; then
local vg_blockdev
root_lvm2=1
realrootdev=${vg_dev## }
vg_blockdev=$(vgs --noheadings --options pv_name $vg_root 2> /dev/null | sed "s@,@\n@g" | sed "s@([0-9]*)@@g;s@ @@g" | sort | uniq)
lvm_blockdev="$lvm_blockdev $vg_blockdev"
[ $? -eq 0 ] || return 1
vg_roots="$vg_roots $vg_root"
else
lvm_blockdev="$lvm_blockdev $bd"
fi
done
blockdev="$lvm_blockdev"
fi
if use_script lvm2; then
tmp_root_dm=1 # lvm needs dm
mkdir -p $tmp_mnt/etc/sysconfig
mkdir -p $tmp_mnt/etc/lvm
mkdir -p $tmp_mnt/var/lock/lvm
cp -a /etc/lvm/lvm.conf $tmp_mnt/etc/lvm/
cp -a /etc/sysconfig/lvm $tmp_mnt/etc/sysconfig/
# udev rule for lvm2
mkdir -p $tmp_mnt/lib/udev/rules.d
cp /lib/udev/rules.d/11-dm-lvm.rules $tmp_mnt/lib/udev/rules.d/
if [ -e /lib/udev/rules.d/64-lvm2.rules ]; then
cp /lib/udev/rules.d/64-lvm2.rules $tmp_mnt/lib/udev/rules.d/
fi
fi
save_var root_lvm2
save_var vg_roots

View File

@@ -1,7 +1,7 @@
Index: lib/device/dev-io.c
===================================================================
--- lib/device/dev-io.c.orig 2009-04-27 16:15:36.000000000 +0800
+++ lib/device/dev-io.c 2009-04-27 16:15:42.000000000 +0800
--- lib/device/dev-io.c.orig 2009-05-20 19:09:49.000000000 +0800
+++ lib/device/dev-io.c 2010-02-04 11:00:22.000000000 +0800
@@ -31,6 +31,7 @@
# define u64 uint64_t /* Missing without __KERNEL__ */
# undef WNOHANG /* Avoid redefinition */
@@ -12,8 +12,8 @@ Index: lib/device/dev-io.c
# ifndef BLKGETSIZE64 /* fs.h out-of-date */
Index: lib/filters/filter.c
===================================================================
--- lib/filters/filter.c.orig 2009-04-27 16:15:39.000000000 +0800
+++ lib/filters/filter.c 2009-04-27 16:15:42.000000000 +0800
--- lib/filters/filter.c.orig 2010-02-04 11:00:18.000000000 +0800
+++ lib/filters/filter.c 2010-02-04 11:00:22.000000000 +0800
@@ -14,6 +14,7 @@
*/

View File

@@ -1,13 +1,13 @@
Index: tools/Makefile.in
===================================================================
--- tools/Makefile.in.orig 2009-04-27 16:15:35.000000000 +0800
+++ tools/Makefile.in 2009-04-27 16:15:46.000000000 +0800
@@ -95,7 +95,7 @@
LVMLIBS += -ldevmapper
--- tools/Makefile.in.orig 2011-02-15 14:57:28.000000000 +0800
+++ tools/Makefile.in 2011-02-15 14:57:32.000000000 +0800
@@ -109,7 +109,7 @@
EXPORTED_HEADER = $(srcdir)/lvm2cmd.h
EXPORTED_FN_PREFIX = lvm2
-DEFS += -DLVM_SHARED_PATH=\"$(exec_prefix)/sbin/lvm\"
+DEFS += -DLVM_SHARED_PATH=\"/sbin/lvm\"
include $(top_srcdir)/make.tmpl
CFLOW_LIST = lvmcmdlib.c lvm2cmd.c
CFLOW_LIST_TARGET = liblvm2cmd.cflow

View File

@@ -1,6 +1,8 @@
--- daemons/clvmd/clvmd.c
Index: daemons/clvmd/clvmd.c
===================================================================
--- daemons/clvmd/clvmd.c.orig
+++ daemons/clvmd/clvmd.c
@@ -59,6 +59,8 @@
@@ -65,6 +65,8 @@
#define ISLOCAL_CSID(c) (memcmp(c, our_csid, max_csid_len) == 0)

View File

@@ -1,13 +0,0 @@
Index: tools/pvscan.c
===================================================================
--- tools/pvscan.c.orig 2008-11-04 06:14:30.000000000 +0800
+++ tools/pvscan.c 2009-04-27 16:15:52.000000000 +0800
@@ -166,7 +166,7 @@
size_new += pv_size(pv);
size_total += pv_size(pv);
} else
- size_total += pv_pe_count(pv) * pv_pe_size(pv);
+ size_total += (uint64_t)pv_pe_count(pv) * pv_pe_size(pv);
}
/* find maximum pv name length */

0
ready
View File

View File

@@ -1,38 +0,0 @@
Index: LVM2.2.02.39/daemons/clvmd/clvmd.c
===================================================================
--- LVM2.2.02.39.orig/daemons/clvmd/clvmd.c 2009-03-24 19:29:14.000000000 +0800
+++ LVM2.2.02.39/daemons/clvmd/clvmd.c 2009-03-24 19:34:01.000000000 +0800
@@ -348,9 +348,11 @@
signal(SIGHUP, sighup_handler);
signal(SIGPIPE, SIG_IGN);
- /* Block SIGUSR2 in the main process */
+ /* Block SIGUSR2/SIGINT/SIGTERM in process */
sigemptyset(&ss);
sigaddset(&ss, SIGUSR2);
+ sigaddset(&ss, SIGINT);
+ sigaddset(&ss, SIGTERM);
sigprocmask(SIG_BLOCK, &ss, NULL);
/* Initialise the LVM thread variables */
@@ -633,6 +635,11 @@
{
DEBUGLOG("Using timeout of %d seconds\n", cmd_timeout);
+ sigset_t ss;
+ sigemptyset(&ss);
+ sigaddset(&ss, SIGINT);
+ sigaddset(&ss, SIGTERM);
+ pthread_sigmask(SIG_UNBLOCK, &ss, NULL);
/* Main loop */
while (!quit) {
fd_set in;
@@ -771,6 +778,8 @@
}
closedown:
+
+ pthread_sigmask(SIG_BLOCK, &ss, NULL);
clops->cluster_closedown();
close(local_sock);
}

24
sleep-try-open-count.diff Normal file
View File

@@ -0,0 +1,24 @@
Index: LVM2.2.02.67/libdm/libdm-deptree.c
===================================================================
--- LVM2.2.02.67.orig/libdm/libdm-deptree.c
+++ LVM2.2.02.67/libdm/libdm-deptree.c
@@ -1143,6 +1143,19 @@ static int _dm_tree_deactivate_children(
(child->presuspend_node &&
!_node_has_closed_parents(child->presuspend_node,
uuid_prefix, uuid_prefix_len))) {
+
+ int idx = 10;
+ while (info.open_count && idx--) {
+ struct timespec ts = {0, 500000000};
+ nanosleep(&ts, NULL);
+ _info_by_dev(dinfo->major, dinfo->minor, 1, &info);
+ }
+
+ if (info.open_count) {
+ log_error("give up on open_count");
+ continue;
+ }
+
/* Only report error from (likely non-internal) dependency at top level */
if (!level) {
log_error("Unable to deactivate open %s (%" PRIu32

View File

@@ -1,11 +1,11 @@
This is still very primitive support of drbd in lvm2.
Can we use some /sys information for this ?
Index: LVM2.2.02.39/lib/cache/lvmcache.c
===================================================================
--- LVM2.2.02.39.orig/lib/cache/lvmcache.c 2008-06-27 23:18:31.000000000 +0800
+++ LVM2.2.02.39/lib/cache/lvmcache.c 2009-03-31 12:08:29.000000000 +0800
@@ -1119,6 +1119,13 @@
pvid, dev_name(dev),
Index: LVM2.2.02.58/lib/cache/lvmcache.c
================================================================================
--- LVM2.2.02.58/lib/cache/lvmcache.c
+++ LVM2.2.02.58/lib/cache/lvmcache.c
@@ -1222,6 +1222,14 @@
dev_subsystem_name(existing->dev),
dev_name(existing->dev));
return NULL;
+ } else if (MAJOR(existing->dev->dev) == drbd_major() &&
@@ -15,10 +15,11 @@ Index: LVM2.2.02.39/lib/cache/lvmcache.c
+ pvid, dev_name(dev),
+ dev_name(existing->dev));
+ return NULL;
} else if (MAJOR(existing->dev->dev) != md_major() &&
MAJOR(dev->dev) == md_major())
log_very_verbose("Duplicate PV %s on %s - "
@@ -1131,6 +1138,12 @@
+
} else if (dm_is_dm_major(MAJOR(existing->dev->dev)) &&
!dm_is_dm_major(MAJOR(dev->dev))) {
log_very_verbose("Ignoring duplicate PV %s on "
@@ -1242,6 +1250,12 @@
"using dm %s", pvid,
dev_name(existing->dev),
dev_name(dev));
@@ -31,18 +32,9 @@ Index: LVM2.2.02.39/lib/cache/lvmcache.c
/* FIXME If both dm, check dependencies */
//else if (dm_is_dm_major(MAJOR(existing->dev->dev)) &&
//dm_is_dm_major(MAJOR(dev->dev)))
Index: LVM2.2.02.39/lib/filters/filter.c
===================================================================
--- LVM2.2.02.39.orig/lib/filters/filter.c 2009-03-31 11:48:52.000000000 +0800
+++ LVM2.2.02.39/lib/filters/filter.c 2009-03-31 11:57:38.000000000 +0800
@@ -46,12 +46,20 @@
static int _md_major = -1;
static int _device_mapper_major = -1;
+static int _drbd_major = -1;
int md_major(void)
{
--- LVM2.2.02.58/lib/filters/filter.c
+++ LVM2.2.02.58/lib/filters/filter.c
@@ -54,6 +54,13 @@
return _md_major;
}
@@ -50,19 +42,9 @@ Index: LVM2.2.02.39/lib/filters/filter.c
+ drbd resource ?? */
+int drbd_major(void)
+{
+ return _drbd_major;
+ return _drbd_major;
+}
+
/*
* Devices are only checked for partition tables if their minor number
* is a multiple of the number corresponding to their type below
@@ -208,6 +216,9 @@
if (!strncmp("md", line + i, 2) && isspace(*(line + i + 2)))
_md_major = line_maj;
+ if (!strncmp("drbd", line + i, 4) && isspace(*(line + i + 4)))
+ _drbd_major = line_maj;
+
/* Look for device-mapper device */
/* FIXME Cope with multiple majors */
if (!strncmp("device-mapper", line + i, 13) && isspace(*(line + i + 13)))
int blkext_major(void)
{
return _blkext_major;

39
udev-rules_update.diff Normal file
View File

@@ -0,0 +1,39 @@
Index: LVM2.2.02.84/udev/10-dm.rules.in
===================================================================
--- LVM2.2.02.84.orig/udev/10-dm.rules.in 2011-01-28 19:41:52.000000000 +0800
+++ LVM2.2.02.84/udev/10-dm.rules.in 2011-02-15 14:50:19.000000000 +0800
@@ -94,6 +94,10 @@
TEST!="dm", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o name,uuid,suspended"
ENV{DM_SUSPENDED}!="?*", IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o suspended"
+# dmsetup export is a SUSE extension to dmsetup
+# it is required by some other udev rules in SUSE distro.
+IMPORT{program}="$env{DM_SBIN_PATH}/dmsetup export -j %M -m %m"
+
# dmsetup tool provides suspended state information in textual
# form with values "Suspended"/"Active". We translate it to
# 0/1 respectively to be consistent with sysfs values.
Index: LVM2.2.02.84/udev/13-dm-disk.rules
===================================================================
--- LVM2.2.02.84.orig/udev/13-dm-disk.rules 2009-11-13 20:33:27.000000000 +0800
+++ LVM2.2.02.84/udev/13-dm-disk.rules 2011-02-15 14:51:31.000000000 +0800
@@ -14,13 +14,16 @@
ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end"
ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end"
-SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
-ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
+SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace"
+ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace"
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"
-ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
+ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
+OPTIONS+="watch"
+ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"