1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

7093 Commits

Author SHA1 Message Date
Peter Rajnoha
842167eb17 libdm: introduce and use DEV_UUID macro
To automatically prefer mangled UUID over unmangled UUID. The same
logic that is already used for dm name mangling...
2012-10-10 17:16:15 +02:00
Peter Rajnoha
8dccbae35e libdm: unmangle dm UUIDs on dm ioctl return 2012-10-10 17:16:15 +02:00
Peter Rajnoha
7e71ecbaf6 libdm: add mangling support for dm_task_set_newuuid 2012-10-10 17:16:14 +02:00
Peter Rajnoha
a621795a3c libdm: add mangling support for dm_task_set_uuid
Also, add a new field to struct dm_task called "mangled_uuid" that
will store mangled form of uuid if it differs from original uuid.
2012-10-10 17:16:13 +02:00
Peter Rajnoha
12f5c3f726 libdm: add dm_task_get_uuid_mangled/unmangled
Just like we already have existing mangling support for
device-mapper names, we need exactly the same for device-mapper
UUIDs as their character whitelist is wider than what udev supports.

In case udev is used to create entries in /dev based on UUIDs
and these UUIDs contain characters not supported by udev,
we'll end up with incorrect /dev content for such devices.
So we need to mangle them to a form that is supported by udev.

The mangling used for UUIDs follows the mangling used for names
(that is already supported and used throughout). That means,
setting the name mangling mode via dm_set_name_mangling_mode
affects mangling used for UUIDs in exactly the same manner.
It would be useless to add a new and separate
dm_set_uuid_mangling_mode fn, we'll reuse existing interface.
2012-10-10 16:59:47 +02:00
Peter Rajnoha
b0f48b9533 libdm: refactor internal mangling functions
(un)mangle_name -> (un)mangle_string
check_multiple_mangled_name_allowed -> check_multiple_mangled_string_allowed

Just for clarity as the same functions will be reused to (un)mangle dm UUIDs.
2012-10-10 16:59:11 +02:00
Petr Rockai
f65754e6fc test: Check that lvmetad is refreshed correctly on restart. 2012-10-10 13:54:36 +02:00
Petr Rockai
71d718a4a4 lvmetad: Warn if lvmetad is running but disabled. 2012-10-10 13:54:29 +02:00
Petr Rockai
622fb968a2 lvmetad: Fix the -f pidfile (non-)creation logic. 2012-10-10 13:53:21 +02:00
Petr Rockai
6e523f01d0 test: Skip thin tests if thin support is configured out. 2012-10-10 00:20:22 +02:00
Petr Rockai
d760669e80 configure: Use pkg-config to look for valgrind/memcheck.h. 2012-10-09 20:54:41 +02:00
Petr Rockai
1997149263 lvmetad: Only create pidfile when running as a daemon (no -f).
Additionally, -f now makes -s mandatory, so the foreground (debugging) lvmetad
does not steal the system-wide socket accidentally.
2012-10-09 20:37:34 +02:00
Petr Rockai
329d10268c libdaemon-server: Do not create pidfile if NULL. 2012-10-09 20:37:34 +02:00
Petr Rockai
ff752c60df TEST: Avoid building unit tests with --disable-testing. 2012-10-09 20:37:34 +02:00
Zdenek Kabelac
439989adab test: more thin tests 2012-10-09 16:38:42 +02:00
Zdenek Kabelac
d7b3179669 test: move raid10 test into separate test files
New features tested in new files.
2012-10-09 16:38:12 +02:00
Zdenek Kabelac
93d7d3ed2c test: split raid tests
Separate original raid test and new raid10 test,
so the old could be tested on platforms without raid10 support.

