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

4695 Commits

Author SHA1 Message Date
Alasdair Kergon
9de129d5b2 post-release 2010-07-07 02:37:28 +00:00
Alasdair Kergon
9d4cb8e97a . 2010-07-07 02:24:05 +00:00
Alasdair Kergon
c1589415f0 fix code in 2nd mda unignore loop to match 1st loop 2010-07-06 20:09:38 +00:00
Alasdair Kergon
389cbc3686 s/flags/mda/ 2010-07-06 17:29:50 +00:00
Alasdair Kergon
2508b4000b shorten mesg 2010-07-06 17:27:32 +00:00
Alasdair Kergon
e5164acc9c fix jumbled args in 'Adjusting' message 2010-07-06 17:26:08 +00:00
Jonathan Earl Brassow
71ee58b6bb Fix for bug 607347: failing both redundant mirror log legs...
Rather than attempting to remove all the images of a mirrored
log volume via remove_mirror_images, simply remove the log
if all its devices have failed.

Taka was the first to report that there is still an outstanding
issue with handling this case.  I've managed to reproduce it
only very rarely, and am still working on identifying the problem.
Failing to handle the problem rarely is better than not handling
the scenario at all, so I'm checking this in.
2010-07-06 17:02:03 +00:00
Alasdair Kergon
3512a6ad0b pre-release 2010-07-06 16:49:38 +00:00
Alasdair Kergon
b02de599a0 Fix dmlosetup snprintf %llu compiler warning. 2010-07-05 22:56:31 +00:00
Alasdair Kergon
38c6e8faf6 Randomly select which mdas to use or ignore.
Add some missing standard configure.in checks.
2010-07-05 22:23:15 +00:00
Alasdair Kergon
431ca070a4 Add parentheses to some libdevmapper.h macro arguments. 2010-07-05 22:22:43 +00:00
Alasdair Kergon
ed2630dce5 Add printf format attributes to yes_no_prompt & dm_{sn,as}printf and fix a calle 2010-07-02 21:16:50 +00:00
Petr Rockai
5a2c9c9cee . 2010-07-02 17:44:17 +00:00
Dave Wysochanski
a7184430f1 Minor changes to man pages for --metadataignore.
Move the definition from pvchange to pvcreate - the location of
other metadata options.
2010-07-02 17:05:22 +00:00
Alasdair Kergon
2e83fee74c remove unneeded header 2010-07-02 10:25:16 +00:00
Alasdair Kergon
bbe29582cb Always pass unsuspended dm devices through persistent filter to other filters.
Move test for suspended dm devices ahead of other filters.
2010-07-02 02:09:57 +00:00
Milan Broz
76470d9608 Fix another segfault in clvmd -R if no response from daemon received.
Missed the same problem in another function...
2010-07-01 21:46:09 +00:00
Milan Broz
715c4ca4cd Remove superfluous suspended device counter from clvmd.
Moreover, in current mirror handling, when it calls activate
on removed but suspended detached log this counter drops below zero
and confuses debug log.
2010-07-01 21:23:47 +00:00
Alasdair Kergon
c097423d77 Fix lvm shell crash when input is entirely whitespace. (Xinwei Hu) 2010-07-01 11:04:58 +00:00
Alasdair Kergon
54637fa44d Move dmeventd man page from install_lvm2 to install_device-mapper. (1.02.50) 2010-07-01 10:57:03 +00:00
Petr Rockai
c192e88bcd Restore the "removemissing" behaviour of lvconvert --repair --use-policies. 2010-07-01 10:10:52 +00:00
Dave Wysochanski
19a12b28bc Update metadata-balance test for --vgmetadatacopies 0.
Should be equivalent to "unmanaged".
2010-06-30 22:22:00 +00:00
Petr Rockai
d55a7f18b0 . 2010-06-30 21:58:13 +00:00
Petr Rockai
4008a5fbf9 Maintain memlock balance in clvmd.
When a mirror is being downconverted in a cluster, a series of suspends and
resumes is executed.

With the change to using UUIDs in dev_manager instead of names, the behaviour
has changed with regards to including an _mlog in the deptree of a logical
volume. In the old (pre-UUID-enabled) code, the _mlog would appear in a deptree
of any volume purely based on a name match: a linear volume foo would include
foo_mlog in its dependencies if that happened to exist. This behaviour was
fixed and the mlog is now only included for mirrors.

