1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

10532 Commits

Author SHA1 Message Date
David Teigland
b851b74cba config: editing descriptions
Update wording and formatting.
2015-04-10 16:43:38 -05:00
Alasdair G Kergon
2872e8c289 alloc: Add A_PARTITION_BY_TAGS to avoid sharing.
Add A_PARTITION_BY_TAGS set when allocated areas should not share tags
with each other and allow _match_pv_tags to accept an alternative list
of tags.  (Not used yet.)
2015-04-10 21:57:52 +01:00
Tony Asleson
0523c71844 python: Fix ws liblvm.c
Signed-off-by: Tony Asleson <tasleson@redhat.com>
2015-04-10 11:01:46 -05:00
Tony Asleson
f29df9acfe python: Unit test ws fixes
pep8 corrections for:
    - mixed leading ws (tabs & spaces)
    - spacing around arithmetic operators

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2015-04-10 10:52:12 -05:00
Tony Asleson
2b557b595a python: Make lv addTag/removeTag persistent
Added lvm_vg_write in the addTag/removeTag paths to make the
changes persist.  Added unit test to ensure functionality.

https://bugzilla.redhat.com/show_bug.cgi?id=1210020

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2015-04-10 10:38:43 -05:00
Peter Rajnoha
394250ef67 report: lv_metadata_size, data_lv and metadata_lv also reports properties for cache pools 2015-04-10 14:55:28 +02:00
Peter Rajnoha
463fd954bb config: add note about 'vsn' macro use in config_settings.h 2015-04-10 09:51:08 +02:00
David Teigland
4eaa399b54 config: comments update
missing \n
2015-04-09 16:35:20 -05:00
David Teigland
303c5ba803 config: update description
Remove examples that simply replicate the default shown.
2015-04-09 16:09:53 -05:00
David Teigland
6f3f421228 config: include full comments
Comments from the sample config files are copied into
the comment field of the config settings structure.
This includes only minimal changes to the text.

With this in place, the sample config files can
be generated from 'lvm dumpconfig', and content
for an lvm.conf man page can also be generated.
2015-04-09 15:35:28 -05:00
Alasdair G Kergon
a9d48bae2f cache: Set correct vgid when changing PV header.
pv_write is called both to write orphans and to rewrite PV headers
of PVs in VGs.  It needs to select the correct VG id so that the
internal cache state gets updated correctly.

It only affected commands that involved further steps after
the pv_write and was often masked because the metadata would
be re-read off disk and correct itself.

"Incorrect metadata area header checksum" warnings appeared.

Example:
  Create vg1 containing dev1, dev2 and dev3.
  Hide dev1 and dev2 from the system.
  Fix up vg1 with vgreduce --removemissing.
  Bring back dev1 and dev2.
  In a single operation reinstate dev1 and dev2 into vg1 (vgextend).
Done as separate operations (automatically fix-up dev1 and dev2 as orphans,
then vgextend) it worked, but done all in one go the internal cache got
corrupted and warnings about checksum errors appeared.
2015-04-09 21:13:55 +01:00
Zdenek Kabelac
249d4a921c tests: extend delay
400 was appeared to be good value in pvmove-abort.sh
so use also in abort-all.
2015-04-09 13:16:53 +02:00
Zdenek Kabelac
1a7c9ce3bd tests: handle debug.log from clvmd
When clvmd starts, it starts it's own command logging into debug.log.
This is interferring with our other command debug.log.
As as sideeffect we may experience log from command,
followed but lots of zeros and continued with clvmd log.

Fix it by renaming debug.log and now we could also print this trace
to get full list of clvmd activity nicely.

Also improve some post-mortem prints from udevadm and dmsetup to
make the output more usable.
2015-04-09 13:13:36 +02:00
Zdenek Kabelac
073643c9a2 tests: slowdown write on dev3 even more 2015-04-08 23:19:38 +02:00
Zdenek Kabelac
ebde60beab tests: use single lvmconf call 2015-04-08 23:19:37 +02:00
Zdenek Kabelac
a5b34f0f1b tests: put "" around dev path 2015-04-08 23:19:37 +02:00
Zdenek Kabelac
4459413225 clvmd: singlenode signals only when lock changes
There is no benefit in waking-up all the waiters
when there is no actual change in lock state.
This avoid some unnecessarily ping-pong effects like:

 Resource V_LVMTEST15724vg retrying lock in mode:WRITE...
 Resource V_LVMTEST15724vg already locked lockid=40, mode:WRITE
 Resource V_LVMTEST15724vg retrying lock in mode:WRITE...
 Resource V_LVMTEST15724vg already locked lockid=40, mode:WRITE
