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

9015 Commits

Author SHA1 Message Date
Peter Rajnoha
4360fdf89c libdevmapper: add dm_units_to_factor for size unit parsing
Actually moving the existing code from LVM to libdm for reuse.
2014-04-28 10:25:43 +02:00
Petr Rockai
75d399800a NIX: Use VM images with the correct root module list. 2014-04-26 13:46:25 +02:00
Jonathan Brassow
3bce3ad52a test: Add the new vgsplit RAID test file forgotten in the last commit 2014-04-25 16:59:09 -05:00
Jonathan Brassow
c671be434c test: Move the RAID vgsplit test into a separate file 2014-04-25 16:57:43 -05:00
Jonathan Brassow
3c4234f825 vgsplit: Make RAID 4/5/6 fail cleanly when too few PV specified
While the 'raid1/10' segment types were being handled inadvertently
by '_move_mirrors()', the parity RAIDs were not being properly checked
to ensure that the user had specified all necessary PVs when moving
them.  Thus, internal errors were being triggered when only part of
a RAID LV was moved to the new VG.  I've added a new function,
'_move_raid()', which properly checks over any affected RAID LVs and
ensures that all the necessary PVs are being moved.
2014-04-25 16:24:50 -05:00
Jonathan Brassow
4dffb9fca9 test/vgsplit-operation.sh: Add vgsplit tests for RAID
vgsplit of RAID volumes was problematic because the metadata area
and data areas were always on the same PVs.  This problem is similar
to one that was just fixed for mirrors that had log and images sharing
a PV (commit 9ac858f).  We can now add RAID LVs to the tests for
vgsplit.

Note that there still seems to be an issue when specifying an
incomplete set of PVs when moving RAID LVs.
2014-04-25 16:22:40 -05:00
Jonathan Brassow
76687f4cac WHATS_NEW: Add message for commit 9ac858f
WHATS_NEW for commit:
9ac858f vgsplit: Make vgsplit work on mirrors with leg and log on same PV
2014-04-25 14:55:32 -05:00
Jonathan Brassow
9ac858fe6b vgsplit: Make vgsplit work on mirrors with leg and log on same PV
Given a named mirror LV, vgsplit will look for the PVs that compose it
and move them to a new VG.  It does this by first looking at the log
and then the legs.  If the log is on the same device as one of the mirror
images, a problem occurs.  This is because the PV is moved to the new VG
as the log is processed and thus cannot be found in the current VG when
the image is processed.  The solution is to check and see if the PV we are
looking for has already been moved to the new VG.  If so, it is not an
error.
2014-04-25 14:53:34 -05:00
Alasdair G Kergon
0ee9d59b48 test: configurable write timeout
Hard-coded 3 minutes is far too short when investigating problems.
2014-04-24 22:44:22 +01:00
Petr Rockai
448af9ff0b NIX: Fix failure mode for "make check". 2014-04-24 21:35:31 +02:00
Alasdair G Kergon
9676ee9ba9 test: Fix default.profile path.
It's a generated file.
2014-04-24 18:52:29 +01:00
Zdenek Kabelac
22037ee328 tests: fix creation of scsi debug
Use proper '||' test form to avoid unwanted test abort
on failure.
(i.e. running failing test profiles-thin.sh on a real /dev)
2014-04-24 14:42:27 +02:00
Peter Rajnoha
8e8a47143f config: use devices/ignore_suspended_devices=0 by default
ignore_suspended_devices=0 is already used in lvm.conf we distribute,
but it was still "1" in the code (so it was used when lvm.conf value
was not defined). It should be "0" too.
2014-04-24 12:12:39 +02:00
Peter Rajnoha
2b09def606 man: minor fixes in lvmetad man page
- better add reference to lvm dumpconfig --type default
   than stating that lvmetad is not enabled by default
 - substitute #DEFAULT_PID_DIR# with concrete value
