mirror of
git://sourceware.org/git/lvm2.git
synced 2025-12-24 16:23:50 +03:00
Compare commits
46 Commits
dev-mcsont
...
dev-mcsont
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf06d942b8 | ||
|
|
83d3cc76f3 | ||
|
|
89574055f7 | ||
|
|
7831a65091 | ||
|
|
15a97cc610 | ||
|
|
3f1c63c812 | ||
|
|
dd52721b68 | ||
|
|
7f125c1116 | ||
|
|
5b04eda93f | ||
|
|
77c31d0c39 | ||
|
|
baf320455b | ||
|
|
bb4d3fa7a7 | ||
|
|
3e18b101a0 | ||
|
|
df190dcfa5 | ||
|
|
e149fe7fdf | ||
|
|
77605457e7 | ||
|
|
0d5b1294f0 | ||
|
|
097d14e64e | ||
|
|
17196103e0 | ||
|
|
ccfc09f79b | ||
|
|
9a3b64e81a | ||
|
|
c2e88d1107 | ||
|
|
406d8ff332 | ||
|
|
00348c0a63 | ||
|
|
ccb8da404d | ||
|
|
28e54032c0 | ||
|
|
bca55c9b20 | ||
|
|
f104a81932 | ||
|
|
3720eb63be | ||
|
|
8b5525383f | ||
|
|
f58c634103 | ||
|
|
175119fdcd | ||
|
|
33a8a2febf | ||
|
|
f32f0bd2a7 | ||
|
|
99237f0908 | ||
|
|
099466939e | ||
|
|
b3c81d02c9 | ||
|
|
5886ff64eb | ||
|
|
a4418b34c1 | ||
|
|
65ec00ce20 | ||
|
|
6e1e0e8813 | ||
|
|
4159680a0e | ||
|
|
76cff10a73 | ||
|
|
1af2ab10d0 | ||
|
|
729f489009 | ||
|
|
5d76bdcdbd |
@@ -1 +1 @@
|
||||
1.02.110-git (2015-09-22)
|
||||
1.02.111-git (2015-10-30)
|
||||
|
||||
16
WHATS_NEW
16
WHATS_NEW
@@ -1,5 +1,17 @@
|
||||
Version 2.02.133 -
|
||||
======================================
|
||||
Version 2.02.134 -
|
||||
====================================
|
||||
|
||||
Version 2.02.133 - 30th October 2015
|
||||
====================================
|
||||
Support repeated -o|--options for reporting commands.
|
||||
Support -o- and -o# for reporting commands to remove and compact fields.
|
||||
Fix missing PVs from pvs output if vgremove is run concurrently.
|
||||
Remove unwanted error message when running pvs/vgs/lvs and vgremove at once.
|
||||
Check newly created VG's metadata do not overlap in metadata ring buffer.
|
||||
Check metadata area size is at least the minimum size defined for the format.
|
||||
Thin pool targets uses low_water_mark from profile.
|
||||
Dropping 'yet' from error of unsupported thick snapshot of snapshots.
|
||||
Do not support unpartitioned DASD devices with CDL formatted with pvcreate.
|
||||
For thins use flush for suspend only when volume size is reduced.
|
||||
Enable code which detects the need of flush during suspend.
|
||||
Ensure --use-policy will resize volume to fit below threshold.
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
Version 1.02.110 -
|
||||
======================================
|
||||
Version 1.02.111 -
|
||||
====================================
|
||||
|
||||
Version 1.02.110 - 30th October 2015
|
||||
====================================
|
||||
Disable thin monitoring plugin when it fails too often (>10 times).
|
||||
Fix/restore parsing of empty field '-' when processing dmeventd event.
|
||||
Enhance dm_tree_node_size_changed() to recognize size reduction.
|
||||
Support exit on idle for dmenventd (1 hour).
|
||||
Add support to allow unmonitor device from plugin itself.
|
||||
|
||||
@@ -473,34 +473,48 @@ static int _pthread_create_smallstack(pthread_t *t, void *(*fun)(void *), void *
|
||||
|
||||
/*
|
||||
* Fetch a string off src and duplicate it into *ptr.
|
||||
* Pay attention to zero-length strings.
|
||||
* Pay attention to zero-length and 'empty' strings ('-').
|
||||
*/
|
||||
/* FIXME? move to libdevmapper to share with the client lib (need to
|
||||
make delimiter a parameter then) */
|
||||
static int _fetch_string(char **ptr, char **src, const int delimiter)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret = 1;
|
||||
char *p;
|
||||
size_t len;
|
||||
*ptr = NULL; /* Empty field returns NULL pointer */
|
||||
|
||||
if ((p = strchr(*src, delimiter)))
|
||||
*p = 0;
|
||||
|
||||
if ((*ptr = dm_strdup(*src))) {
|
||||
if ((len = strlen(*ptr)))
|
||||
*src += len;
|
||||
else {
|
||||
dm_free(*ptr);
|
||||
*ptr = NULL;
|
||||
if ((*src)[0] == '-') {
|
||||
/* Could be empty field '-', handle without allocation */
|
||||
if ((*src)[1] == '\0') {
|
||||
(*src)++;
|
||||
goto out;
|
||||
} else if ((*src)[1] == delimiter) {
|
||||
(*src) += 2;
|
||||
goto out;
|
||||
}
|
||||
|
||||
(*src)++;
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
if (p)
|
||||
*p = delimiter;
|
||||
|
||||
if ((p = strchr(*src, delimiter))) {
|
||||
if (*src < p) {
|
||||
*p = 0; /* Temporary exit with \0 */
|
||||
if (!(*ptr = dm_strdup(*src))) {
|
||||
log_error("Failed to fetch item %s.", *src);
|
||||
ret = 0; /* Allocation fail */
|
||||
}
|
||||
*p = delimiter;
|
||||
*src = p;
|
||||
}
|
||||
(*src)++; /* Skip delmiter, next field */
|
||||
} else if ((len = strlen(*src))) {
|
||||
/* No delimiter, item ends with '\0' */
|
||||
if (!(*ptr = dm_strdup(*src))) {
|
||||
log_error("Failed to fetch last item %s.", *src);
|
||||
ret = 0; /* Fail */
|
||||
}
|
||||
*src += len + 1;
|
||||
}
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <stdarg.h>
|
||||
#include <pthread.h>
|
||||
|
||||
/* TODO - move this mountinfo code into library to be reusable */
|
||||
#ifdef __linux__
|
||||
@@ -36,6 +37,8 @@
|
||||
|
||||
#define UMOUNT_COMMAND "/bin/umount"
|
||||
|
||||
#define MAX_FAILS (10)
|
||||
|
||||
#define THIN_DEBUG 0
|
||||
|
||||
struct dso_state {
|
||||
@@ -44,6 +47,7 @@ struct dso_state {
|
||||
int data_percent_check;
|
||||
uint64_t known_metadata_size;
|
||||
uint64_t known_data_size;
|
||||
unsigned fails;
|
||||
char cmd_str[1024];
|
||||
};
|
||||
|
||||
@@ -157,7 +161,7 @@ static int _run(const char *cmd, ...)
|
||||
argv = alloca(sizeof(const char *) * (argc + 1));
|
||||
|
||||
argv[0] = cmd;
|
||||
va_start(ap, cmd);
|
||||
va_start(ap, cmd);
|
||||
while ((argv[++i] = va_arg(ap, const char *)));
|
||||
va_end(ap);
|
||||
|
||||
@@ -245,7 +249,9 @@ static void _use_policy(struct dm_task *dmt, struct dso_state *state)
|
||||
log_error("Failed to extend thin pool %s.",
|
||||
dm_task_get_name(dmt));
|
||||
_umount(dmt);
|
||||
}
|
||||
state->fails++;
|
||||
} else
|
||||
state->fails = 0;
|
||||
}
|
||||
|
||||
void process_event(struct dm_task *dmt,
|
||||
@@ -270,7 +276,7 @@ void process_event(struct dm_task *dmt,
|
||||
if (event & DM_EVENT_DEVICE_ERROR) {
|
||||
/* Error -> no need to check and do instant resize */
|
||||
_use_policy(dmt, state);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
dm_get_next_target(dmt, next, &start, &length, &target_type, ¶ms);
|
||||
@@ -338,6 +344,13 @@ void process_event(struct dm_task *dmt,
|
||||
out:
|
||||
if (tps)
|
||||
dm_pool_free(state->mem, tps);
|
||||
|
||||
if (state->fails >= MAX_FAILS) {
|
||||
log_warn("WARNING: Dropping monitoring of %s. "
|
||||
"lvm2 command fails too often (%u times in raw).",
|
||||
device, state->fails);
|
||||
pthread_kill(pthread_self(), SIGALRM);
|
||||
}
|
||||
}
|
||||
|
||||
int register_device(const char *device,
|
||||
|
||||
@@ -62,6 +62,7 @@ SOURCES =\
|
||||
device/dev-swap.c \
|
||||
device/dev-type.c \
|
||||
device/dev-luks.c \
|
||||
device/dev-dasd.c \
|
||||
display/display.c \
|
||||
error/errseg.c \
|
||||
unknown/unknown.c \
|
||||
|
||||
2
lib/cache/lvmetad.c
vendored
2
lib/cache/lvmetad.c
vendored
@@ -1331,7 +1331,7 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
|
||||
log_warn("WARNING: Ignoring obsolete format of metadata (%s) on device %s when using lvmetad",
|
||||
baton.fid->fmt->name, dev_name(dev));
|
||||
else
|
||||
log_error("WARNING: Ignoring obsolete format of metadata (%s) on device %s when using lvmetad",
|
||||
log_error("Ignoring obsolete format of metadata (%s) on device %s when using lvmetad.",
|
||||
baton.fid->fmt->name, dev_name(dev));
|
||||
lvmcache_fmt(info)->ops->destroy_instance(baton.fid);
|
||||
|
||||
|
||||
@@ -16,11 +16,14 @@
|
||||
#include "lib.h"
|
||||
#include "str_list.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
struct dm_list *str_list_create(struct dm_pool *mem)
|
||||
{
|
||||
struct dm_list *sl;
|
||||
|
||||
if (!(sl = dm_pool_alloc(mem, sizeof(struct dm_list)))) {
|
||||
if (!(sl = mem ? dm_pool_alloc(mem, sizeof(struct dm_list))
|
||||
: dm_malloc(sizeof(struct dm_list)))) {
|
||||
log_errno(ENOMEM, "str_list allocation failed");
|
||||
return NULL;
|
||||
}
|
||||
@@ -37,7 +40,8 @@ static int _str_list_add_no_dup_check(struct dm_pool *mem, struct dm_list *sll,
|
||||
if (!str)
|
||||
return_0;
|
||||
|
||||
if (!(sln = dm_pool_alloc(mem, sizeof(*sln))))
|
||||
if (!(sln = mem ? dm_pool_alloc(mem, sizeof(*sln))
|
||||
: dm_malloc(sizeof(*sln))))
|
||||
return_0;
|
||||
|
||||
sln->str = str;
|
||||
@@ -158,3 +162,101 @@ int str_list_lists_equal(const struct dm_list *sll, const struct dm_list *sll2)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *str_list_to_str(struct dm_pool *mem, const struct dm_list *list,
|
||||
const char *delim)
|
||||
{
|
||||
size_t delim_len = strlen(delim);
|
||||
unsigned list_size = dm_list_size(list);
|
||||
struct dm_str_list *sl;
|
||||
char *str, *p;
|
||||
size_t len = 0;
|
||||
unsigned i = 0;
|
||||
|
||||
dm_list_iterate_items(sl, list)
|
||||
len += strlen(sl->str);
|
||||
if (list_size > 1)
|
||||
len += ((list_size - 1) * delim_len);
|
||||
|
||||
str = mem ? dm_pool_alloc(mem, len+1) : dm_malloc(len+1);
|
||||
if (!str) {
|
||||
log_error("str_list_to_str: string allocation failed.");
|
||||
return NULL;
|
||||
}
|
||||
str[len] = '\0';
|
||||
p = str;
|
||||
|
||||
dm_list_iterate_items(sl, list) {
|
||||
len = strlen(sl->str);
|
||||
memcpy(p, sl->str, len);
|
||||
p += len;
|
||||
|
||||
if (++i != list_size) {
|
||||
memcpy(p, delim, delim_len);
|
||||
p += delim_len;
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
struct dm_list *str_to_str_list(struct dm_pool *mem, const char *str,
|
||||
const char *delim, int ignore_multiple_delim)
|
||||
{
|
||||
size_t delim_len = strlen(delim);
|
||||
struct dm_list *list;
|
||||
const char *p1, *p2, *next;
|
||||
char *str_item;
|
||||
size_t len;
|
||||
|
||||
if (!(list = str_list_create(mem))) {
|
||||
log_error("str_to_str_list: string list allocation failed.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p1 = p2 = str;
|
||||
while (*p1) {
|
||||
if (!(p2 = strstr(p1, delim)))
|
||||
next = p2 = str + strlen(str);
|
||||
else
|
||||
next = p2 + delim_len;
|
||||
|
||||
len = p2 - p1;
|
||||
str_item = mem ? dm_pool_alloc(mem, len+1) : dm_malloc(len+1);
|
||||
if (!str_item) {
|
||||
log_error("str_to_str_list: string list item allocation failed.");
|
||||
goto bad;
|
||||
}
|
||||
memcpy(str_item, p1, len);
|
||||
str_item[len] = '\0';
|
||||
|
||||
if (!str_list_add_no_dup_check(mem, list, str_item))
|
||||
goto_bad;
|
||||
|
||||
if (ignore_multiple_delim) {
|
||||
while (!strncmp(next, delim, delim_len))
|
||||
next += delim_len;
|
||||
}
|
||||
|
||||
p1 = next;
|
||||
}
|
||||
|
||||
return list;
|
||||
bad:
|
||||
if (mem)
|
||||
dm_pool_free(mem, list);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void str_list_destroy(struct dm_list *list, int deallocate_strings)
|
||||
{
|
||||
struct dm_str_list *sl, *tmp_sl;
|
||||
|
||||
dm_list_iterate_items_safe(sl, tmp_sl, list) {
|
||||
dm_list_del(&sl->list);
|
||||
if (deallocate_strings)
|
||||
dm_free((char *)sl->str);
|
||||
dm_free(sl);
|
||||
}
|
||||
dm_free(list);
|
||||
}
|
||||
|
||||
@@ -30,5 +30,9 @@ int str_list_match_list(const struct dm_list *sll, const struct dm_list *sll2, c
|
||||
int str_list_lists_equal(const struct dm_list *sll, const struct dm_list *sll2);
|
||||
int str_list_dup(struct dm_pool *mem, struct dm_list *sllnew,
|
||||
const struct dm_list *sllold);
|
||||
char *str_list_to_str(struct dm_pool *mem, const struct dm_list *list, const char *delim);
|
||||
struct dm_list *str_to_str_list(struct dm_pool *mem, const char *str, const char *delim, int ignore_multiple_delim);
|
||||
/* Only for lists which were *not* allocated from the mem pool! */
|
||||
void str_list_destroy(struct dm_list *list, int deallocate_strings);
|
||||
|
||||
#endif
|
||||
|
||||
111
lib/device/dev-dasd.c
Normal file
111
lib/device/dev-dasd.c
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Copyright (C) 2015 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
|
||||
*/
|
||||
|
||||
#include "lib.h"
|
||||
#include "metadata.h"
|
||||
#include "dev-type.h"
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
/*
|
||||
* Interface taken from kernel header arch/s390/include/uapi/asm/dasd.h
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
|
||||
* Copyright IBM Corp. 1999, 2000
|
||||
* EMC Symmetrix ioctl Copyright EMC Corporation, 2008
|
||||
* Author.........: Nigel Hislop <hislop_nigel@emc.com>
|
||||
*/
|
||||
|
||||
#define DASD_IOCTL_LETTER 'D'
|
||||
#define DASD_API_VERSION 6
|
||||
|
||||
/*
|
||||
* struct dasd_information2_t
|
||||
* represents any data about the device, which is visible to userspace.
|
||||
* including foramt and featueres.
|
||||
*/
|
||||
typedef struct dasd_information2_t {
|
||||
unsigned int devno; /* S/390 devno */
|
||||
unsigned int real_devno; /* for aliases */
|
||||
unsigned int schid; /* S/390 subchannel identifier */
|
||||
unsigned int cu_type : 16; /* from SenseID */
|
||||
unsigned int cu_model : 8; /* from SenseID */
|
||||
unsigned int dev_type : 16; /* from SenseID */
|
||||
unsigned int dev_model : 8; /* from SenseID */
|
||||
unsigned int open_count;
|
||||
unsigned int req_queue_len;
|
||||
unsigned int chanq_len; /* length of chanq */
|
||||
char type[4]; /* from discipline.name, 'none' for unknown */
|
||||
unsigned int status; /* current device level */
|
||||
unsigned int label_block; /* where to find the VOLSER */
|
||||
unsigned int FBA_layout; /* fixed block size (like AIXVOL) */
|
||||
unsigned int characteristics_size;
|
||||
unsigned int confdata_size;
|
||||
char characteristics[64]; /* from read_device_characteristics */
|
||||
char configuration_data[256]; /* from read_configuration_data */
|
||||
unsigned int format; /* format info like formatted/cdl/ldl/... */
|
||||
unsigned int features; /* dasd features like 'ro',... */
|
||||
unsigned int reserved0; /* reserved for further use ,... */
|
||||
unsigned int reserved1; /* reserved for further use ,... */
|
||||
unsigned int reserved2; /* reserved for further use ,... */
|
||||
unsigned int reserved3; /* reserved for further use ,... */
|
||||
unsigned int reserved4; /* reserved for further use ,... */
|
||||
unsigned int reserved5; /* reserved for further use ,... */
|
||||
unsigned int reserved6; /* reserved for further use ,... */
|
||||
unsigned int reserved7; /* reserved for further use ,... */
|
||||
} dasd_information2_t;
|
||||
|
||||
#define DASD_FORMAT_CDL 2
|
||||
|
||||
/* Get information on a dasd device (enhanced) */
|
||||
#define BIODASDINFO2 _IOR(DASD_IOCTL_LETTER,3,dasd_information2_t)
|
||||
|
||||
/*
|
||||
* End of included interface.
|
||||
*/
|
||||
|
||||
int dasd_is_cdl_formatted(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
dasd_information2_t dasd_info2;
|
||||
|
||||
if (!dev_open_readonly(dev))
|
||||
return_0;
|
||||
|
||||
if (ioctl(dev->fd, BIODASDINFO2, &dasd_info2)) {
|
||||
log_sys_error("ioctl BIODASDINFO2", dev_name(dev));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (dasd_info2.format == DASD_FORMAT_CDL)
|
||||
ret = 1;
|
||||
|
||||
out:
|
||||
if (!dev_close(dev))
|
||||
stack;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int dasd_is_cdl_formatted(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -363,7 +363,7 @@ static int _native_dev_is_partitioned(struct dev_types *dt, struct device *dev)
|
||||
return 0;
|
||||
|
||||
/* Unpartitioned DASD devices are not supported. */
|
||||
if (MAJOR(dev->dev) == dt->dasd_major)
|
||||
if ((MAJOR(dev->dev) == dt->dasd_major) && dasd_is_cdl_formatted(dev))
|
||||
return 1;
|
||||
|
||||
if (!dev_open_readonly_quiet(dev)) {
|
||||
|
||||
@@ -59,6 +59,7 @@ int major_is_scsi_device(struct dev_types *dt, int major);
|
||||
int dev_is_md(struct device *dev, uint64_t *sb);
|
||||
int dev_is_swap(struct device *dev, uint64_t *signature);
|
||||
int dev_is_luks(struct device *dev, uint64_t *signature);
|
||||
int dasd_is_cdl_formatted(struct device *dev);
|
||||
|
||||
/* Signature wiping. */
|
||||
#define TYPE_LVM1_MEMBER 0x001
|
||||
|
||||
@@ -654,12 +654,9 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
|
||||
|
||||
if ((new_wrap && old_wrap) ||
|
||||
(rlocn && (new_wrap || old_wrap) && (new_end > rlocn->offset)) ||
|
||||
(mdac->rlocn.size >= mdah->size)) {
|
||||
log_error("VG %s metadata too large: size of metadata to write "
|
||||
"is %" PRIu64 " bytes while PV metadata area size "
|
||||
"on %s is %" PRIu64 " bytes.",
|
||||
vg->name, mdac->rlocn.size,
|
||||
dev_name(mdac->area.dev), mdah->size);
|
||||
(MDA_HEADER_SIZE + (rlocn ? rlocn->size : 0) + mdac->rlocn.size >= mdah->size)) {
|
||||
log_error("VG %s metadata too large for circular buffer",
|
||||
vg->name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -2149,7 +2146,6 @@ static int _text_pv_add_metadata_area(const struct format_type *fmt,
|
||||
goto bad;
|
||||
}
|
||||
/* Otherwise, give up and take any usable space. */
|
||||
/* FIXME: We should probably check for some minimum MDA size here. */
|
||||
else
|
||||
mda_size = limit - mda_start;
|
||||
|
||||
@@ -2246,6 +2242,12 @@ static int _text_pv_add_metadata_area(const struct format_type *fmt,
|
||||
mda_size, limit_name, limit);
|
||||
|
||||
if (mda_size) {
|
||||
if (mda_size < MDA_SIZE_MIN) {
|
||||
log_error("Metadata area size too small: %" PRIu64" bytes. "
|
||||
"It must be at least %u bytes.", mda_size, MDA_SIZE_MIN);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
/* Wipe metadata area with zeroes. */
|
||||
if (!dev_set((struct device *) pv->dev, mda_start,
|
||||
(size_t) ((mda_size > wipe_size) ?
|
||||
|
||||
@@ -7388,8 +7388,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
|
||||
first_seg(lv)->chunk_size = lp->chunk_size;
|
||||
first_seg(lv)->zero_new_blocks = lp->zero ? 1 : 0;
|
||||
first_seg(lv)->discards = lp->discards;
|
||||
/* FIXME: use lowwatermark via lvm.conf global for all thinpools ? */
|
||||
first_seg(lv)->low_water_mark = 0;
|
||||
if (!recalculate_pool_chunk_size_with_dev_hints(lv, lp->passed_args,
|
||||
lp->thin_chunk_size_calc_policy)) {
|
||||
stack;
|
||||
|
||||
@@ -454,7 +454,6 @@ struct lv_segment {
|
||||
struct lv_segment_area *meta_areas; /* For RAID */
|
||||
struct logical_volume *metadata_lv; /* For thin_pool */
|
||||
uint64_t transaction_id; /* For thin_pool, thin */
|
||||
uint64_t low_water_mark; /* For thin_pool */
|
||||
unsigned zero_new_blocks; /* For thin_pool */
|
||||
thin_discards_t discards; /* For thin_pool */
|
||||
struct dm_list thin_messages; /* For thin_pool */
|
||||
|
||||
@@ -216,7 +216,7 @@ int thin_pool_feature_supported(const struct logical_volume *lv, int feature)
|
||||
int pool_below_threshold(const struct lv_segment *pool_seg)
|
||||
{
|
||||
dm_percent_t percent;
|
||||
int threshold = DM_PERCENT_1 *
|
||||
dm_percent_t threshold = DM_PERCENT_1 *
|
||||
find_config_tree_int(pool_seg->lv->vg->cmd, activation_thin_pool_autoextend_threshold_CFG,
|
||||
lv_config_profile(pool_seg->lv));
|
||||
|
||||
|
||||
@@ -3396,6 +3396,21 @@ void *report_init_for_selection(struct cmd_context *cmd,
|
||||
cmd);
|
||||
}
|
||||
|
||||
const char *report_get_field_prefix(report_type_t report_type_id)
|
||||
{
|
||||
const struct dm_report_object_type *report_types, *report_type;
|
||||
|
||||
report_types = report_type_id & DEVTYPES ? _devtypes_report_types
|
||||
: _report_types;
|
||||
|
||||
for (report_type = report_types; report_type->id; report_type++) {
|
||||
if (report_type_id & report_type->id)
|
||||
return report_type->prefix;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a row of data for an object
|
||||
*/
|
||||
|
||||
@@ -71,6 +71,7 @@ void *report_init(struct cmd_context *cmd, const char *format, const char *keys,
|
||||
int quoted, int columns_as_rows, const char *selection);
|
||||
void *report_init_for_selection(struct cmd_context *cmd, report_type_t *report_type,
|
||||
const char *selection);
|
||||
const char *report_get_field_prefix(report_type_t report_type);
|
||||
int report_for_selection(struct cmd_context *cmd,
|
||||
struct selection_handle *sh,
|
||||
struct physical_volume *pv,
|
||||
|
||||
@@ -118,10 +118,6 @@ static int _thin_pool_text_import(struct lv_segment *seg,
|
||||
else if (!set_pool_discards(&seg->discards, discards_str))
|
||||
return SEG_LOG_ERROR("Discards option unsupported for");
|
||||
|
||||
if (dm_config_has_node(sn, "low_water_mark") &&
|
||||
!dm_config_get_uint64(sn, "low_water_mark", &seg->low_water_mark))
|
||||
return SEG_LOG_ERROR("Could not read low_water_mark");
|
||||
|
||||
if ((seg->chunk_size < DM_THIN_MIN_DATA_BLOCK_SIZE) ||
|
||||
(seg->chunk_size > DM_THIN_MAX_DATA_BLOCK_SIZE))
|
||||
return SEG_LOG_ERROR("Unsupported value %u for chunk_size",
|
||||
@@ -169,9 +165,6 @@ static int _thin_pool_text_export(const struct lv_segment *seg, struct formatter
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (seg->low_water_mark)
|
||||
outf(f, "low_water_mark = %" PRIu64, seg->low_water_mark);
|
||||
|
||||
if (seg->zero_new_blocks)
|
||||
outf(f, "zero_new_blocks = 1");
|
||||
|
||||
@@ -266,6 +259,8 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
||||
struct lvinfo info;
|
||||
uint64_t transaction_id = 0;
|
||||
unsigned attr;
|
||||
uint64_t low_water_mark;
|
||||
int threshold;
|
||||
|
||||
if (!_thin_target_present(cmd, NULL, &attr))
|
||||
return_0;
|
||||
@@ -277,27 +272,37 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
||||
|
||||
if (!(attr & THIN_FEATURE_BLOCK_SIZE) &&
|
||||
(seg->chunk_size & (seg->chunk_size - 1))) {
|
||||
log_error("Thin pool target does not support %uKiB chunk size "
|
||||
"(needs kernel >= 3.6).", seg->chunk_size / 2);
|
||||
log_error("Thin pool target does not support %s chunk size (needs"
|
||||
" kernel >= 3.6).", display_size(cmd, seg->chunk_size));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(metadata_dlid = build_dm_uuid(mem, seg->metadata_lv, NULL))) {
|
||||
log_error("Failed to build uuid for metadata LV %s.",
|
||||
seg->metadata_lv->name);
|
||||
display_lvname(seg->metadata_lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(pool_dlid = build_dm_uuid(mem, seg_lv(seg, 0), NULL))) {
|
||||
log_error("Failed to build uuid for pool LV %s.",
|
||||
seg_lv(seg, 0)->name);
|
||||
display_lvname(seg_lv(seg, 0)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
threshold = find_config_tree_int(seg->lv->vg->cmd,
|
||||
activation_thin_pool_autoextend_threshold_CFG,
|
||||
lv_config_profile(seg->lv));
|
||||
if (threshold < 50)
|
||||
threshold = 50;
|
||||
if (threshold < 100)
|
||||
low_water_mark = (len * threshold + 99) / 100;
|
||||
else
|
||||
low_water_mark = len;
|
||||
|
||||
if (!dm_tree_node_add_thin_pool_target(node, len,
|
||||
seg->transaction_id,
|
||||
metadata_dlid, pool_dlid,
|
||||
seg->chunk_size, seg->low_water_mark,
|
||||
seg->chunk_size, low_water_mark,
|
||||
seg->zero_new_blocks ? 0 : 1))
|
||||
return_0;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ lvdisplay \(em display attributes of a logical volume
|
||||
.RB [ \-\-noheadings ]
|
||||
.RB [ \-\-nosuffix ]
|
||||
.RB [ \-o | \-\-options
|
||||
.RI [ + ] Field [ ,Field ...]]
|
||||
.RI [ + | \- | # ] Field [ ,Field ...]]
|
||||
.RB [ \-O | \-\-sort
|
||||
.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...]]
|
||||
.RB [ \-P | \-\-partial ]
|
||||
|
||||
11
man/lvs.8.in
11
man/lvs.8.in
@@ -16,7 +16,7 @@ lvs \(em report information about logical volumes
|
||||
.RB [ \-\-noheadings ]
|
||||
.RB [ \-\-nosuffix ]
|
||||
.RB [ \-o | \-\-options
|
||||
.RI [ + ] Field [, Field ]]
|
||||
.RI [ + | \- | # ] Field [, Field ]]
|
||||
.RB [ \-O | \-\-sort
|
||||
.RI [ + | \- ] Key1 [,[ + | \- ] Key2 [,...]]]
|
||||
.RB [ \-P | \-\-partial ]
|
||||
@@ -76,8 +76,13 @@ Suppress the suffix on output sizes. Use with \fB\-\-units\fP
|
||||
(except h and H) if processing the output.
|
||||
.TP
|
||||
.BR \-o ", " \-\-options
|
||||
Comma-separated ordered list of columns. Precede the list with '\fI+\fP'
|
||||
to append to the default selection of columns instead of replacing it.
|
||||
Comma-separated ordered list of columns.
|
||||
.IP
|
||||
Precede the list with '\fI+\fP' to append to the current list
|
||||
of columns, '\fI-\fP' to remove from the current list of columns
|
||||
or '\fI#\fP' to compact given columns. The \fI\-o\fP option can
|
||||
be repeated, providing several lists. These lists are evaluated
|
||||
from left to right.
|
||||
.IP
|
||||
Use \fB\-o lv_all\fP to select all logical volume columns,
|
||||
and \fB\-o seg_all\fP
|
||||
|
||||
@@ -37,7 +37,7 @@ pvdisplay \- display attributes of a physical volume
|
||||
.RB [ \-\-noheadings ]
|
||||
.RB [ \-\-nosuffix ]
|
||||
.RB [ \-o | \-\-options
|
||||
.RI [ + ] Field [ ,Field ...]]
|
||||
.RI [ + | \- | # ] Field [ ,Field ...]]
|
||||
.RB [ \-O | \-\-sort
|
||||
.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...
|
||||
.RI ]]
|
||||
|
||||
11
man/pvs.8.in
11
man/pvs.8.in
@@ -16,7 +16,7 @@ pvs \(em report information about physical volumes
|
||||
.RB [ \-\-noheadings ]
|
||||
.RB [ \-\-nosuffix ]
|
||||
.RB [ \-o | \-\-options
|
||||
.RI [ + ] Field [ ,Field ...]]
|
||||
.RI [ + | \- | # ] Field [ ,Field ...]]
|
||||
.RB [ \-O | \-\-sort
|
||||
.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...]]
|
||||
.RB [ \-P | \-\-partial ]
|
||||
@@ -65,8 +65,13 @@ Suppress the suffix on output sizes. Use with \fB\-\-units\fP
|
||||
(except h and H) if processing the output.
|
||||
.TP
|
||||
.BR \-o ", " \-\-options
|
||||
Comma-separated ordered list of columns. Precede the list with '\fI+\fP'
|
||||
to append to the default selection of columns.
|
||||
Comma-separated ordered list of columns.
|
||||
.IP
|
||||
Precede the list with '\fI+\fP' to append to the current list
|
||||
of columns, '\fI-\fP' to remove from the current list of columns
|
||||
or '\fI#\fP' to compact given columns. The \fI\-o\fP option can
|
||||
be repeated, providing several lists. These lists are evaluated
|
||||
from left to right.
|
||||
.IP
|
||||
Use \fB-o pv_all\fP to select all physical volume columns,
|
||||
and \fB-o pvseg_all\fP to select all Physical Volume segment columns.
|
||||
|
||||
@@ -37,7 +37,7 @@ vgdisplay \(em display attributes of volume groups
|
||||
.RB [ \-\-noheadings ]
|
||||
.RB [ \-\-nosuffix ]
|
||||
.RB [ \-o|\-\-options
|
||||
.RI [ + ] Field1 [ ,Field2 ...]]
|
||||
.RI [ + | \- | # ] Field1 [ ,Field2 ...]]
|
||||
.RB [ \-O | \-\-sort
|
||||
.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...]]
|
||||
.RB [ \-P | \-\-partial ]
|
||||
|
||||
11
man/vgs.8.in
11
man/vgs.8.in
@@ -16,7 +16,7 @@ vgs \(em report information about volume groups
|
||||
.RB [ \-\-noheadings ]
|
||||
.RB [ \-\-nosuffix ]
|
||||
.RB [ \-o | \-\-options
|
||||
.RI [ + ] Field1 [ ,Field2 ...]]
|
||||
.RI [ + | \- | # ] Field1 [ ,Field2 ...]]
|
||||
.RB [ \-O | \-\-sort
|
||||
.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...]]
|
||||
.RB [ \-P | \-\-partial ]
|
||||
@@ -63,8 +63,13 @@ Suppress the suffix on output sizes. Use with \fB\-\-units\fP
|
||||
(except h and H) if processing the output.
|
||||
.TP
|
||||
.BR \-o ", " \-\-options
|
||||
Comma-separated ordered list of columns. Precede the list with '+' to append
|
||||
to the default selection of columns.
|
||||
Comma-separated ordered list of columns.
|
||||
.IP
|
||||
Precede the list with '\fI+\fP' to append to the current list
|
||||
of columns, '\fI-\fP' to remove from the current list of columns
|
||||
or '\fI#\fP' to compact given columns. The \fI\-o\fP option can
|
||||
be repeated, providing several lists. These lists are evaluated
|
||||
from left to right.
|
||||
.IP
|
||||
Use \fB\-o vg_all\fP to select all volume group columns.
|
||||
.IP
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
%with default-dm-run-dir %{_default_dm_run_dir}
|
||||
%with default-run-dir %{_default_run_dir}
|
||||
%with default-pid-dir %{_default_pid_dir}
|
||||
%with default-locking-dir %{_default_locking_dir}
|
||||
%with usrlibdir %{_libdir}
|
||||
%enableif 1 lvm1_fallback
|
||||
%enableif 1 fsadm
|
||||
%with pool internal
|
||||
%with user
|
||||
%with group
|
||||
%with device-uid 0
|
||||
%with device-gid 6
|
||||
%with device-mode 0660
|
||||
%enableif 1 pkgconfig
|
||||
%enableif 1 applib
|
||||
%enableif 1 cmdlib
|
||||
%enableif 1 dmeventd
|
||||
%enableif 1 write_install
|
||||
|
||||
%with udevdir %{_udevdir}
|
||||
%enableif %{enable_cmirror} cmirrord
|
||||
%enableif %{enable_udev} udev_sync
|
||||
@@ -11,28 +30,22 @@
|
||||
%enableif %{enable_lockd_dlm} lockd-dlm
|
||||
%enableif %{enable_lockd_sanlock} lockd-sanlock
|
||||
%endif
|
||||
%enableif %{enable_python} python-bindings
|
||||
%enableif %{enable_python} applib
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--with-default-dm-run-dir=%{_default_dm_run_dir} \
|
||||
--with-default-run-dir=%{_default_run_dir} \
|
||||
--with-default-pid-dir=%{_default_pid_dir} \
|
||||
--with-default-locking-dir=%{_default_locking_dir} \
|
||||
--with-usrlibdir=%{_libdir} \
|
||||
--enable-lvm1_fallback \
|
||||
--enable-fsadm \
|
||||
--with-pool=internal \
|
||||
--with-user= \
|
||||
--with-group= \
|
||||
--with-device-uid=0 \
|
||||
--with-device-gid=6 \
|
||||
--with-device-mode=0660 \
|
||||
--enable-pkgconfig \
|
||||
--enable-applib \
|
||||
--enable-cmdlib \
|
||||
--enable-dmeventd \
|
||||
--enable-write_install \
|
||||
%{configure_flags}
|
||||
|
||||
%if %{enable_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
pushd %{py3dir}
|
||||
%configure %{configure_flags} PYTHON=/usr/bin/python3 PYTHON_CONFIG=/usr/bin/python3-config
|
||||
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%configure %{configure_flags}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%{?extra_build_commands}
|
||||
@@ -50,6 +63,11 @@ make install_initscripts DESTDIR=$RPM_BUILD_ROOT
|
||||
%if %{enable_testsuite}
|
||||
make -C test install DESTDIR=$RPM_BUILD_ROOT
|
||||
%endif
|
||||
%if %{enable_python3}
|
||||
pushd %{py3dir}
|
||||
make -C python install DESTDIR=$RPM_BUILD_ROOT
|
||||
popd
|
||||
%endif
|
||||
|
||||
# when building an src.rpm from freestanding specfiles
|
||||
test -e %{_sourcedir}/source.inc || cp source.inc build.inc packages.inc macros.inc %{_sourcedir}
|
||||
|
||||
@@ -410,6 +410,60 @@ fi
|
||||
|
||||
%endif
|
||||
|
||||
##############################################################################
|
||||
# Python bindings
|
||||
##############################################################################
|
||||
%if %{enable_python}
|
||||
%package python-libs
|
||||
Summary: Python module to access LVM
|
||||
License: LGPLv2
|
||||
Group: Development/Libraries
|
||||
Provides: python-lvm = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description python-libs
|
||||
Python module to allow the creation and use of LVM
|
||||
logical volumes, physical volumes, and volume groups.
|
||||
|
||||
%files python-libs
|
||||
%{python_sitearch}/*
|
||||
%endif
|
||||
|
||||
%if %{enable_python3}
|
||||
%package python3-libs
|
||||
Summary: Python 3 module to access LVM
|
||||
License: LGPLv2
|
||||
Group: Development/Libraries
|
||||
Provides: python3-lvm = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
%description python3-libs
|
||||
Python 3 module to allow the creation and use of LVM
|
||||
logical volumes, physical volumes, and volume groups.
|
||||
|
||||
%files python3-libs
|
||||
%{python3_sitearch}/*
|
||||
%endif
|
||||
|
||||
##############################################################################
|
||||
# Testsuite subpackage
|
||||
##############################################################################
|
||||
%if %{enable_testsuite}
|
||||
%package testsuite
|
||||
Summary: LVM2 Testsuite
|
||||
License: LGPLv2
|
||||
Group: Development
|
||||
|
||||
%description testsuite
|
||||
An extensive functional testsuite for LVM2.
|
||||
|
||||
%files testsuite
|
||||
%defattr(-,root,root,-)
|
||||
%{_datadir}/lvm2-testsuite/
|
||||
%{_libexecdir}/lvm2-testsuite/
|
||||
%{_bindir}/lvm2-testsuite
|
||||
%endif
|
||||
|
||||
##############################################################################
|
||||
# Device-mapper subpackages
|
||||
##############################################################################
|
||||
@@ -571,18 +625,3 @@ the device-mapper event library.
|
||||
%{_includedir}/libdevmapper-event.h
|
||||
%{_libdir}/pkgconfig/devmapper-event.pc
|
||||
|
||||
%if %{enable_testsuite}
|
||||
%package testsuite
|
||||
Summary: LVM2 Testsuite
|
||||
License: LGPLv2
|
||||
Group: Development
|
||||
|
||||
%description testsuite
|
||||
An extensive functional testsuite for LVM2.
|
||||
|
||||
%files testsuite
|
||||
%defattr(-,root,root,-)
|
||||
%{_datadir}/lvm2-testsuite/
|
||||
%{_libexecdir}/lvm2-testsuite/
|
||||
%{_bindir}/lvm2-testsuite
|
||||
%endif
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
%global enable_profiling 0
|
||||
%global enable_testsuite 1
|
||||
%global enable_python 1
|
||||
# Off by default - <= does not work well with or:
|
||||
%global enable_python3 0
|
||||
%global enable_udev 1
|
||||
%global enable_systemd 1
|
||||
%global enable_cmirror 1
|
||||
@@ -65,6 +68,25 @@
|
||||
|
||||
##############################################################
|
||||
|
||||
%if %{rhel} == 5
|
||||
%global enable_python 0
|
||||
%endif
|
||||
|
||||
%if %{rhel} >= 8 || %{fedora} >= 20
|
||||
%global enable_python3 1
|
||||
%endif
|
||||
|
||||
%if %{enable_python}
|
||||
%global buildreq_python2_devel python2-devel
|
||||
%global buildreq_python_setuptools python-setuptools
|
||||
%endif
|
||||
%if %{enable_python3}
|
||||
%global buildreq_python3_devel python3-devel
|
||||
%global buildreq_python_setuptools python-setuptools
|
||||
%endif
|
||||
|
||||
##############################################################
|
||||
|
||||
%if %{fedora} == 16 || %{rhel} == 6
|
||||
%global enable_systemd 0
|
||||
|
||||
@@ -143,6 +165,9 @@ BuildRequires: pkgconfig
|
||||
%maybe BuildRequires: %{?buildreq_cluster}
|
||||
%maybe BuildRequires: %{?buildreq_lockd_dlm}
|
||||
%maybe BuildRequires: %{?buildreq_lockd_sanlock}
|
||||
%maybe BuildRequires: %{?buildreq_python2_devel}
|
||||
%maybe BuildRequires: %{?buildreq_python3_devel}
|
||||
%maybe BuildRequires: %{?buildreq_python_setuptools}
|
||||
|
||||
%description
|
||||
LVM2 includes all of the support for handling read/write operations on
|
||||
|
||||
@@ -270,7 +270,7 @@ lib/paths-installed: lib/paths-common
|
||||
$(RM) $@-t
|
||||
cat lib/paths-common > $@-t
|
||||
echo 'installed_testsuite=1' >> $@-t
|
||||
echo 'export PATH=@libexecdir@/lvm2-testsuite:@datadir@/lvm2-testsuite/lib:$$PATH' >> $@-t
|
||||
echo 'export PATH=@libexecdir@/lvm2-testsuite:@datadir@/lvm2-testsuite/lib:@datadir@/lvm2-testsuite/api:$$PATH' >> $@-t
|
||||
mv $@-t $@
|
||||
|
||||
lib/paths: lib/paths-common
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 1
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_devs 2
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
aux kernel_at_least 2 6 33 || skip
|
||||
|
||||
@@ -11,8 +11,13 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMETAD=1
|
||||
SKIP_WITH_CLVMD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_dmeventd
|
||||
|
||||
#
|
||||
# TODO:
|
||||
# lvm2app is not yet capable to respect many lvm.conf options
|
||||
@@ -25,20 +30,21 @@
|
||||
# gdb -ex r --args python FULL_PATH/lvm2/test/api/python_lvm_unit.py -v TestLvm.test_lv_active_inactive
|
||||
|
||||
#Locate the python binding library to use.
|
||||
python_lib=$(find $abs_top_builddir -name lvm.so)
|
||||
# Unable to test python bindings if library not available
|
||||
test -n "$python_lib" || skip
|
||||
if [[ -n $abs_top_builddir ]]; then
|
||||
python_lib=$(find $abs_top_builddir -name lvm.so)
|
||||
# Unable to test python bindings if library not available
|
||||
test -n "$python_lib" || skip "lvm2-python-libs not built"
|
||||
|
||||
test -e LOCAL_CLVMD && skip
|
||||
test -e LOCAL_LVMETAD && skip
|
||||
|
||||
aux prepare_dmeventd
|
||||
export PYTHONPATH=$(dirname $python_lib):$PYTHONPATH
|
||||
elif rpm -q lvm2-python-libs &>/dev/null; then
|
||||
true
|
||||
else
|
||||
skip "lvm2-python-libs neither built nor installed"
|
||||
fi
|
||||
|
||||
#If you change this change the unit test case too.
|
||||
aux prepare_pvs 6
|
||||
|
||||
export PYTHONPATH=$(dirname $python_lib):$PYTHONPATH
|
||||
|
||||
#Setup which devices the unit test can use.
|
||||
export PY_UNIT_PVS=$(cat DEVICES)
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 2
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
#include "configure.h"
|
||||
|
||||
/* Timeout for the whole test suite in hours */
|
||||
static const unsigned TEST_SUITE_TIMEOUT = 4;
|
||||
static const time_t TEST_SUITE_TIMEOUT = 4;
|
||||
|
||||
#ifndef BRICK_SHELLTEST_H
|
||||
#define BRICK_SHELLTEST_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2011-2012 Red Hat, Inc. All rights reserved.
|
||||
# Copyright (C) 2011-2015 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing to use,
|
||||
# modify, copy, or redistribute it subject to the terms and conditions
|
||||
@@ -9,6 +9,11 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
initskip() {
|
||||
test "$#" -eq 0 || echo "TEST SKIPPED: $@"
|
||||
exit 200
|
||||
}
|
||||
|
||||
# sanitize the environment
|
||||
LANG=C
|
||||
LC_ALL=C
|
||||
@@ -20,19 +25,22 @@ TESTNAME=${0##*/}
|
||||
PS4='#${BASH_SOURCE[0]##*/}:${LINENO}+ '
|
||||
export TESTNAME PS4
|
||||
|
||||
unset CDPATH
|
||||
|
||||
# grab some common utilities
|
||||
. lib/utils
|
||||
|
||||
if test -n "$LVM_TEST_FLAVOUR"; then
|
||||
. lib/flavour-$LVM_TEST_FLAVOUR
|
||||
fi
|
||||
|
||||
test -n "$SKIP_WITHOUT_CLVMD" && test "$LVM_TEST_LOCKING" -ne 3 && skip
|
||||
test -n "$SKIP_WITHOUT_LVMETAD" && test -z "$LVM_TEST_LVMETAD" && skip
|
||||
test -n "$SKIP_WITH_LVMPOLLD" && test -n "$LVM_TEST_LVMPOLLD" && skip
|
||||
test -n "$SKIP_WITHOUT_CLVMD" && test "$LVM_TEST_LOCKING" -ne 3 && initskip
|
||||
test -n "$SKIP_WITH_CLVMD" && test "$LVM_TEST_LOCKING" -eq 3 && initskip
|
||||
|
||||
test -n "$SKIP_WITHOUT_LVMETAD" && test -z "$LVM_TEST_LVMETAD" && initskip
|
||||
test -n "$SKIP_WITH_LVMETAD" && test -n "$LVM_TEST_LVMETAD" && initskip
|
||||
|
||||
test -n "$SKIP_WITH_LVMPOLLD" && test -n "$LVM_TEST_LVMPOLLD" && initskip
|
||||
|
||||
unset CDPATH
|
||||
|
||||
# grab some common utilities
|
||||
. lib/utils
|
||||
|
||||
TESTOLDPWD=$(pwd)
|
||||
COMMON_PREFIX="LVMTEST"
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
lvm version
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
# to improve code coverage
|
||||
#
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_pvs 5
|
||||
get_devs
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
# test support of thin discards
|
||||
#
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
#
|
||||
# Main
|
||||
#
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_dmeventd
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
flatten() {
|
||||
cat > flatten.config
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# Basic usage of zero target
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
which md5sum || skip
|
||||
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
test_description='Exercise fsadm filesystem resize'
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
aux prepare_vg 1 100
|
||||
|
||||
# set to "skip" to avoid testing given fs and test warning result
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 3 12
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
# tests functionality of lvs, pvs, vgs, *display tools
|
||||
#
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_devs 5
|
||||
get_devs
|
||||
|
||||
@@ -10,12 +10,11 @@
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
test_description='test some blocking / non-blocking multi-vg operations'
|
||||
SKIP_WITH_CLVMD=1
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
test -e LOCAL_CLVMD && skip
|
||||
|
||||
aux prepare_devs 3
|
||||
pvcreate "$dev1" "$dev2"
|
||||
vgcreate $vg "$dev1" "$dev2"
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
# Test parallel use of lvm commands and check locks aren't dropped
|
||||
# RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1049296
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
which mkfs.ext3 || skip
|
||||
which fsck || skip
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_cache 1 3 0 || skip
|
||||
aux prepare_vg 3
|
||||
|
||||
@@ -9,13 +9,12 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
# FIXME RESYNC doesn't work in cluster with exclusive activation
|
||||
# seriously broken!
|
||||
test -e LOCAL_CLVMD && skip
|
||||
SKIP_WITH_CLVMD=1
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_dmeventd
|
||||
aux prepare_vg 3
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_raid 1 3 2 || skip
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 4
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
# Writemostly has been in every version since the begining
|
||||
|
||||
@@ -13,8 +13,6 @@ TEST_RAID=raid10
|
||||
|
||||
. shell/lvchange-raid.sh
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
aux have_raid 1 5 2 || skip
|
||||
|
||||
run_types raid10 -m 1 -i 2 "$dev1" "$dev2" "$dev3" "$dev4"
|
||||
|
||||
@@ -13,8 +13,6 @@ TEST_RAID=raid456
|
||||
|
||||
. shell/lvchange-raid.sh
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
aux raid456_replace_works || skip
|
||||
aux have_raid 1 5 2 || skip
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# test activation race for raid's --syncaction check
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
# Proper mismatch count 1.5.2+ upstream, 1.3.5 < x < 1.4.0 in RHEL6
|
||||
aux have_raid 1 3 5 &&
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
aux have_thin 1 0 0 || skip
|
||||
|
||||
aux prepare_pvs 3
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# Exercise usage of stacked cache volume using raid volume
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_cache 1 3 0 || skip
|
||||
aux have_raid 1 0 0 || skip
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# Exercise conversion of cache and cache pool
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_cache 1 8 0 || skip
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# Exercise usage of stacked cache volume used in thin pool volumes
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_cache 1 3 0 || skip
|
||||
aux have_thin 1 0 0 || skip
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# Exercise conversion of cache and cache pool
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_cache 1 3 0 || skip
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ lvremove -ff $vg
|
||||
# to get synced
|
||||
lvcreate -l2 -n $lv1 $vg
|
||||
lvconvert --type mirror -i1 -m1 $vg/$lv1 | tee out
|
||||
grep -e "$vg/$lv1: Converted:" out || fail "Missing sync info in foreground mode"
|
||||
grep -e "$vg/$lv1: Converted:" out || die "Missing sync info in foreground mode"
|
||||
lvremove -ff $vg
|
||||
|
||||
vgremove -ff $vg
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_raid 1 3 0 || skip
|
||||
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# disable lvmetad logging as it bogs down test systems
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_LVMETAD_DEBUG_OPTS=${LVM_TEST_LVMETAD_DEBUG_OPTS-}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
get_image_pvs() {
|
||||
local d
|
||||
local images
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
get_image_pvs() {
|
||||
local d
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
get_image_pvs() {
|
||||
local d
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
which mkfs.ext2 || skip
|
||||
aux mirror_recovery_works || skip
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
which mkfs.ext3 || skip
|
||||
aux have_raid 1 3 0 || skip
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_raid 1 3 0 || skip
|
||||
aux raid456_replace_works || skip
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 5
|
||||
aux lvmconf 'allocation/maximise_cling = 0' \
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
|
||||
# Test repairing of broken thin pool on raid
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
aux have_thin 1 0 0 || skip
|
||||
aux have_raid 1 4 0 || skip
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
# Test repairing of broken thin pool metadata
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
which mkfs.ext2 || skip
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_dmeventd
|
||||
aux mirror_recovery_works || skip
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux mirror_recovery_works || skip
|
||||
aux prepare_vg 5
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
# Test various supported conversion of snapshot
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_pvs 1
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
# Test conversion to thin external origin
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
which mkfs.ext2 || skip
|
||||
which fsck || skip
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
aux have_thin 1 0 0 || skip
|
||||
aux have_raid 1 4 0 || skip
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
prepare_lvs() {
|
||||
lvremove -f $vg
|
||||
lvcreate -L10M -n $lv1 $vg
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# Exercise creation of cache and raids
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_cache 1 3 0 || skip
|
||||
aux have_raid 1 0 0 || skip
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
# Full CLI uses --type
|
||||
# Shorthand CLI uses -H | --cache
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux have_cache 1 3 0 || skip
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# 'Exercise some lvcreate diagnostics'
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
# FIXME update test to make something useful on <16T
|
||||
aux can_use_16T || skip
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
|
||||
# 'Exercise some lvcreate diagnostics'
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
# FIXME update test to make something useful on <16T
|
||||
aux can_use_16T || skip
|
||||
|
||||
aux have_raid 1 3 0 || skip
|
||||
|
||||
aux prepare_vg 5
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# 'Exercise some lvcreate diagnostics'
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
# FIXME update test to make something useful on <16T
|
||||
aux can_use_16T || skip
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 5 80
|
||||
aux lvmconf 'allocation/maximise_cling = 0' \
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 2
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# 'Exercise some lvcreate diagnostics'
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
cleanup_lvs() {
|
||||
lvremove -ff $vg
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_pvs 3
|
||||
aux lvmconf 'allocation/maximise_cling = 0' \
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
lv_devices() {
|
||||
test $3 -eq $(get lv_devices $1/$2 | wc -w)
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
lv_devices() {
|
||||
test $3 -eq $(get lv_devices $1/$2 | wc -w)
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 3
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
# 'Exercise signature wiping during lvcreate'
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
init_lv_() {
|
||||
mkswap "$DM_DEV_DIR/$vg/$lv1"
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_pvs
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
. lib/inittest
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
. lib/inittest
|
||||
|
||||
aux prepare_vg 9
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
# test currently needs to drop
|
||||
# 'return NULL' in _lv_create_an_lv after log_error("Can't create %s without using "
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
aux have_thin 1 0 0 || skip
|
||||
|
||||
# Test --poolmetadatasize range
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
# Test unaligned size of external origin and thin pool chunk size
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
which cmp || skip
|
||||
|
||||
#
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
# Test creation of thin snapshots using external origin
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
which mkfs.ext2 || skip
|
||||
which fsck || skip
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
# test support for non-power-of-2 thin chunk size
|
||||
#
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
#
|
||||
# Main
|
||||
#
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
check_lv_field_modules_()
|
||||
{
|
||||
mod=$1
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
# test currently needs to drop
|
||||
# 'return NULL' in _lv_create_an_lv after log_error("Can't create %s without using "
|
||||
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
export LVM_TEST_THIN_REPAIR_CMD=${LVM_TEST_THIN_REPAIR_CMD-/bin/false}
|
||||
|
||||
. lib/inittest
|
||||
|
||||
test -e LOCAL_LVMPOLLD && skip
|
||||
|
||||
check_lv_field_modules_()
|
||||
{
|
||||
mod=$1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user