Zdenek Kabelac
c06fdae782
Add helper function dmeventd_lvm2_command().
...
Since this code is in all plugins - create a common helper function.
2011-12-22 15:55:21 +00:00
Zdenek Kabelac
47bc4f5191
Updated documentation for dmeventd.
...
Update man page style.
Mention raid and thin plugins.
Update help text printed by command to match man page.
2011-12-22 15:50:38 +00:00
Zdenek Kabelac
52eae5fec2
Thin man page update
2011-12-21 13:58:38 +00:00
Zdenek Kabelac
d3e0fc4374
Thin update test case
...
Use thin-pool instead of thin_pool type.
2011-12-21 13:45:42 +00:00
Zdenek Kabelac
e906e9a160
Exported functions from thin plugin
2011-12-21 13:42:07 +00:00
Zdenek Kabelac
9e1ccf81c7
Drop extra stat before open of device
...
Since the !(dev->flags & DEV_REGULAR) code path just called
dev_name_confirmed() which has just called 'stat()' inside,
remove duplicate second stat() call here.
2011-12-21 13:24:24 +00:00
Zdenek Kabelac
88f8cbbb2e
Do not lstat common path prefix
...
When both path have identical prefix i.e. /dev/disk/by-id
skip 2 x lstat() for /dev /dev/disk /dev/disk/by-id
and directly lstat() only different part of the path.
Reduces amount of lstat calls on system with lots of devices.
2011-12-21 13:21:09 +00:00
Zdenek Kabelac
235028bf0f
Add common initialization code for struct device
...
Avoid duplicate code and add _dev_init() where all common
member values are initialized.
2011-12-21 13:17:54 +00:00
Zdenek Kabelac
93bb35fd2b
Always zalloc device structure
...
Since there is zalloc behind the macro, put 'z' into the name.
Make the 'use_malloc' code path also using zalloc() call,
so it also give zeroed area.
2011-12-21 13:14:54 +00:00
Zdenek Kabelac
d3923ece3d
Thin automatic policy based extension
2011-12-21 13:10:52 +00:00
Zdenek Kabelac
58044875a8
Thin add lv_thin_pool_percent
2011-12-21 13:10:05 +00:00
Zdenek Kabelac
88bf72d388
Thin add dev_manager_thin_pool_percent
...
dev manager function to read percent info from thin pool.
2011-12-21 13:09:33 +00:00
Zdenek Kabelac
59bcd5a1cf
Thin add dmeventd support
...
This is basic version with still few unresolved issue mainly in case,
when the pool resize is failing.
2011-12-21 13:08:11 +00:00
Zdenek Kabelac
b0f1e29335
Fix missing thread list manipulation
...
For manipulation with thread list to avoid race with timeout thread,
take also _timeout_mutex.
2011-12-21 13:03:06 +00:00
Zdenek Kabelac
1b9a70b6af
Check lv pointer for NULL before derefence.
2011-12-21 12:59:22 +00:00
Zdenek Kabelac
d0b237f46c
Thin remove unused code
2011-12-21 12:56:45 +00:00
Zdenek Kabelac
0857bdba0f
Thin move layer suffix into local static const
2011-12-21 12:55:22 +00:00
Zdenek Kabelac
a1e1561a91
Thin rename internal thin pool segment
...
Use matching name as kernel target - useful when function like
_percent is using this for validation.
2011-12-21 12:54:19 +00:00
Zdenek Kabelac
219fa54fd4
Add Thin API for parsing thin status
...
Add dm_get_status_thin_pool and dm_get_status_thin functions to
parse 'params' argument which is received via dm_get_next_target.
Returns filed structure allocated from given mempool.
2011-12-21 12:52:38 +00:00
Zdenek Kabelac
2b61011439
Allow empty strings for description and creation_host config fields
2011-12-21 12:49:00 +00:00
Zdenek Kabelac
6298758992
Add dm_config_find_str_allow_empty
...
Support empty string values.
2011-12-21 12:47:44 +00:00
Alasdair Kergon
14a165bf3f
Reinstate support for format1 snapshots, but issue deprecated warning.
...
I anticipate removing support for snapshots with lvm1-formatted metadata in a
future release.
2011-12-20 00:02:18 +00:00
Petr Rockai
a9ac026781
Add a unit test for config cascade (overlay). Needs expanding though.
2011-12-18 23:56:36 +00:00
Petr Rockai
27949793ae
Fix up lvmetad for the minor API change in dm_config_create.
2011-12-18 22:31:10 +00:00
Petr Rockai
e4de6d2ee0
Make a cleaner split between config tree and config file functionality. Move
...
the latter out of libdm.
2011-12-18 21:56:03 +00:00
Peter Rajnoha
dc1d4e2444
Use also normalized output for vgchange command in lvm2-monitor init script.
2011-12-16 11:42:56 +00:00
Zdenek Kabelac
6b864994f3
Cleanup test compile warning
...
Add some declaration and cast to cleanup gcc warnings.
Add missing dm_config_destroy() to cleanup pool leak report.
2011-12-13 12:08:42 +00:00
Petr Rockai
55f7917356
Fix a compiler warning.
2011-12-12 00:08:23 +00:00
Petr Rockai
2d4b741115
Use a more canonic regex escaping in the default lvm.conf file for testing.
2011-12-12 00:01:12 +00:00
Petr Rockai
bd7ec82f64
Move dm_config_write out of libdm, back to lib/config, as config_write.
2011-12-11 23:18:20 +00:00
Petr Rockai
b3d86a26a6
Add a shell test for config parsing and merging (lvm dumpconfig).
2011-12-11 23:14:37 +00:00
Petr Rockai
cd143dc253
Autoreconf.
2011-12-11 17:24:37 +00:00
Petr Rockai
b82e7a4fcd
Add a unit test for dm_config_clone_node.
2011-12-11 15:45:14 +00:00
Petr Rockai
7a17af253d
Start a rudimentary unit test for the dm_config_* interface.
2011-12-11 15:19:41 +00:00
Petr Rockai
6d6b259fc0
In the dm_config_*get_* functions, make the actual value retrieval optional
...
(useful for just checking that a given key is of a given type).
2011-12-11 15:18:32 +00:00
Petr Rockai
1b068ee26b
Use pkg-config to look for CUnit (needed for systems where it's not on the
...
standard include path).
2011-12-11 15:15:57 +00:00
Petr Rockai
c3c9864ed0
Nowadays, lvm-version.h is generated from lvm-version.h.in, and lives in the
...
build directory, not the source one -> fix test/shell/000-basic.sh.
2011-12-10 14:55:31 +00:00
Alasdair Kergon
9f2e5eee45
update FIXMEs
2011-12-10 00:47:23 +00:00
Alasdair Kergon
042d98b2d2
When dropping the VG metadata from the cache during a VG revert, we must
...
reset the 'precomitted' flag, just as we'd clear if we next did a 'commit'.
2011-12-08 23:18:00 +00:00
Alasdair Kergon
721119a388
Only use built-in stack size in clvmd - ignore lvm.conf.
2011-12-08 21:24:08 +00:00
Alasdair Kergon
4403e98eba
Test for LCK_CLUSTER_VG directly in args[0].
...
Drop unused LCK_LOCAL from debug msg.
2011-12-08 18:32:33 +00:00
Alasdair Kergon
5495ef8217
Don't pass LCK_LOCAL to clvmd - it's unused.
...
Pass LCK_CLUSTER_VG in args[0] instead of args[1].
2011-12-08 18:19:05 +00:00
Alasdair Kergon
a830fcbc34
Update comments. CLUSTER_VG belongs firmly to args[0].
2011-12-08 18:09:48 +00:00
Alasdair Kergon
58d9230ce2
reinstate !first_time check
...
(recovery from first_time failure would need different code)
2011-12-08 18:06:33 +00:00
Alasdair Kergon
aa8e6be045
tag uninit var
2011-12-08 18:00:03 +00:00
Peter Rajnoha
999263f18d
Fix lvm2-monitor init script to use normalized output when using vgs.
2011-12-07 12:29:41 +00:00
Jonathan Earl Brassow
49d06db518
Add policy based automated repair of RAID logical volumes
...
The RAID plug-in for dmeventd now calls 'lvconvert --repair' to address failures
of devices in a RAID logical volume. The action taken can be either to "warn"
or "allocate" a new device from any spares that may be available in the
volume group. The action is designated by setting 'raid_fault_policy' in
lvm.conf - the default being "warn".
2011-12-06 19:30:15 +00:00
Milan Broz
15af345602
Fix FIXME and comment :-)
2011-12-03 11:36:10 +00:00
Milan Broz
cbea400d06
Switch locking bits to match RHEL5 version.
...
FIXME:
There is a problem with overloaded bit 0x80 in locking flag,
the bit flags array must be extended or changed.
2011-12-03 11:34:35 +00:00
Alasdair Kergon
8344acfa2d
update old comment
2011-12-01 14:57:30 +00:00