2014-04-23 14:34:42 +02:00
Marian Csontos
795944f178 test: add lvresize tests
- test for Bug 1088153
- test lvextend does not reduce nor lvreduce extend LV
2014-04-22 12:53:30 +02:00
Zdenek Kabelac
7a1777302f cleanup: dmeventd simplify restart message parsing
Since we already check every characted in the message,
skip extra callback to strlen, and do the implicit
message length checking.
2014-04-18 16:53:29 +02:00
Zdenek Kabelac
1f701c7bf6 cleanup: dmeventd drop setting of size
Size is not used when msg->data is NULL.
2014-04-18 16:52:59 +02:00
Zdenek Kabelac
78c6dea48e cleanup: dmeventd improve _handle_request
Let the compiler resolve cmd lookup and leave it to optimize it as it
needs.
2014-04-18 16:52:45 +02:00
Zdenek Kabelac
0927605ec3 cleanup: dmeventd improve _clien_write code
Switch to allocate buffer from heap, since it might be potentially
bigger when extremaly large set of volumes would be monitored.
In case of allocation failure send ENOMEM message.
Also implicitelly ignore msg->size when msg->data is NULL.
2014-04-18 16:52:35 +02:00
Zdenek Kabelac
3febd2c9d4 cleanup: dmeventd set next_time when registering
Don't change next_time, when thread is already registered.
2014-04-18 16:52:11 +02:00
Zdenek Kabelac
dc21bbfabd cleanup: dmeventd improve _get_status
Use directly dm_asprintf() to allocate buffer with message,
and properly detect failing on replacement of snprintf()
which also returns -1 on error.
2014-04-18 16:51:54 +02:00
Zdenek Kabelac
0503af8466 cleanup: dmeventd simplify buffer write loop 2014-04-18 16:50:55 +02:00
Zdenek Kabelac
13d05211d0 cleanup: dmeventd simplify status processing
Since we always know the string length, use simplier memcpy.
2014-04-18 16:38:52 +02:00
Zdenek Kabelac
4fb588c34e cleanup: dmeventd reorder _fill_device_data
Just simplify the function.
2014-04-18 16:38:51 +02:00
Zdenek Kabelac
6b701c3a48 cleanup: dmeventd abstract lvm2cmd interface
Keep  lvm2cmd  interface hidden inside dmeventd_lvm
and use regular 1/0 return codes, this we may
avoid using lvm2cmd.h in other lvm2 plugins.
2014-04-18 16:38:51 +02:00
Zdenek Kabelac
6448428d05 cleanup: add some comment indents...
Just cleanup things
2014-04-18 16:38:51 +02:00
Zdenek Kabelac
91eb8927fd cleanup: skip zeroing of cleared areas
Zalloc mem is already zeroed.
2014-04-18 16:38:51 +02:00
Zdenek Kabelac
20179523e2 cleanup: set _REENTRANT in header
Use same way of setting _REENTRANT as in other
files - set it in the first included header file
(clvmd-common.h)
2014-04-18 16:38:50 +02:00
Zdenek Kabelac
451a168bf8 cleanup: drop inclusion of devmap - merge 2014-04-18 16:38:50 +02:00
Zdenek Kabelac
559c003ee2 cleanup: reduce inclusion of unnecessary headers
Remove those file which are not needed by .c files
or already include because the headers already needs them.
2014-04-18 16:38:50 +02:00
Zdenek Kabelac
589983a257 cleanup: include stdarg.h where needed.
Avoid dependency on implicit inclusion of stdarg.h with
libdevmapper.h.
2014-04-18 16:38:50 +02:00
Zdenek Kabelac
b7741f0a83 libdaemon: header cleanup
Ensure  daemon-io.h is used as a generic header included
with configure defines before other headers.
(In future all lvm2 libraries should settle on a single lib.h header)
Rename couple defines to better match header file names.
2014-04-18 16:38:49 +02:00
Zdenek Kabelac
e552824dc0 makefiles: move subdir into same section
Just shift few lines
2014-04-18 16:38:49 +02:00
Zdenek Kabelac
07274f3dd4 makefiles: drop linking of deamon libs to plugins
Daemon lib is linked into lvm2cmd library.
2014-04-18 16:38:49 +02:00
Zdenek Kabelac
2b748e3118 makefiles: compile files on make
Make install should install already compiled/generated files.
2014-04-18 16:38:49 +02:00
Zdenek Kabelac
1af05a7a16 makefiles: clear targets in with make clean
Make clean usually cleans all compiled files.
Make distclean cleans configure generated files
2014-04-18 16:38:48 +02:00
Zdenek Kabelac
4955dae4be makefiles: wait till include is populated
Since libdaemon needs configure.h header, wait forl links.
2014-04-18 16:38:48 +02:00
Zdenek Kabelac
db0045dfc9 devmapper-event: always initialize timeout
Before calling select, always set all struct members of timeout.
2014-04-18 16:38:48 +02:00
Zdenek Kabelac
08e7de986c dmeventd: check for list size within lock
Move check for _thread_registry list size behind mutex.
Use alloca() instead of buffer[count] (they are the same anyway)
2014-04-18 16:38:48 +02:00
Zdenek Kabelac
0e05e1cf6c asprintf: fix test for error result
On error this function returns -1. Since the functions however
do not propagate error upward, it's rather cleanup change.
2014-04-18 16:38:47 +02:00
Zdenek Kabelac
0b6d6bfb77 thin: dmeventd plugins support more minors
Kernel supports upto 1M (20bit) minors.
TODO: convert to hash to reduce memory requirements
2014-04-18 16:38:47 +02:00
Zdenek Kabelac
47a60369a0 unknown: fix mempool used for name allocation
Use cmd libmem mempool for name allocation, since mem mempool
is released after each clvmd command.
2014-04-18 16:38:47 +02:00
Alasdair G Kergon
b5f8f452ac tools: Add --readonly support.
Offer lock-free access to display virtual machine or clustered VG metadata
while it might be in use.
2014-04-18 02:46:34 +01:00
Alasdair G Kergon
17e304e0ac metadata: Fix unlock on VG recovery error path.
If lock conversion failed it tried to unlock VG that was no longer locked.
2014-04-18 02:27:16 +01:00
Alasdair G Kergon
177ece01a9 reports: Use X for unknown LV attr when no dm.
It's safer not to tell people an LV is inactive when we aren't sure.
2014-04-18 02:23:39 +01:00
Alasdair G Kergon
e8a3ba1865 pvscan: Use lvmetad_used().
Config variables that are processed during setup prior to calling into
particular tools must not be accessed directly afterwards in case the
values already got overridden.

