master - lvmetad: Implement --test (fixes #832033).
by Petr Rockai
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6997943f222172...
Commit: 6997943f2221729449469d1a7963055991c2361d
Parent: 4dbf872a9fc0aac34f73fd8214cc75846554e501
Author: Petr Rockai <me(a)mornfall.net>
AuthorDate: Mon Jul 30 10:44:11 2012 +0200
Committer: Petr Rockai <me(a)mornfall.net>
CommitterDate: Mon Jul 30 11:19:02 2012 +0200
lvmetad: Implement --test (fixes #832033).
---
WHATS_NEW | 1 +
lib/cache/lvmetad.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a09e076..cb3ed90 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Respect --test also when using lvmetad.
No longer capitalise first LV attribute char for invalid snapshots.
Allow vgextend to add PVs to a VG that is missing PVs.
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 6ef30db..3384ec4 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -275,7 +275,7 @@ int lvmetad_vg_update(struct volume_group *vg)
if (!vg)
return 0;
- if (!_using_lvmetad)
+ if (!_using_lvmetad || test_mode())
return 1; /* fake it */
/* TODO. This is not entirely correct, since export_vg_to_buffer
@@ -335,7 +335,7 @@ int lvmetad_vg_remove(struct volume_group *vg)
daemon_reply reply;
int result;
- if (!_using_lvmetad)
+ if (!_using_lvmetad || test_mode())
return 1; /* just fake it */
if (!id_write_format(&vg->id, uuid, sizeof(uuid)))
@@ -547,7 +547,7 @@ int lvmetad_pv_found(struct id pvid, struct device *device, const struct format_
const char *status;
int result;
- if (!_using_lvmetad)
+ if (!_using_lvmetad || test_mode())
return 1;
if (!id_write_format(&pvid, uuid, sizeof(uuid)))
@@ -629,7 +629,7 @@ int lvmetad_pv_gone(dev_t device, const char *pv_name, activation_handler handle
int result;
int found;
- if (!_using_lvmetad)
+ if (!_using_lvmetad || test_mode())
return 1;
/*
11 years, 8 months
master - reports: invalid snaps do not capitalise lv_attr
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4dbf872a9fc0aa...
Commit: 4dbf872a9fc0aac34f73fd8214cc75846554e501
Parent: 25ae0b39b77d80990d0821729ab4f2307bd38c16
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Jul 27 20:19:28 2012 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Jul 27 20:19:28 2012 +0100
reports: invalid snaps do not capitalise lv_attr
No longer capitalise first LV attribute char for invalid snapshots.
This state is available from the 5th char now (I or S).
---
WHATS_NEW | 1 +
lib/metadata/lv.c | 1 -
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 32ebf15..a09e076 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ No longer capitalise first LV attribute char for invalid snapshots.
Allow vgextend to add PVs to a VG that is missing PVs.
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
Fix segfault when attempting to replace RAID 4/5/6 device (2.02.97).
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index 747bf9e..bb6043d 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -448,7 +448,6 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
if (info.live_table && lv_is_cow(lv)) {
if (!lv_snapshot_percent(lv, &snap_percent) ||
snap_percent == PERCENT_INVALID) {
- repstr[0] = toupper(repstr[0]);
if (info.suspended)
repstr[4] = 'S'; /* Susp Inv snapshot */
else
11 years, 9 months
master - dmsetup: allow --noflush with status/wait for thin
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=25ae0b39b77d80...
Commit: 25ae0b39b77d80990d0821729ab4f2307bd38c16
Parent: 186a2772e8ac3c2088bdfc833c32d773464d666b
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Jul 27 20:03:07 2012 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Jul 27 20:03:07 2012 +0100
dmsetup: allow --noflush with status/wait for thin
Allow --noflush with dmsetup status and wait (for thin target 1.3.0 /
ioctl 4.23.0).
---
WHATS_NEW_DM | 1 +
libdm/misc/dm-ioctl.h | 12 +++++++-----
man/dmsetup.8.in | 9 ++++++++-
tools/dmsetup.c | 7 +++++--
4 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 0bfd016..a790ccf 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.76 -
===============================
+ Allow --noflush with dmsetup status and wait (for thin target).
Add dm_config_write_one_node to libdevmapper.
Add support for thin pool message release/reserve_metadata_snap.
Add support for thin pool discard and external origin.
diff --git a/libdm/misc/dm-ioctl.h b/libdm/misc/dm-ioctl.h
index c031315..1cf66fe 100644
--- a/libdm/misc/dm-ioctl.h
+++ b/libdm/misc/dm-ioctl.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
- * Copyright (C) 2004 - 2009 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004 - 2012 Red Hat, Inc. All rights reserved.
*
* This file is released under the LGPL.
*/
@@ -269,9 +269,9 @@ enum {
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
#define DM_VERSION_MAJOR 4
-#define DM_VERSION_MINOR 20
+#define DM_VERSION_MINOR 23
#define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl (2011-02-02)"
+#define DM_VERSION_EXTRA "-ioctl (2012-07-25)"
/* Status bits */
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
@@ -309,6 +309,8 @@ enum {
/*
* Set this to suspend without flushing queued ios.
+ * Also disables flushing uncommitted changes in the thin target before
+ * generating statistics for DM_TABLE_STATUS and DM_DEV_WAIT.
*/
#define DM_NOFLUSH_FLAG (1 << 11) /* In */
@@ -331,8 +333,8 @@ enum {
#define DM_UUID_FLAG (1 << 14) /* In */
/*
- * If set, all buffers are wiped after use. Used when sending
- * or requesting sensitive data like crypt key.
+ * If set, all buffers are wiped after use. Use when sending
+ * or requesting sensitive data such as an encryption key.
*/
#define DM_SECURE_DATA_FLAG (1 << 15) /* In */
diff --git a/man/dmsetup.8.in b/man/dmsetup.8.in
index 8eb679b..90c715f 100644
--- a/man/dmsetup.8.in
+++ b/man/dmsetup.8.in
@@ -109,6 +109,7 @@ dmsetup \- low level logical volume management
.B dmsetup status
.RB [ \-\-target
.IR target_type ]
+.RB [ \-\-noflush ]
.RI [ device_name ]
.br
.B dmsetup suspend
@@ -143,6 +144,7 @@ dmsetup \- low level logical volume management
.B dmsetup version
.br
.B dmsetup wait
+.RB [ \-\-noflush ]
.I device_name
.RI [ event_nr ]
.br
@@ -477,11 +479,13 @@ Default subsystem is LVM.
.B status
.RB [ \-\-target
.IR target_type ]
+.RB [ \-\-noflush ]
.RI [ device_name ]
.br
Outputs status information for each of the device's targets.
With \-\-target, only information relating to the specified target type
-is displayed.
+any is displayed. With \-\-noflush, the thin target (from version 1.3.0)
+doesn't commit any outstanding changes to disk before reporting its statistics.
.br
.HP
.B suspend
@@ -577,6 +581,7 @@ Outputs version information.
.TP
.B wait
+.RB [ \-\-noflush ]
.I device_name
.RI [ event_nr ]
.br
@@ -584,6 +589,8 @@ Sleeps until the event counter for device_name exceeds event_nr.
Use \-v to see the event number returned.
To wait until the next event is triggered, use \fBinfo\fP to find
the last event number.
+With \-\-noflush, the thin target (from version 1.3.0) doesn't commit
+any outstanding changes to disk before reporting its statistics.
.SH TABLE FORMAT
Each line of the table specifies a single target and is of the form:
.P
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index 2787b76..5422f0b 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -1642,6 +1642,9 @@ static int _status(CMD_ARGS)
if (_switches[CHECKS_ARG] && !dm_task_enable_checks(dmt))
goto out;
+ if (_switches[NOFLUSH_ARG] && !dm_task_no_flush(dmt))
+ goto out;
+
if (!dm_task_run(dmt))
goto out;
@@ -2994,9 +2997,9 @@ static struct command _commands[] = {
{"ls", "[--target <target_type>] [--exec <command>] [-o options] [--tree]", 0, 0, 0, _ls},
{"info", "[<device>]", 0, -1, 1, _info},
{"deps", "[-o options] [<device>]", 0, -1, 1, _deps},
- {"status", "[<device>] [--target <target_type>]", 0, -1, 1, _status},
+ {"status", "[<device>] [--noflush] [--target <target_type>]", 0, -1, 1, _status},
{"table", "[<device>] [--target <target_type>] [--showkeys]", 0, -1, 1, _status},
- {"wait", "<device> [<event_nr>]", 0, 2, 0, _wait},
+ {"wait", "<device> [<event_nr>] [--noflush]", 0, 2, 0, _wait},
{"mknodes", "[<device>]", 0, -1, 1, _mknodes},
{"mangle", "[<device>]", 0, -1, 1, _mangle},
{"udevcreatecookie", "", 0, 0, 0, _udevcreatecookie},
11 years, 9 months
master - vgextend: Allow PVs to be added to VGs that have PVs missing
by Jonathan Brassow
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=186a2772e8ac3c...
Commit: 186a2772e8ac3c2088bdfc833c32d773464d666b
Parent: 45db25817ff342a86b2ddf000b4b3a4d59be8848
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Thu Jul 26 17:06:06 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Thu Jul 26 17:06:06 2012 -0500
vgextend: Allow PVs to be added to VGs that have PVs missing
Allowing people to add devices to a VG that has PVs missing helps
people avoid the inability to repair RAID LVs in certain cases.
For example, if a user creates a RAID 4/5/6 LV using all of the
available devices in a VG, there will be no spare devices to
repair the LV with if a device should fail. Further, because the
VG is missing a device, new devices cannot be added to allow the
repair. If 'vgreduce --removemissing' were attempted, the
"MISSING" PV could not be removed without also destroying the RAID
LV.
Allowing vgextend to operate solves the circular dependency.
When the PV is added by a vgextend operation, the sequence number is
incremented and the 'MISSING' flag is put on the PVs which are missing.
---
WHATS_NEW | 1 +
tools/vgextend.c | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 735bdba..32ebf15 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Allow vgextend to add PVs to a VG that is missing PVs.
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
Fix segfault when attempting to replace RAID 4/5/6 device (2.02.97).
Fix dumpconfig <node> to print only <node> without its siblings (2.02.89).
diff --git a/tools/vgextend.c b/tools/vgextend.c
index d1adf21..161796c 100644
--- a/tools/vgextend.c
+++ b/tools/vgextend.c
@@ -66,8 +66,13 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
return EINVALID_CMD_LINE;
}
- if (arg_count(cmd, restoremissing_ARG))
- cmd->handles_missing_pvs = 1;
+ /*
+ * It is always ok to add new PVs to a VG - even if there are
+ * missing PVs. No LVs are affected by this operation, but
+ * repair processes - particularly for RAID segtypes - can
+ * be facilitated.
+ */
+ cmd->handles_missing_pvs = 1;
log_verbose("Checking for volume group \"%s\"", vg_name);
vg = vg_read_for_update(cmd, vg_name, NULL, 0);
11 years, 9 months
master - filters: move device_info_t definition to header
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=45db25817ff342...
Commit: 45db25817ff342a86b2ddf000b4b3a4d59be8848
Parent: 9161308252336491a107983ed16481e446853e26
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Jul 26 12:22:55 2012 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Jul 26 12:22:55 2012 +0100
filters: move device_info_t definition to header
---
lib/filters/device-types.h | 5 +++++
lib/filters/filter.c | 9 ++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/filters/device-types.h b/lib/filters/device-types.h
index 1208160..9efbe68 100644
--- a/lib/filters/device-types.h
+++ b/lib/filters/device-types.h
@@ -13,6 +13,11 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+typedef struct {
+ const char name[15];
+ const int8_t max_partitions;
+} device_info_t;
+
/*
* Devices are only checked for partition tables if their minor number
* is a multiple of the number corresponding to their type below
diff --git a/lib/filters/filter.c b/lib/filters/filter.c
index bab20ec..dcb6c5e 100644
--- a/lib/filters/filter.c
+++ b/lib/filters/filter.c
@@ -27,6 +27,8 @@
#include <fcntl.h>
#include <limits.h>
+#include "device-types.h"
+
#define NUMBER_OF_MAJORS 4096
#define PARTITION_SCSI_DEVICE (1 << 0)
@@ -35,13 +37,6 @@ static struct {
int flags;
} _partitions[NUMBER_OF_MAJORS];
-typedef struct {
- const char name[15];
- const int8_t max_partitions;
-} device_info_t;
-
-#include "device-types.h"
-
static int _md_major = -1;
static int _blkext_major = -1;
static int _drbd_major = -1;
11 years, 9 months
master - systemd: ensure monitoring is handled after lvmetad
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=91613082523364...
Commit: 9161308252336491a107983ed16481e446853e26
Parent: e0bc3cf1a0102aff6c047a3293ef45ca5f221c10
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Jul 26 11:30:27 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Jul 26 11:30:27 2012 +0200
systemd: ensure monitoring is handled after lvmetad
Monitoring is handled using "vgchange --monitor" call. Ensure that lvmetad is up
and running at the time of this call to prevent any fallback to direct scan
within the vgchange. The same applies for shutdown sequence but the other way
round - switch monitoring off and lvmetad afterwards.
---
scripts/lvm2_monitoring_systemd_red_hat.service.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in
index a8d5183..425cb0d 100644
--- a/scripts/lvm2_monitoring_systemd_red_hat.service.in
+++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in
@@ -2,7 +2,7 @@
Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
Requires=dm-event.socket
-After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service
+After=dm-event.socket fedora-storage-init.service fedora-storage-init-late.service lvm2-lvmetad.service
Before=local-fs.target
DefaultDependencies=no
Conflicts=shutdown.target
11 years, 9 months
master - filters: Add Micron PCIe SSDs (mtip32xx) [part2]
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e0bc3cf1a0102a...
Commit: e0bc3cf1a0102aff6c047a3293ef45ca5f221c10
Parent: 7803756e9751117c8a2454d55c145f6e759279dd
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Jul 26 02:31:06 2012 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Jul 26 02:31:06 2012 +0100
filters: Add Micron PCIe SSDs (mtip32xx) [part2]
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
---
lib/filters/device-types.h | 55 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/lib/filters/device-types.h b/lib/filters/device-types.h
new file mode 100644
index 0000000..1208160
--- /dev/null
+++ b/lib/filters/device-types.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
+ * Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * Devices are only checked for partition tables if their minor number
+ * is a multiple of the number corresponding to their type below
+ * i.e. this gives the granularity of whole-device minor numbers.
+ * Use 1 if the device is not partitionable.
+ *
+ * The list can be supplemented with devices/types in the config file.
+ */
+static const device_info_t _device_info[] = {
+ {"ide", 64}, /* IDE disk */
+ {"sd", 16}, /* SCSI disk */
+ {"md", 1}, /* Multiple Disk driver (SoftRAID) */
+ {"mdp", 1}, /* Partitionable MD */
+ {"loop", 1}, /* Loop device */
+ {"dasd", 4}, /* DASD disk (IBM S/390, zSeries) */
+ {"dac960", 8}, /* DAC960 */
+ {"nbd", 16}, /* Network Block Device */
+ {"ida", 16}, /* Compaq SMART2 */
+ {"cciss", 16}, /* Compaq CCISS array */
+ {"ubd", 16}, /* User-mode virtual block device */
+ {"ataraid", 16}, /* ATA Raid */
+ {"drbd", 16}, /* Distributed Replicated Block Device */
+ {"emcpower", 16}, /* EMC Powerpath */
+ {"power2", 16}, /* EMC Powerpath */
+ {"i2o_block", 16}, /* i2o Block Disk */
+ {"iseries/vd", 8}, /* iSeries disks */
+ {"gnbd", 1}, /* Network block device */
+ {"ramdisk", 1}, /* RAM disk */
+ {"aoe", 16}, /* ATA over Ethernet */
+ {"device-mapper", 1}, /* Other mapped devices */
+ {"xvd", 16}, /* Xen virtual block device */
+ {"vdisk", 8}, /* SUN's LDOM virtual block device */
+ {"ps3disk", 16}, /* PlayStation 3 internal disk */
+ {"virtblk", 8}, /* VirtIO disk */
+ {"mmc", 16}, /* MMC block device */
+ {"blkext", 1}, /* Extended device partitions */
+ {"fio", 16}, /* Fusion */
+ {"mtip32xx", 16}, /* Micron PCIe SSDs */
+ {"", 0}
+};
11 years, 9 months
master - filters: Add Micron PCIe SSDs (mtip32xx)
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7803756e975111...
Commit: 7803756e9751117c8a2454d55c145f6e759279dd
Parent: 599f18db8aadcc0f4818471ec5b47298a5a8ef54
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Jul 26 02:26:40 2012 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Jul 26 02:26:40 2012 +0100
filters: Add Micron PCIe SSDs (mtip32xx)
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
---
WHATS_NEW | 1 +
lib/filters/filter.c | 42 ++----------------------------------------
2 files changed, 3 insertions(+), 40 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index bca890e..735bdba 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.97 -
===============================
+ Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
Fix segfault when attempting to replace RAID 4/5/6 device (2.02.97).
Fix dumpconfig <node> to print only <node> without its siblings (2.02.89).
Do not issue "Failed to handle a client connection" error if lvmetad killed.
diff --git a/lib/filters/filter.c b/lib/filters/filter.c
index 11b94c1..bab20ec 100644
--- a/lib/filters/filter.c
+++ b/lib/filters/filter.c
@@ -40,6 +40,8 @@ typedef struct {
const int8_t max_partitions;
} device_info_t;
+#include "device-types.h"
+
static int _md_major = -1;
static int _blkext_major = -1;
static int _drbd_major = -1;
@@ -99,46 +101,6 @@ const char *dev_subsystem_name(const struct device *dev)
return "";
}
-/*
- * Devices are only checked for partition tables if their minor number
- * is a multiple of the number corresponding to their type below
- * i.e. this gives the granularity of whole-device minor numbers.
- * Use 1 if the device is not partitionable.
- *
- * The list can be supplemented with devices/types in the config file.
- */
-static const device_info_t _device_info[] = {
- {"ide", 64}, /* IDE disk */
- {"sd", 16}, /* SCSI disk */
- {"md", 1}, /* Multiple Disk driver (SoftRAID) */
- {"mdp", 1}, /* Partitionable MD */
- {"loop", 1}, /* Loop device */
- {"dasd", 4}, /* DASD disk (IBM S/390, zSeries) */
- {"dac960", 8}, /* DAC960 */
- {"nbd", 16}, /* Network Block Device */
- {"ida", 16}, /* Compaq SMART2 */
- {"cciss", 16}, /* Compaq CCISS array */
- {"ubd", 16}, /* User-mode virtual block device */
- {"ataraid", 16}, /* ATA Raid */
- {"drbd", 16}, /* Distributed Replicated Block Device */
- {"emcpower", 16}, /* EMC Powerpath */
- {"power2", 16}, /* EMC Powerpath */
- {"i2o_block", 16}, /* i2o Block Disk */
- {"iseries/vd", 8}, /* iSeries disks */
- {"gnbd", 1}, /* Network block device */
- {"ramdisk", 1}, /* RAM disk */
- {"aoe", 16}, /* ATA over Ethernet */
- {"device-mapper", 1}, /* Other mapped devices */
- {"xvd", 16}, /* Xen virtual block device */
- {"vdisk", 8}, /* SUN's LDOM virtual block device */
- {"ps3disk", 16}, /* PlayStation 3 internal disk */
- {"virtblk", 8}, /* VirtIO disk */
- {"mmc", 16}, /* MMC block device */
- {"blkext", 1}, /* Extended device partitions */
- {"fio", 16}, /* Fusion */
- {"", 0}
-};
-
static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute__((unused)),
struct device *dev)
{
11 years, 9 months
master - TEST: Conditionalize RAID tests on whether the dm-raid module exists
by Jonathan Brassow
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=599f18db8aadcc...
Commit: 599f18db8aadcc0f4818471ec5b47298a5a8ef54
Parent: 81e89c0647d856d328ac6ccc8db55472b5746181
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Wed Jul 25 09:43:28 2012 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Wed Jul 25 09:43:28 2012 -0500
TEST: Conditionalize RAID tests on whether the dm-raid module exists
---
test/shell/lvconvert-repair.sh | 44 ++++++++++++++++++++-------------------
1 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
index 0aeeffa..51bc9de 100644
--- a/test/shell/lvconvert-repair.sh
+++ b/test/shell/lvconvert-repair.sh
@@ -113,26 +113,28 @@ aux enable_dev "$dev3"
vgextend $vg "$dev3"
lvremove -ff $vg
-# RAID5 single replace
-lvcreate --type raid5 -i 2 -l 2 -n $lv1 $vg "$dev1" "$dev2" "$dev3"
-aux wait_for_sync $vg $lv1
-aux disable_dev "$dev3"
-lvconvert -y --repair $vg/$lv1
-vgreduce --removemissing $vg
-aux enable_dev "$dev3"
-vgextend $vg "$dev3"
-lvremove -ff $vg
-
-# RAID6 double replace
-lvcreate --type raid5 -i 3 -l 2 -n $lv1 $vg \
- "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
-aux wait_for_sync $vg $lv1
-aux disable_dev "$dev4" "$dev5"
-lvconvert -y --repair $vg/$lv1
-vgreduce --removemissing $vg
-aux enable_dev "$dev4"
-aux enable_dev "$dev5"
-vgextend $vg "$dev4" "$dev5"
-lvremove -ff $vg
+if aux target_at_least dm-raid 1 1 0; then
+ # RAID5 single replace
+ lvcreate --type raid5 -i 2 -l 2 -n $lv1 $vg "$dev1" "$dev2" "$dev3"
+ aux wait_for_sync $vg $lv1
+ aux disable_dev "$dev3"
+ lvconvert -y --repair $vg/$lv1
+ vgreduce --removemissing $vg
+ aux enable_dev "$dev3"
+ vgextend $vg "$dev3"
+ lvremove -ff $vg
+
+ # RAID6 double replace
+ lvcreate --type raid5 -i 3 -l 2 -n $lv1 $vg \
+ "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
+ aux wait_for_sync $vg $lv1
+ aux disable_dev "$dev4" "$dev5"
+ lvconvert -y --repair $vg/$lv1
+ vgreduce --removemissing $vg
+ aux enable_dev "$dev4"
+ aux enable_dev "$dev5"
+ vgextend $vg "$dev4" "$dev5"
+ lvremove -ff $vg
+fi
vgremove -ff $vg
11 years, 9 months
master - locking: clarify read-only locking error message v2
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=81e89c0647d856...
Commit: 81e89c0647d856d328ac6ccc8db55472b5746181
Parent: a05ac836412f1a9ebc6bc90fe611ff6808d6d844
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jul 25 14:37:22 2012 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jul 25 14:37:22 2012 +0200
locking: clarify read-only locking error message v2
---
lib/locking/no_locking.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/locking/no_locking.c b/lib/locking/no_locking.c
index 76d8f1f..53a5948 100644
--- a/lib/locking/no_locking.c
+++ b/lib/locking/no_locking.c
@@ -74,7 +74,7 @@ static int _readonly_lock_resource(struct cmd_context *cmd,
(flags & LCK_SCOPE_MASK) == LCK_VG &&
!(flags & LCK_CACHE) &&
strcmp(resource, VG_GLOBAL)) {
- log_error("Read-only locking configured via global/locking_type setting. "
+ log_error("Read-only locking type set. "
"Write locks are prohibited.");
return 0;
}
11 years, 9 months