Replace test-unfriendly `ls /dev/mapper`   with  dmsetup ls
2012-10-09 12:22:26 +02:00
Zdenek Kabelac
cdb7502e54 lvchange: do not start dmevent for resyn
If monitoring is disabled in lvm.conf, avoid its starting and preserve
DMEVENTD_MONITOR_IGNORE settings internally.
2012-10-09 12:22:26 +02:00
Petr Rockai
d414fe28fa example.conf: Warn about running lvmetad with use_lvmetad = 0. 2012-10-09 10:49:26 +02:00
Zdenek Kabelac
f0d34f383d test: ignore modprobe failure
If the system doesn't have modprobe but happens to have modules
loaded, allow version testing.
2012-10-09 10:37:37 +02:00
Petr Rockai
9ff2f1a3db TEST: Check that LVM1 VGs work when using lvmetad (BZ 863401). 2012-10-09 07:59:53 +02:00
Petr Rockai
06243be91b lvmetad: Fix a leak on duplicated PVs (same PVID, different device). 2012-10-09 01:38:58 +02:00
Petr Rockai
665b6b308e lvmetad: Fix a leak in an error path in update_metadata. 2012-10-08 23:52:44 +02:00
Petr Rockai
556d2c920a TEST: Give lvmetad a chance to exit gracefully upon teardown. 2012-10-08 20:35:29 +02:00
Petr Rockai
39468b73a3 TEST: Wait for lvmetad socket to appear in "aux prepare_lvmetad". 2012-10-08 20:35:29 +02:00
Petr Rockai
d5f2e6223f TEST: When INTERACTIVE=1, allow scripts to control a TTY. 2012-10-08 20:35:29 +02:00
Petr Rockai
138b4e1719 lvmetad: Fix a typo-induced leak in destroy_metadata_hashes. 2012-10-08 20:35:29 +02:00
Petr Rockai
a19a595343 libdaemon-client: Fix a memory leak in daemon_send. 2012-10-08 20:35:29 +02:00
Petr Rockai
4b4c2833d9 libdaemon-server: Optimize logging for a fast no-output path. 2012-10-08 20:35:29 +02:00
Petr Rockai
cc9c02fe68 libdaemon-server: Fix a memory leak in daemon_log_multi. 2012-10-08 20:35:29 +02:00
Peter Rajnoha
7a64fff948 systemd: remove ExecStartPost from lvm2-lvmetad.service.
The ExecStartPost with pvscan --cache in lvm2-lvmetad.service
is not needed now as this is called transparently within the
first LVM command that queries lvmetad.
2012-10-08 16:49:54 +02:00
Petr Rockai
ee4c75c8b7 dev-cache: Make dev_iter_create work with a NULL filter. 2012-10-08 16:18:10 +02:00
Zdenek Kabelac
3877ccfe1b test: move raid test to separate tests
Revert changes to origin lvcreate-large test and use separate
test scripts for raid  - so they can be properly skipped when
kernel doesn't support raid targets.
2012-10-08 14:49:21 +02:00
Petr Rockai
582a344cd6 lvmetad: In pvscan --cache, update the token directly. 2012-10-08 14:38:22 +02:00
Zdenek Kabelac
40182cbd82 test: check snap_percent returns invalid
For thin_volumes snap_percent is meaningless.
2012-10-08 12:16:54 +02:00
Zdenek Kabelac
ff13206c7e report: call snapshot percent with cow only
Ensure lv_snapshot_percent is used only with snapshot LVs.
2012-10-08 12:16:53 +02:00
Zdenek Kabelac
5b07bd3f91 lvconvert: disable convertion of thin to mirrors
For now this convertions is not supported, thus disabled.
The only supported conversion for now is to create mirrored thin pools
from mirrored devices.
2012-10-08 12:16:53 +02:00
Petr Rockai
6e312c56ad lvmetad: Avoid overlapping locks that could cause a deadlock (BZ 862253). 2012-10-08 09:12:51 +02:00
Petr Rockai
0dfafd77d4 TEST: Only run the pvscan --cache test with lvmetad active. 2012-10-08 07:23:13 +02:00
Petr Rockai
e702073235 TEST: Add lvmetad-pvscan-cache to check that pvscan --cache works. 2012-10-07 22:32:32 +02:00
Zdenek Kabelac
7f4f7f70ce test: lvm2api thin data_percent 2012-10-05 10:37:41 +02:00
Zdenek Kabelac
39f3c9de0b test: check data_percent is equal to snap_percent 2012-10-05 10:37:41 +02:00
Zdenek Kabelac
1da6c1495a lvm2api: fix data percent reporting for thin, snap
Use same logic for lvm2api as we use lvs reporting.
data_percent is meant to be superset for snap_percent.
2012-10-05 10:37:09 +02:00
Jonathan Brassow
9efd3fb604 RAID: Do not allow RAID LVs in a cluster volume group.
It would be possible to activate a RAID LV exclusively in a cluster
volume group, but for now we do not allow RAID LVs to exist in a
clustered volume group at all.  This has two components:
	1) Do not allow RAID LVs to be created in a clustered VG
	2) Do not allow changing a VG from single-machine to clustered
	   if there are RAID LVs present.
2012-10-03 15:52:54 -05:00
Zdenek Kabelac
a27650cc98 thin: lvconvert
Update code for lvconvert.
Change the lvconvert user interface a bit - now we require 2 specifiers
--thinpool   takes LV name for data device (and makes the name)
--poolmetadata  takes LV name for metadata device.

Fix type in thin help text -z -> -Z.

Supported is also new flag --discards for thinpools.
2012-10-03 15:13:33 +02:00
Zdenek Kabelac
e9f83147d5 thin: lvchange allows to change perms of thin snap
Thin snapshots are individual thin volumes so they can have its own
control for rw permissions.
2012-10-03 15:13:32 +02:00
Zdenek Kabelac
d442c3ef0c liblvm: insert layer with subvolume renames
Rename also subvolumes if we are inserting _tdata layer.
(Currently it breaks mirrors if it would be generic, needs fixing).
2012-10-03 15:13:32 +02:00
Zdenek Kabelac
4648d33d07 cleanup: add proper cast for force_t 2012-10-03 15:06:17 +02:00
Zdenek Kabelac
cf8e1a0093 thin: origin only suspend
Skip tree creating when used with origin_only flag.
2012-10-03 15:05:55 +02:00
Zdenek Kabelac
1946a45329 libdm: reset delay flag for devs used by thin
Patch clears the flag if thin pool is stacked over mirror.

Since thin pool could be used to stack device over mirrors,
it needs resume properly i.e. mirrors with corelog which are otherwise
unconditionally skipped (for pvmove functionality).
2012-10-03 15:04:41 +02:00