_process_config() already used the tests I'm removing here to call
lvmetad_set_active() and set up lvmetad_used().
2014-04-18 02:13:46 +01:00
Peter Rajnoha
702180b30c configure: use configure's --enable-udev-systemd-background-jobs by default
This should be the preferred way of configuring lvm2 for udev/systemd
since otherwise one can end up with the processes run from udev (the
pvscan we run for lvmetad update on events) to be killed prematurely
and this can end up with LVM volumes not activated in the end.
2014-04-16 11:33:44 +02:00
Peter Rajnoha
18caa562fe lvmdump: list also inactive units for lvmdump -s 2014-04-15 15:43:20 +02:00
Peter Rajnoha
a6763c64a7 lvmdump: add -s to gather system info and context (currently systemd-related only)
This is sort of info we always ask people to retrieve when
inspecting problems in systemd environment so let's have this
as part of lvmdump directly.

The -s option does not need to be bound to systemd only. We could
add support for initscripts or any other system-wide/service tracking
info that can help us with debugging problems.
2014-04-15 15:27:30 +02:00
Peter Rajnoha
704609b17e profiles: comment out thin_pool_chunk_size in default.profile
By default, the thin_pool_chunk_size is automatically calculated.
When defined, it disables the automatic calculation. So to be more
precise here, we should comment it out for the default.profile.

Also, "lvm dumpconfig --type profilable" was used here to generate
the default.profile content. This will be done automatically in the
future once we have the infrastructure for this in (see also
https://bugzilla.redhat.com/show_bug.cgi?id=1073415).
2014-04-15 10:15:38 +02:00