By a coincidence, this mlog bug had been hiding a different bug in clvmd. When
a mirror is being dismantled (and converted to a linear volume), it is first
suspended as a whole, then later resumed in parts. Nevertheless, the overall
memlock balance is maintained in this operation. The problem kicks in, because
even though the mirror log was suspended as part of the mirror, when the
dismantled mirror is resumed again, it is no longer a mirror and therefore the
mirror log stays suspended. This would not be a problem in itself, since
_delete_lv (from metadata/mirror.c) is called on it subsequently, which does an
activate/deactivate cycle and removes the LV. The activate/deactivate cycle
correctly prompts clvmd to resume the device: however, in doing this, it will
issue an unpaired resume operation (the suspend that caused the mirror log to
be suspended is paired with resuming the dismantled mirror later). We have
concluded that the path in clvmd should never affect memlock_count, since there
should never be an unmatched explicit suspend preceding this resume.
2010-06-30 21:40:27 +00:00
Alasdair Kergon
e260f729da Fix --[vg]metadatacopies arg processing 2010-06-30 20:21:03 +00:00
Alasdair Kergon
17cffe2bf9 improve vgmetadatacopies unmanaged message 2010-06-30 20:03:52 +00:00
Dave Wysochanski
d1b068a68a Check for missing_pv in vg_remove loop.
If a pv is missing, we should just skip it rather than checking the
device size and failing the vgremove.
2010-06-30 19:55:43 +00:00
Alasdair Kergon
a5053f6ada more mda ignore cleanups 2010-06-30 19:28:35 +00:00
Dave Wysochanski
261a3e7e78 Refactor vg_remove_check to place pv removal into separate function. 2010-06-30 18:03:52 +00:00
Alasdair Kergon
36e28d4b4b more metadataignore message/code cleanup 2010-06-30 17:13:05 +00:00
Alasdair Kergon
cbc562a636 Update partial mode warning message. 2010-06-30 16:43:09 +00:00
Alasdair Kergon
51c4e1ea4b revert that 2010-06-30 14:54:29 +00:00
Alasdair Kergon
c8f03c38fe suppress useless compiler warning 2010-06-30 14:52:29 +00:00
Alasdair Kergon
4107d4d24d post-release 2010-06-30 14:50:32 +00:00
Dave Wysochanski
f0c79d95f5 Only attempt to guarantee 1 mda ignored if there's at least one mda in the vg. 2010-06-30 14:48:07 +00:00
Alasdair Kergon
d13b495217 Only attempt to guarantee 1 mda ignored if there's at least one mda in the vg. 2010-06-30 14:27:40 +00:00
Alasdair Kergon
549e1dfb0d pre-release 2010-06-30 14:04:15 +00:00
Milan Broz
e260ecef0b Fix vgremove to allow removal of VG with missing PVs. (2.02.52) 2010-06-30 14:01:39 +00:00
Alasdair Kergon
b16b4d92a7 Improve various log messages. 2010-06-30 13:51:11 +00:00
Dave Wysochanski
c2584edbdb Update nightly tests for vgextend --metadataignore. 2010-06-30 13:11:12 +00:00
Dave Wysochanski
aa00196b6f Update nightly tests for vgextend --metadataignore. 2010-06-30 13:04:59 +00:00
Dave Wysochanski
75e3996d36 Add --metadataignore to vgextend and man pages. 2010-06-30 13:03:48 +00:00
Dave Wysochanski
d50f13b90d Add pvmetadatacopies to lvm.conf and pvcreate man pages. 2010-06-30 12:49:28 +00:00
Dave Wysochanski
652e9c00c5 Update pvcreate tests for --metadataignore. 2010-06-30 12:17:55 +00:00
Dave Wysochanski
fdcf749779 Add --metadataignore to pvcreate.
Allow metadataignore flag to be passed in to pvcreate.
Ideally, more refactoring of the mda allocation / initialization
is warranted, but for now, we just add another parameter to 'add_mda'
to take an existing mda ignored flag.  We need to do this or pv_write
loses the state of the mda 'ignored' flag before copying and writing
to disk.
2010-06-30 12:17:24 +00:00
Dave Wysochanski
ed38f47f23 Improve logging for setting --vgmetadatacopies.
Example of logging:
metadata/metadata.c:1127     Setting mda_copies = 3 on vg vgtest
metadata/pv_manip.c:296         /dev/loop2 0:      0     25: NULL(0:0)
metadata/pv_manip.c:296         /dev/loop3 0:      0     25: NULL(0:0)
metadata/pv_manip.c:296         /dev/loop4 0:      0     25: NULL(0:0)
metadata/metadata.c:1072     Adjusting ignored mdas on vg vgtest, vg_mda_used_count=5, vg_mda_copies=3
metadata/metadata.c:1015     Setting ignore flag for 2 mdas on vg vgtest
metadata/metadata.c:4151     Setting mda ignored flag for metadata_locn /dev/loop2.
metadata/metadata.c:4151     Setting mda ignored flag for metadata_locn /dev/loop3.
2010-06-29 22:41:28 +00:00
Dave Wysochanski
3b0585be3b Improve logging for metadata ignore by printing device name.
Print device name when setting or clearing metadata ignore bit.
Example:
label/label.c:160       /dev/loop2: lvm2 label detected
cache/lvmcache.c:1136         lvmcache: /dev/loop2: now in VG #orphans_lvm2 (#orphans_lvm2)
metadata/metadata.c:4142     Setting mda ignored flag for metadata_locn /dev/loop2.
format_text/text_label.c:318     Skipping mda with ignored flag on device /dev/loop2 at offset 4096
2010-06-29 22:37:32 +00:00
Dave Wysochanski
ebe1a8080c Add some log_verbose debug statements related to metadataignore.
Logging isn't ideal, especially for mda_set_ignore.  Ideally we'd
like to display the device name and offset in this case but this
requires a bit more work and a per-format 'mda_description' function
pointer definition (we don't have access to mda_context in
metadata.c).
2010-06-29 22:25:58 +00:00
Dave Wysochanski
593bb6470b Move code into pv_change_metadataignore library function.
In preparation to call this from both pvcreate as well as pvchange,
move the guts of metadataignore into a library function.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-29 21:32:44 +00:00
Dave Wysochanski
6ce45042ef Add error message if backup_to_file fails because of empty in_use mdas list. 2010-06-29 15:03:59 +00:00