2015-04-08 23:19:34 +02:00
Peter Rajnoha
f32973c78e select: mention { } use in lvm.8 man page and '-S help' properly 2015-04-08 11:14:16 +02:00
Zdenek Kabelac
8fdca0de79 tests: check scsi_debug support opt_blks
Some older kernels (i.e. lenny) do not have such options.
2015-04-07 14:59:13 +02:00
Heinz Mauelshagen
035276ab83 lvcreate: do not silently accept '-m #' with raid4/5/6
If the user provides '-m #' (# > 0) with mappings
raid4/5/6, the command silently creates
'#mirrors * #stripes + #parity' image component pairs.

Patch rejects '-m #' altogether for those mappings
in order to avoid LV creation with unexpected layout.

- resolves bz#1209445
2015-04-07 14:32:25 +02:00
Zdenek Kabelac
64353ff74b tests: when test fails collect more info
In some case it might be worth to know some more surrouding info
when command has crashed.

So collect  tables and some udev db content in this case.
2015-04-07 13:40:15 +02:00
Zdenek Kabelac
ba049e203b tests: skip clvmd testing of mirrored LV vgsplit
There is something wrong when even inactive LV can't be splitted
without cmirrord being present for clustered VG.
2015-04-03 20:14:26 +02:00
Zdenek Kabelac
87cb0a3e9f tests: change default to 30s.
Keep rather the default lower and avoid to pass it with every call.
2015-04-03 19:40:43 +02:00
Zdenek Kabelac
32a0f625a5 tests: slow down devices in outer loop
Since now we have metadata parts running with normal speed,
we could avoid reinitilising delayed dev for every test.
(Saving seconds on cookie waits...)
2015-04-03 19:40:42 +02:00
Zdenek Kabelac
4f94669eca pvmove: don't crash when name is not found
If the device name is not found in our metadata,
we cannot call strdup few lines later with NULL name.

More intersting story goes behind how it happens -
pvmove removal is unfortunatelly 'multi-state' process
and at some point (for now)  we have in lvm2 metadata
LV  pvmove0 as stripe  and mirror image as error.

If such metadata are left - we fail with any further removal.
2015-04-03 17:18:11 +02:00
Zdenek Kabelac
c88ffbf9df tests: delay only data portion of device 2015-04-03 17:18:11 +02:00
Zdenek Kabelac
93ab6d5184 tests: better check for empty set
Even when no arg is passed - there is still one "" arg there...
So taky it easy and check for empty string instead.
2015-04-03 16:38:05 +02:00
Zdenek Kabelac
ce3c61c4af tests: delay only data area 2015-04-03 14:54:22 +02:00
Zdenek Kabelac
385457de23 tests: test update
Really wait till fsck is running (sleep 2 is not ideal)
Use new  'delay_dev'.
2015-04-03 14:54:22 +02:00
Zdenek Kabelac
d3a591a7b3 tests: hide unwanted output 2015-04-03 14:54:22 +02:00
Zdenek Kabelac
dc41859220 tests: enhance delay_dev
Use common code for error_dev & delay_dev.
Both functions now take list of sectors.

From now on we could delay just 'extent' section, while
keeping running  lvm commands fast (having native metadata area).
2015-04-03 14:53:36 +02:00
Zdenek Kabelac
bd84389c68 tests: add get first_extent_sector
Trvial function to figure out sector position of 1st. extent.
2015-04-03 14:20:03 +02:00
Zdenek Kabelac
308f9bcc18 tests: simplify check sysfs_queue
Pass just device name and let figure out
sysfs path inside the function.
2015-04-03 10:27:00 +02:00
Zdenek Kabelac
a701d337d4 tests: slowdown pvmove devs more
Once pvmove is running - slow it even more
since some test machines tend to be very very slow.
2015-04-02 16:02:06 +02:00
Zdenek Kabelac
1966025245 tests: split bigger test
Use separate new test and avoid teardown_devs
in the middle of single test.
2015-04-02 16:01:01 +02:00
Zdenek Kabelac
a16324b0d3 tests: drop check for awk 2015-04-02 13:38:41 +02:00
Zdenek Kabelac
ee65528547 tests: fix test warning
We cannot print TEST WARNING within test shell script
(since it's running in debug mode and thus always prints it)

Use 'should false' trick let the string printed in this case.
So 'non cluster cases' should now end properly.
2015-04-02 13:38:41 +02:00
Zdenek Kabelac
536f5fa0a3 tests: deal with kernel and broken lcm
If the kernel has 'new lcm()' (3.19) it provides wrong
optimal_io_size value for dm device so lvm2 command cannot
create properly aligned devices.

Use 'should' for this case - so test ends with 'TEST WARNING'.
2015-04-02 13:38:41 +02:00
Zdenek Kabelac
7a6e3838e9 tests: add check sysfs_queue
Add check function for content of /sys/block/$1/queue/$2 == $3
2015-04-02 13:38:41 +02:00
Zdenek Kabelac
95dbedb301 tests: move exa test to separate file
Make it visible the 'exa' test passed on an arch.
2015-04-02 13:38:41 +02:00
Zdenek Kabelac
6d1c9a0eb8 tests: more duplicate testing 2015-04-02 13:38:41 +02:00
Zdenek Kabelac
53ef14fca0 debug: log scanned value
Fix verbose print of scanned value for topology attribute.
Result is set afterwards in sectors.
2015-04-02 13:38:41 +02:00
Zdenek Kabelac
e28e22b9e1 lvmcache: skip drop when vg_write lock is not held
Commit 80f4b4b803
introduced undesirable side-effects for lvm2app user
which happens to be our own python binding.

It appear obtaing pvs list keeps global lock.

So restricting this to VG_GLOBAL READ locks and skip
the drop skip if WRITE lock is held.
2015-04-02 13:38:32 +02:00
Ondrej Kozina
f199aeb9ea polldaemon: alter few lines related to interval
we do not allow 0 interval for pvmove command issued
without parameters with classical polldaemon. It would
query the kernel too often with possibly many pvmoves
in-progress.
2015-04-01 20:41:52 +02:00
Ondrej Kozina
7abb7894e4 polldaemon: separate daemon_parms initialisation 2015-04-01 20:41:39 +02:00
Ondrej Kozina
3929b00466 polldaemon: prepare wrapper poll_daemon function
with lvmpolld we'll have two polldaemon implementations
2015-04-01 20:41:30 +02:00
Ondrej Kozina
65623b63a2 pvmove: split pvmove_update_metadata function
So far pvmove_update_metadata (originaly _update_metadata) was
used for both initial and subsequent metadata updates during polling.
With a new polldaemon (lvmpolld) all operations that require polling
have to be split in two parts: The initiating one and the polling one.
The later step will be used from lvm command spawned by lvmpolld to
monitor and advance the mirror on next segment if required.

1) The initiation part is _update_metadata in pvmove.c which performs
only the first update, setting up the pvmove itself in metadata.

2) pvmove_update_metadata in pvmove_poll.c now handles all other
subsequent metadata updates except the last one.

Due to the split we could remove some code. Also some functions were
moved back to pvmove.c as they were suited for initialisation of pvmove
only.
2015-04-01 20:41:03 +02:00
Ondrej Kozina
5190f56605 lvconvert: move poll code in before refactoring
This commit has no impact on functionality. Code required to
be visible outside lvconvert.c is just moved into new file
lvconvert_poll.c and some calls are made non-static and
declared in new header file lvconvert.h
2015-04-01 20:40:50 +02:00
Ondrej Kozina
a098aa419f pvmove: move poll code in before refactoring
This commit has no impact on functionality. Code required to
be visible outside pvmove.c is just moved into new file
pvmove_poll.c and some calls are made non-static and declared in
new header file pvmove.h
2015-04-01 20:40:39 +02:00
David Teigland
bf2d831e7e tests: add clvm case to system_id.sh 2015-03-31 14:45:14 -05:00