Milan Broz
be3510b204
PE size overflows, on most architectures it is catch by "PE cannot be 0"
...
but s390x unfortunately return something usable.
Always use unit64 in inital parameter check.
2011-03-02 20:00:09 +00:00
Milan Broz
301c2b8822
Use 64bit unsigned value for maximum stripe size test.
...
While STRIPE_SIZE_LIMIT * 2 is basically UINT_MAX, 32bit integer
value can already overflow durin arg size parsing.
(This really happens in test where --stripesize 4294967291 is used,
in s390x uint overflow and this test is ineffective.)
2011-03-02 16:56:06 +00:00
Petr Rockai
0263cd7bbc
Do not run past the end of an array in dmeventd's _handle_request when faced
...
with an unknown command ID.
2011-03-02 14:20:48 +00:00
Milan Broz
c17d430b1f
Fix test to use explicit /dev/mapper/ node, /proc/mounts should not change this...
...
(failed on RHEL5)
2011-03-02 13:49:29 +00:00
Petr Rockai
61394ca4aa
As requested in BZ 454618:
...
- dmeventd -R will continue to start up even if no dmeventd is currently
running + a test for this behaviour
- add -R to dmeventd manpage
2011-03-02 12:49:13 +00:00
Peter Rajnoha
15b9215534
Use a copy if moving an mda from pv fid to vg fid.
...
We'll destroy the pv fid (with all mdas in it) after merging all pv mdas to
a vg in _text_pv_setup fn, hence we need to use a copy here!
2011-03-02 10:23:29 +00:00
Peter Rajnoha
0b100565ae
Make add_metadata_area_to_pv/remove_metadata_area_from_pv static.
...
No need to put these in format-text.h, it's not used anywhere else actually.
2011-03-02 10:19:14 +00:00
Zdenek Kabelac
85a1ca1c4b
Indent case part properly
2011-03-02 08:41:55 +00:00
Zdenek Kabelac
63284817c7
Add missing return
2011-03-02 08:40:28 +00:00
Alasdair Kergon
11bffd7d25
Accept multiple mapped device names on many dmsetup command lines.
2011-03-02 02:44:56 +00:00
Alasdair Kergon
d0e3d474d1
Fix dm_udev_wait calls in dmsetup to occur before readahead display not after.
...
Include an implicit dm_task_update_nodes() within dm_udev_wait().
2011-03-02 00:29:57 +00:00
Milan Broz
6ae59c32a0
Rather return success if skipping udev wait.
2011-03-01 23:44:07 +00:00
Zdenek Kabelac
a912d581c4
Invert condition for READLINE check
2011-03-01 23:29:14 +00:00
Alasdair Kergon
8f91593c25
Fix _create_and_load_v4 not to lose the --addnodeoncreate setting (1.02.62).
2011-03-01 23:27:06 +00:00
Zdenek Kabelac
e3dd1c81e9
Build test.c also without readline library
...
Allow bulding of this testing tool also without readline library.
Outputs message about build without readline library then.
2011-03-01 23:18:40 +00:00
Milan Broz
16d0725dd3
Fix tests if udevadm missing (old udev).
2011-03-01 22:28:27 +00:00
Zdenek Kabelac
11ec59c8d5
Quick fix to compile lvm2api tests when possible
...
Do not build lvm2api tests when lvm2api lib is not enabled.
2011-03-01 21:30:43 +00:00
Milan Broz
cbedb99e4c
Fix some compile warnings on RHEL5
...
- returned char not needed to be explicitly const
- warn if pipe() fails in clvmd (more fixes here needed for error paths...)
- assign (and ignore) read() output in drain buffer
2011-03-01 20:17:56 +00:00
Milan Broz
0cb777d642
Rephrase backup message.
2011-02-28 20:50:01 +00:00
Zdenek Kabelac
9afafc7a3c
Fix void pointer arithmetic warning in pool debug code
2011-02-28 19:54:30 +00:00
Zdenek Kabelac
36653e8903
Add fall through comments
...
Add comments to switch case construct.
2011-02-28 19:53:03 +00:00
Zdenek Kabelac
ebcbe00d17
Remove dead code
...
Remove code which is no longer used.
Code which has been using msg_malloced was removed in 2007.
2011-02-28 19:50:15 +00:00
Zdenek Kabelac
eba7348340
Test result of dm_task_set_uuid
2011-02-28 19:47:22 +00:00
Zdenek Kabelac
683ef85a1e
Use backward compatible configuration for test
...
Currently the test are not properly working with new code.
Use settings for the previous behaviour.
FIXME: update tests to properly test new allocation policies.
2011-02-28 19:44:21 +00:00
Alasdair Kergon
059afedcab
mention vgreduce in pvremove man page
2011-02-28 19:40:04 +00:00
Alasdair Kergon
07e711ecaa
Improve pvremove error message when PV belongs to a VG.
2011-02-28 19:35:09 +00:00
Peter Rajnoha
da721ac1ef
Add a hint for manual revert if there's an error in pv_write, vg_write, vg_commit for pvresize.
2011-02-28 17:08:09 +00:00
Peter Rajnoha
150e43a05c
Use pv->vg_name directly instead of pv->vg->name in _text_pv_write.
...
This also prevents a possible segfault during an automatic repair
when the PV does not belong to a VG anymore and we call pv_write_orphan.
2011-02-28 17:05:48 +00:00
Peter Rajnoha
3b97e8d643
Allow non-orphan PVs with two metadata areas to be resized.
...
We allow writing non-orphan PVs only for resize now. The "orphan PV" assert
in pv_write fn uses the "allow_non_orphan" parameter to control this assert.
However, we should find a more elaborate solution so we can remove this
restriction altogether (pv_write together with vg_write is not atomic, we
need to find a safe mechanism so there's an easy revert possible in case of
an error).
2011-02-28 13:19:02 +00:00
Alasdair Kergon
1a52fa6858
Fix check for log-only allocation in new alloc normal loop.
2011-02-27 01:16:52 +00:00
Alasdair Kergon
92ffcda183
Various changes to the allocation algorithms: Expect some fallout.
...
There is a lot to test.
Two new config settings added that are intended to make the code behave
closely to the way it did before - worth a try if you find problems.
2011-02-27 00:38:31 +00:00
Peter Rajnoha
4b8f066c19
vgconvert is fixed now to work with the changes in metadata area handling - enable the tests.
...
Add a small fix that preserves pe_start for lvm1 PVs when being converted.
(this fix needs to be replaced with something more clever, but let's have this working now)
2011-02-25 14:12:14 +00:00
Peter Rajnoha
4a304dc1d8
Allow only orphan PVs to be resized even with two metadata areas.
2011-02-25 14:08:54 +00:00
Peter Rajnoha
f74bd57ec9
Revert the patch for vgconvert to work with recent changes in metadata area handling.
...
This should work now with the help of the patch from previous commit.
2011-02-25 14:02:53 +00:00
Peter Rajnoha
38b0564cab
Read PV metadata information from cache if pv_setup called with pv->fid == vg->fid.
...
If the PV is already part of the VG (so the pv->fid == vg->fid), it makes no
sense to attach the mdas information from PV to a VG. Instead, we read new
PV metadata information from cache and attach it to the VG fid.
2011-02-25 13:59:47 +00:00
Peter Rajnoha
ea4a41e961
Fix a bug in metadata location calculation, cleanup pv_add_metadata_area fn.
...
This bug (a missing line) caused the 2nd MDA area location to be calculated
incorrectly and it didn't fit the disk size properly.
(https://www.redhat.com/archives/lvm-devel/2011-February/msg00127.html )
2011-02-25 13:50:02 +00:00
Peter Rajnoha
93cca5c1c8
Remove a few size_t type warnings.
2011-02-22 10:01:11 +00:00
Mike Snitzer
7d9c99e8e7
Add inactive table query support for kernel driver >= 4.11.6 (RHEL 5.7).
2011-02-21 16:26:23 +00:00
Peter Rajnoha
c901a92aa5
%ld -> PRIu64
2011-02-21 13:09:27 +00:00
Peter Rajnoha
e924615f32
WHATS_NEW
2011-02-21 12:40:46 +00:00
Peter Rajnoha
812f4ca12a
Temporarily disable 'convert a VG from lvm2 to lvm1 format' test until a known issue is resolved.
...
Otherwise we get an error:
PV segment VG free_count mismatch: 32 != 33
PV segment VG extent_count mismatch: 32 != 33
2011-02-21 12:37:33 +00:00
Peter Rajnoha
9c0035c129
Fix metadata balance code to work with recent changes in metadata handling
...
interface (with the changes in format_instance).
2011-02-21 12:33:16 +00:00
Peter Rajnoha
51aed1992f
Add old_uuid field to struct physical_volume so we can still reference a PV
...
with its old UUID when we're changig it (the cache as well as metadata area
index has the old uuid that we need to use to access the information!)
2011-02-21 12:31:28 +00:00
Peter Rajnoha
6bdc80743e
Fix vgconvert code to work with changes in metadata area handling and changes
...
in format_instance. Add new 'vg_convert' function.
2011-02-21 12:29:21 +00:00
Peter Rajnoha
cb2396730a
Change pvresize code to work with new metadata handling interface and allow
...
resizing a PV with two metadata areas.
2011-02-21 12:27:26 +00:00
Peter Rajnoha
17ad2b1115
Change pv_write code to work with the changes in metadata handling interface
...
and changes in format_instance.
2011-02-21 12:26:27 +00:00
Peter Rajnoha
903d7db050
Remove unused _mda_setup fn. This functionality is covered by new pv_add_metadata_area fn.
2011-02-21 12:25:16 +00:00
Peter Rajnoha
94d91fdda1
Change the code throughout to use new pv_initialise and modified pv_setup fn.
...
Change pv_create code to work with these changes together with using new
pv_add_metadata_area fn to add metadata areas for a PV being created.
2011-02-21 12:24:15 +00:00
Peter Rajnoha
617b900d85
Separate new pv_initialise function out of the original pv_setup code.
...
pv_initiliase initialises a new PV
pv_setup sets up an existing PV with a VG
2011-02-21 12:20:18 +00:00
Peter Rajnoha
981895a860
Add new pv_remove_metadata_area interface function.
2011-02-21 12:17:54 +00:00