]> sourceware.org Git - lvm2.git/log
lvm2.git
12 years agoRe-enable partial activation of non-thin LVs until it can be fixed. (2.02.90)
Alasdair Kergon [Wed, 16 May 2012 12:50:14 +0000 (12:50 +0000)]
Re-enable partial activation of non-thin LVs until it can be fixed. (2.02.90)
- The test should be checking the LV as a whole, not just individual segments.

12 years agoAdd a (currently failing) test for RHBZ 816672.
Petr Rockai [Wed, 16 May 2012 10:44:36 +0000 (10:44 +0000)]
Add a (currently failing) test for RHBZ 816672.

12 years agoAdd provisions to flag tests that we know will fail, without flagging the build
Petr Rockai [Wed, 16 May 2012 10:43:41 +0000 (10:43 +0000)]
Add provisions to flag tests that we know will fail, without flagging the build
(i.e. an expected failure).

12 years agoSet delay_resume_if_new on deptree snapshot origin.
Alasdair Kergon [Tue, 15 May 2012 21:27:24 +0000 (21:27 +0000)]
Set delay_resume_if_new on deptree snapshot origin.
(Must avoid activating snapshot origin more than once concurrently.)

12 years agoadd major:minor to table size changed debug message
Alasdair Kergon [Tue, 15 May 2012 20:03:12 +0000 (20:03 +0000)]
add major:minor to table size changed debug message

12 years agoindicate when deptree detects but ignores size change in debug msg
Alasdair Kergon [Tue, 15 May 2012 14:10:54 +0000 (14:10 +0000)]
indicate when deptree detects but ignores size change in debug msg

12 years agoRefer to details of snapshot of raid problem.
Alasdair Kergon [Mon, 14 May 2012 16:29:50 +0000 (16:29 +0000)]
Refer to details of snapshot of raid problem.

12 years agoWarn of deadlock risk when using snapshots of mirror segment type.
Alasdair Kergon [Mon, 14 May 2012 16:18:57 +0000 (16:18 +0000)]
Warn of deadlock risk when using snapshots of mirror segment type.

12 years agoFix cling policy not to behave like normal policy if no previous LV seg.
Alasdair Kergon [Fri, 11 May 2012 22:53:13 +0000 (22:53 +0000)]
Fix cling policy not to behave like normal policy if no previous LV seg.
Fix alloc cling to cling to PVs already found with contiguous policy.

12 years agoFix allocation policy loop so it doesn't continue beyond cling using later
Alasdair Kergon [Fri, 11 May 2012 22:19:12 +0000 (22:19 +0000)]
Fix allocation policy loop so it doesn't continue beyond cling using later
policies it shouldn't be using when --alloc cling is specified but no tags
are defined.

12 years agoAppend _TO_LVSEG to names of internal A_CONTIGUOUS and A_CLING flags.
Alasdair Kergon [Fri, 11 May 2012 18:59:01 +0000 (18:59 +0000)]
Append _TO_LVSEG to names of internal A_CONTIGUOUS and A_CLING flags.
Remove some unnecesary prev_lvseg checks.

12 years agoAlways include debug mesg when cling to allocated is set.
Alasdair Kergon [Fri, 11 May 2012 15:32:19 +0000 (15:32 +0000)]
Always include debug mesg when cling to allocated is set.

12 years agoRefactor _has_matching_pv_tag to provide a fn that takes PV structs.
Alasdair Kergon [Fri, 11 May 2012 15:26:30 +0000 (15:26 +0000)]
Refactor _has_matching_pv_tag to provide a fn that takes PV structs.

12 years agoMore comments on metadata area types.
Peter Rajnoha [Thu, 10 May 2012 11:03:07 +0000 (11:03 +0000)]
More comments on metadata area types.

12 years agoComment on auxiliary metadata areas.
Peter Rajnoha [Thu, 10 May 2012 10:37:49 +0000 (10:37 +0000)]
Comment on auxiliary metadata areas.

12 years agoAdd missing pkg init
Zdenek Kabelac [Thu, 10 May 2012 08:54:33 +0000 (08:54 +0000)]
Add missing pkg init

12 years agoUncomment allocation section to match style of rest of file.
Alasdair Kergon [Thu, 10 May 2012 00:18:49 +0000 (00:18 +0000)]
Uncomment allocation section to match style of rest of file.

12 years agoRemove VG/PV used in the test.
Peter Rajnoha [Wed, 9 May 2012 14:44:59 +0000 (14:44 +0000)]
Remove VG/PV used in the test.

12 years agoFix division by zero if PV with zero PE count is used during vgcfgrestore.
Peter Rajnoha [Wed, 9 May 2012 12:30:56 +0000 (12:30 +0000)]
Fix division by zero if PV with zero PE count is used during vgcfgrestore.

12 years agoInitial support for lvconvert for thin pool volumes.
Zdenek Kabelac [Wed, 9 May 2012 12:17:06 +0000 (12:17 +0000)]
Initial support for lvconvert for thin pool volumes.

Support has many limitations and lots of FIXMEs inside,
however it makes initial task when user creates a separate LV for
thin pool data and thin metadata already usable, so let's enable
it for testing.

Easiest API:

lvconvert --chunksize XX --thinpool data_lv  metadata_lv

More functionality extensions will follow up.

TODO: Code needs some rework since a lot of same code is getting copied.

12 years agoFix regression in for_each_sub_lv
Zdenek Kabelac [Wed, 9 May 2012 12:12:21 +0000 (12:12 +0000)]
Fix regression in for_each_sub_lv

pool_lv is not a sub lv in terms for this function.
It has caused problem with renaming thin_volume, where it has tried to
rename pool LV as well.

12 years agoLog value chosen in _find_config_bool like other variable types do.
Alasdair Kergon [Tue, 8 May 2012 14:31:44 +0000 (14:31 +0000)]
Log value chosen in _find_config_bool like other variable types do.

12 years agoFix up-convert when mirror activation is controled by volume_list and tags.
Jonathan Earl Brassow [Sat, 5 May 2012 02:08:46 +0000 (02:08 +0000)]
Fix up-convert when mirror activation is controled by volume_list and tags.

When mirrors are up-converted, a transient mirror layer is put in so that
only the new devices are sync'ed.  That transient layer must carry the tags
of the original mirror LV, otherwise it will fail to activate when activation
is regulated by lvm.conf:activation/volume_list.  The conversion would then
fail.

The fix is to do exactly the same thing that is being done for linear ->
mirror converting (lib/metadata/mirror.c:_init_mirror_log()).  We copy the
tags temporarily for the new LV and remove them after the activation.

12 years agoDisallow snapshots of mirror segment types.
Jonathan Earl Brassow [Tue, 1 May 2012 19:21:24 +0000 (19:21 +0000)]
Disallow snapshots of mirror segment types.

Snapshots of RAID logical volumes are allowed (including "raid1").  However,
snapshots of "mirror" logical volumes has been disallowed due to unsolvable
issues inherent to the design.  The fact that mirroring (dm-raid1.c) must
stop all I/O as the result of a failure and wait for userspace intervention
can lead to a circular dependency if userspace is simultaneously waiting for
snapshots (on mirrors) to make an I/O update before proceeding.

Various snapshot on mirror tests have been removed as a result.

12 years agoMake a note that "raid1" is not cluster-aware in the example lvm.conf.
Jonathan Earl Brassow [Fri, 27 Apr 2012 18:37:42 +0000 (18:37 +0000)]
Make a note that "raid1" is not cluster-aware in the example lvm.conf.

In the description of the segment types for the 'mirror_segtype_default'
field, we mention that "raid1" is not cluster-aware.

12 years agoUse dm_strncpy instead of plain strncpy while setting the socket path.
Peter Rajnoha [Fri, 27 Apr 2012 09:52:33 +0000 (09:52 +0000)]
Use dm_strncpy instead of plain strncpy while setting the socket path.

Also check the return value as it meaningless to work with truncated strings.

12 years agoFix bug in cmirror that caused incorrect status info to print on some nodes.
Jonathan Earl Brassow [Thu, 26 Apr 2012 17:30:49 +0000 (17:30 +0000)]
Fix bug in cmirror that caused incorrect status info to print on some nodes.

Looking at the code in cmirrord/local.c, we can see the various different
request types handled in different ways.  Some information that is non-changing
does not need to go around the cluster and can be short-circuited.  For
example, once the cluster mirror is in-sync, it is pointless to continue
sending that query around the cluster.  We can save network bandwidth and reply
directly back to the kernel.  When it comes to status information, there are
two types 'TABLE' and 'INFO'.  The 'TABLE' information never changes and
belongs to the group of requests that can be safely short-circuited.  The
'STATUS' information can change - and will change if a device fails.  Thus it
cannot be short-circuited, but this is exactly what was found.  The 'STATUS'
information request was being short-circuited and therefore never reporting the
failure condition to anyone other than the "server" that experienced it
directly.

12 years agoRemove statement that snapshots cannot be tagged from lvm man page.
Alasdair Kergon [Thu, 26 Apr 2012 15:24:46 +0000 (15:24 +0000)]
Remove statement that snapshots cannot be tagged from lvm man page.

12 years agoDisallow changing cluster attribute of VG while RAID LVs are active.
Jonathan Earl Brassow [Wed, 25 Apr 2012 13:38:41 +0000 (13:38 +0000)]
Disallow changing cluster attribute of VG while RAID LVs are active.

Mirror and snapshot LVs are already checked for when switching the cluster
attribute of a VG.  This patch adds RAID.

12 years agoWHATS_NEW
Peter Rajnoha [Wed, 25 Apr 2012 09:32:36 +0000 (09:32 +0000)]
WHATS_NEW

12 years agoAllow a subset of failed devices to be replaced in RAID LVs.
Jonathan Earl Brassow [Tue, 24 Apr 2012 20:05:31 +0000 (20:05 +0000)]
Allow a subset of failed devices to be replaced in RAID LVs.

If two devices in an array failed, it was previously impossible to replace
just one of them.  This patch allows for the replacement of some, but perhaps
not all, failed devices.

12 years agoPrevent resume from creating error devices that already exist from suspend.
Jonathan Earl Brassow [Tue, 24 Apr 2012 20:00:03 +0000 (20:00 +0000)]
Prevent resume from creating error devices that already exist from suspend.

Thanks to agk for providing the patch that prevents resume from attempting
(and then failing) to create error devices which already exist; having been
created by a corresponding suspend operation.

12 years agoSynchronize with self-destruction of dmeventd
Zdenek Kabelac [Tue, 24 Apr 2012 12:25:12 +0000 (12:25 +0000)]
Synchronize with self-destruction of dmeventd

In some occasional case dmevent restart was experiencing problems
with obtaining pid lockfile. So this patch tries to send several more kill
message until daemon kills itself so there is would reponse.
With this small loop the restart seems to work reliable,
although the loopsize and usleep are just randomly picked for now.

12 years agoExpect failure if the reduction doesn't really happen
Zdenek Kabelac [Tue, 24 Apr 2012 12:17:49 +0000 (12:17 +0000)]
Expect failure if the reduction doesn't really happen

12 years agoAdd some lock comments
Zdenek Kabelac [Tue, 24 Apr 2012 12:17:12 +0000 (12:17 +0000)]
Add some lock comments

12 years agoUpdate singlenode locking
Zdenek Kabelac [Tue, 24 Apr 2012 12:16:40 +0000 (12:16 +0000)]
Update singlenode locking

Support lock conversion
Work also with LCK_READ
TODO: do more validation.

12 years agoSort lvs options by alphabet
Zdenek Kabelac [Tue, 24 Apr 2012 12:14:17 +0000 (12:14 +0000)]
Sort lvs options by alphabet

12 years agoUpdate some lvs column names
Zdenek Kabelac [Tue, 24 Apr 2012 12:13:29 +0000 (12:13 +0000)]
Update some lvs column names

Fix thin_pool -> pool_lv
Add more fields supported by thin provisioning.
Keep fields alphabetically sorted for easier lookup.

12 years agoAlso rename DevNos header to DevNosUsed in dmsetup info -c output.
Peter Rajnoha [Tue, 24 Apr 2012 08:24:36 +0000 (08:24 +0000)]
Also rename DevNos header to DevNosUsed in dmsetup info -c output.

12 years agoRename (Blk)DevNames header to (Blk)DevNamesUsed in dmsetup info -c output.
Peter Rajnoha [Tue, 24 Apr 2012 08:00:55 +0000 (08:00 +0000)]
Rename (Blk)DevNames header to (Blk)DevNamesUsed in dmsetup info -c output.

Just to make it clearer since there is the "dmsetup info -c -o blkdevname"
as well that shows the "block device name for this mapping", having a
"BlkDevName" header on output.

It's a bit confusing then if the "dmsetup info -c -o devs_used,blkdevs_used"
is named with a plural "DevNames"/"BlkDevNames" but at the same time having
a totally different meaning than the singular form "BlkDevName".

  DevNames --> DevNamesUsed
  BlkDevNames --> BlkDevNamesUsed

...makes it much more comprehensible.

12 years agoHandle replacement of an active device that goes missing with an error device.
Alasdair Kergon [Tue, 24 Apr 2012 00:51:26 +0000 (00:51 +0000)]
Handle replacement of an active device that goes missing with an error device.
(E.g. lvchange --refresh --partial on striped LV if a PV disappeared.)

12 years agoUnlike 'mirror' segtype, 'raid1' should perform flush on suspend.
Jonathan Earl Brassow [Fri, 20 Apr 2012 14:17:44 +0000 (14:17 +0000)]
Unlike 'mirror' segtype, 'raid1' should perform flush on suspend.

The 'mirror' segtype and 'raid1' segtype both set the 'MIRRORED' flag.
However, due to differences in the way these device-mapper targets behave
'mirror' must be suspended with the 'noflush' option and 'raid1' does not
have to be.

This patch ensures that when the 'MIRRORED' flag is checked to see if
'noflush' is needed that it does not also set it for 'raid1' by mistake.

12 years agoFix for bug 807776: invalid lvconvert --merge output should mention raid1 now
Jonathan Earl Brassow [Thu, 19 Apr 2012 21:50:37 +0000 (21:50 +0000)]
Fix for bug 807776: invalid lvconvert --merge output should mention raid1 now

s/snapshot/mergeable volume/

12 years ago.
Alasdair Kergon [Thu, 19 Apr 2012 13:47:38 +0000 (13:47 +0000)]
.

12 years ago.
Alasdair Kergon [Thu, 19 Apr 2012 13:47:11 +0000 (13:47 +0000)]
.

12 years agoAdd udev info and context to lvmdump.
Peter Rajnoha [Wed, 18 Apr 2012 15:26:02 +0000 (15:26 +0000)]
Add udev info and context to lvmdump.
--------------------------------------------------------------------

12 years agoAdd a rudimentary lvmetad manpage.
Petr Rockai [Sun, 15 Apr 2012 15:40:48 +0000 (15:40 +0000)]
Add a rudimentary lvmetad manpage.

12 years agoRemove 'up' from rounding message that sometimes rounds down.
Alasdair Kergon [Thu, 12 Apr 2012 15:11:21 +0000 (15:11 +0000)]
Remove 'up' from rounding message that sometimes rounds down.
Detect reduction of 0 after rounding for stripes and avoid warning of potential data loss.

12 years agoFix code that performs RAID device replacement while under snapshot.
Jonathan Earl Brassow [Thu, 12 Apr 2012 03:16:37 +0000 (03:16 +0000)]
Fix code that performs RAID device replacement while under snapshot.

The code should have been calling [suspend|resume]_lv_origin() rather than
[suspend|resume]_lv.

This addresses bug 807069.

12 years agoFix inability to split RAID1 image while specifying a particular PV.
Jonathan Earl Brassow [Wed, 11 Apr 2012 14:20:19 +0000 (14:20 +0000)]
Fix inability to split RAID1 image while specifying a particular PV.

The logic for resuming the original and newly split LVs was not properly
done to handle situations where anything but the last device in the array
was split.  It did not take into account the possible name collisions that
might occur when the original LV undergoes the shifting and renaming of its
sub-LVs.

12 years agoUpdate test
Zdenek Kabelac [Wed, 11 Apr 2012 12:53:46 +0000 (12:53 +0000)]
Update test

12 years agospacing
Alasdair Kergon [Wed, 11 Apr 2012 12:49:10 +0000 (12:49 +0000)]
spacing

12 years agoUpdate man pages
Zdenek Kabelac [Wed, 11 Apr 2012 12:42:10 +0000 (12:42 +0000)]
Update man pages

Use one style for man pages.

12 years agoFix lvresize for thin pool
Zdenek Kabelac [Wed, 11 Apr 2012 12:40:03 +0000 (12:40 +0000)]
Fix lvresize for thin pool

When resizing thin pool - we need to use strip info from  _tdata volume.
In future more generic solution will be necessary once we start to support
lvconvert (resize of stacked devices and stay properly aligned).
For now we just allow striped or linear LV so this code will work.

12 years agoLvresize rounds upward
Zdenek Kabelac [Wed, 11 Apr 2012 12:36:37 +0000 (12:36 +0000)]
Lvresize rounds upward

When given lvresize new size - round upward for stripes - unless we use % and
we are at the border of free extents.

This patch is not a complete fix and few more cases will need special care.

12 years agoSupport rounding downward for lvcreate and %
Zdenek Kabelac [Wed, 11 Apr 2012 12:33:34 +0000 (12:33 +0000)]
Support rounding downward for lvcreate and %

If specifying size with % and we are reaching number
of free extents - round downward with stripes.

12 years agoMove check for min strip size
Zdenek Kabelac [Wed, 11 Apr 2012 12:30:48 +0000 (12:30 +0000)]
Move check for min strip size

and remove few asigns that are not needed.

12 years agoChange message severity to log_very_verbose for missing dev info in udev db.
Peter Rajnoha [Wed, 11 Apr 2012 09:12:02 +0000 (09:12 +0000)]
Change message severity to log_very_verbose for missing dev info in udev db.

Libudev does not provide transactions when querying udev database - once we
get the list of block devices (devices/obtain_device_list_from_udev=1) and
we iterate over the list to get more detailed information about device node
and symlink names used etc., the device could be removed just in between we
get the list and put a query for more info. In this case, libudev returns
NULL value as the device does not exist anymore.

Recently, we've added a warning message to reveal such situations. However,
this could be misleading if the device is not related to the LVM action
we're just processing - the non-related block device could be removed in
parallel and this is not an error but a possible and normal operation.

(N.B. This "missing info" should not happen when devices are related to
the LVM action we're just processing since all such processing should be
synchronized with udev and the udev db must always be in consistent state
after the sync point. But we can't filter this situation out from others,
non-related devices, so we have to lower the message verbosity here for a
general solution.)

12 years agoRAID LVs could not handle a down-convert if a device other than the last one
Jonathan Earl Brassow [Wed, 11 Apr 2012 01:23:29 +0000 (01:23 +0000)]
RAID LVs could not handle a down-convert if a device other than the last one
in the array was specified for removal.  This change addresses that (bz806111).

12 years agoCommit ID 46a75dedb4f6aa815a804f27cafbd3fd16a62011 consolidated code from the
Jonathan Earl Brassow [Tue, 10 Apr 2012 23:34:41 +0000 (23:34 +0000)]
Commit ID 46a75dedb4f6aa815a804f27cafbd3fd16a62011 consolidated code from the
various dmeventd plug-ins into a new function called 'dmeventd_lvm2_command',
but the new function did not strip off the "_mlog" extentions that the
mirror plug-in had been doing.  This created bug 794904 - failure to replace
devices in a redundant log.

The test suite did catch this scenario because it performs repair tests (mainly)
through the CLI and not dmeventd.  It's also not easy to test because the test
itself will hang if the bug is encountered.

12 years agoAdd a couple new functions to gdbinit file and decode a couple lv->status flags
Jonathan Earl Brassow [Tue, 10 Apr 2012 23:24:00 +0000 (23:24 +0000)]
Add a couple new functions to gdbinit file and decode a couple lv->status flags
New functions:
 - seg_pvs: Print a list of PVs in a seg_pvs list
 - pv_dev_name: print name of a PV

12 years agostrcpy -> strncpy in common daemon code.
Peter Rajnoha [Tue, 10 Apr 2012 12:55:37 +0000 (12:55 +0000)]
strcpy -> strncpy in common daemon code.

12 years agoCheck if info struct returned is not NULL.
Peter Rajnoha [Tue, 10 Apr 2012 12:26:27 +0000 (12:26 +0000)]
Check if info struct returned is not NULL.

Just some missing checks revealed by Coverity in recent code.

12 years agoFix unlocking in error path of vgreduce
Zdenek Kabelac [Fri, 30 Mar 2012 14:59:35 +0000 (14:59 +0000)]
Fix unlocking in error path of vgreduce

When vg_read fails, it internally unlocks VG if it's been locked,
so in error path we should skip unlock_vg for this case.
(user would see ugly internal warning)

12 years agoWHATS_NEW
Peter Rajnoha [Fri, 30 Mar 2012 11:39:52 +0000 (11:39 +0000)]
WHATS_NEW

12 years agoDetect VG name being part of the LV name in lvconvert --splitmirrors -n.
Peter Rajnoha [Fri, 30 Mar 2012 08:58:02 +0000 (08:58 +0000)]
Detect VG name being part of the LV name in lvconvert --splitmirrors -n.

Before:
devel/~ # lvconvert --splitmirrors 1 -n vg/splitted_one vg/mirrored_one
  Internal error: LV name vg/splitted_one has invalid form.
  Intermediate VG metadata write failed.

After:
devel/~ # lvconvert --splitmirrors 1 -n vg/splitted_one vg/mirrored_one
  Logical volume mirrored_one converted.

devel/~ # lvconvert --splitmirrors 1 -n abc/splitted_one vg/mirrored_one
  Please use a single volume group name ("vg" or "abc")
  Run `lvconvert --help' for more information.

12 years agoMinor fixes
Zdenek Kabelac [Wed, 28 Mar 2012 11:11:25 +0000 (11:11 +0000)]
Minor fixes

Just small updates and remove <backtrace> after log_error.

12 years agoImprove test suite
Zdenek Kabelac [Wed, 28 Mar 2012 11:10:08 +0000 (11:10 +0000)]
Improve test suite

Add make help target.
Add LVM_TEST_PARALLEL to support parallel runs of tests
Work around the problem the dmsetup table/info may return error
by using dmtable and dminfo function that will use 'should'.
(Error happens when some concurently running process removes table
entry while dmsetup command resolves table entries inside the loop.)

12 years agoFix tests to work with vgscan --cache fixing inconsistent metadata.
Peter Rajnoha [Wed, 28 Mar 2012 07:46:35 +0000 (07:46 +0000)]
Fix tests to work with vgscan --cache fixing inconsistent metadata.

12 years agoAvoid closing clvmd socket twice.
Milan Broz [Tue, 27 Mar 2012 16:59:28 +0000 (16:59 +0000)]
Avoid closing clvmd socket twice.

12 years agoFix exclusive lvmchange -aey to fail if volume is active on different node.
Milan Broz [Tue, 27 Mar 2012 15:53:45 +0000 (15:53 +0000)]
Fix exclusive lvmchange -aey to fail if volume is active on different node.

Activation on remote node should be tried only if it is masked by tags
locally (like when hosttags enabled, IOW activate_lv_excl_local()
doesn't return error.)

Introduced change caused that lvchange -aey succeeded even if volume was
activated exclusively remotely.

12 years agoThere is no hotsname_tags but only hosttags... sigh, even docs is wrong :-)
Milan Broz [Tue, 27 Mar 2012 13:39:08 +0000 (13:39 +0000)]
There is no hotsname_tags but only hosttags... sigh, even docs is wrong :-)

12 years agoFail early if cmirror is not detected and pvmove requires it.
Milan Broz [Tue, 27 Mar 2012 12:01:22 +0000 (12:01 +0000)]
Fail early if cmirror is not detected and pvmove requires it.

12 years agoAlso skip pvmove for remotely active LVs.
Milan Broz [Tue, 27 Mar 2012 11:43:32 +0000 (11:43 +0000)]
Also skip pvmove for remotely active LVs.

12 years agoAdd 'vgscan --cache' functionality for consistency with 'pvscan --cache'.
Peter Rajnoha [Tue, 27 Mar 2012 11:04:46 +0000 (11:04 +0000)]
Add 'vgscan --cache' functionality for consistency with 'pvscan --cache'.

Calling vgscan alone should reuse information from the lvmetad (if running).
The --cache option should initiate direct device scan and update lvmetad
appropriately (if running).

This is mainly for vgscan to behave consistently compared to pvscan.

12 years agoadd make install_verity
Alasdair Kergon [Mon, 26 Mar 2012 23:23:31 +0000 (23:23 +0000)]
add make install_verity

12 years agoRename verity dir
Alasdair Kergon [Mon, 26 Mar 2012 23:09:37 +0000 (23:09 +0000)]
Rename verity dir

12 years agoKeep exclusive activation in pvmove if LV is already active.
Milan Broz [Mon, 26 Mar 2012 20:33:40 +0000 (20:33 +0000)]
Keep exclusive activation in pvmove if LV is already active.

Pvmove should never try to downgrade exclusive lock
for LVs.

This allows pvmove to work again for exclusive activated LVs.

12 years agoDo not allow pvmove if some affected LVs are activated
Milan Broz [Mon, 26 Mar 2012 20:32:58 +0000 (20:32 +0000)]
Do not allow pvmove if some affected LVs are activated
locally or on more nodes while others are activated exclusively.

Current pvmove code can either use local mirror (for exclusive
activation) or cmirror (for clustered LVs).

Because the whole intenal pvmove LV is just segmented LV containing
segments of several top-level LVs, code cannot properly handle
situation if some segment need to be activated exclusively.

Previously, it wrongly activated exclusive LV on all nodes
(locing code allowed it) but now this is no lnger possible.

If there is exclusively activated LV, pvmove is only
possible if all affected LVs are aslo activated exclusively.

(Note that in non-exclusive mode pvmove still activates LVs
on other nodes during move.)

# lvchange -aly vg_test/lv1
# lvchange -aey vg_test/lv2
# pvmove -i 1 /dev/sdc
   Error locking on node bar-01: Device or resource busy
   Error locking on node bar-03: Volume is busy on another node
...
   Failed to activate lv2

12 years agoUse new flag PVMOVE_EXCLUSIVE in update_metatada call.
Milan Broz [Mon, 26 Mar 2012 20:31:01 +0000 (20:31 +0000)]
Use new flag PVMOVE_EXCLUSIVE in update_metatada call.

There is no real functional change in this patch except it
avoids checking cluster cmirror module twice.

(Flag used in following patch.)

12 years agoRemove unused and wrongly set cluster VG flag from clvmd lock query command.
Milan Broz [Mon, 26 Mar 2012 20:29:45 +0000 (20:29 +0000)]
Remove unused and wrongly set cluster VG flag from clvmd lock query command.

12 years agofixes/improvements
Alasdair Kergon [Sat, 24 Mar 2012 02:58:56 +0000 (02:58 +0000)]
fixes/improvements

12 years agoFirst veritysetup version using configure --with-veritysetup.
Alasdair Kergon [Sat, 24 Mar 2012 01:59:59 +0000 (01:59 +0000)]
First veritysetup version using configure --with-veritysetup.

12 years agoFix pvmove if LV is activated exclusively but cmirror is not running.
Milan Broz [Fri, 23 Mar 2012 16:28:40 +0000 (16:28 +0000)]
Fix pvmove if LV is activated exclusively but cmirror is not running.

In this case we should allow to use local mirror, check for cmirror
should apply only for lvconvert/lvcreate.

Introduced in 2.02.86 by removing !(lv->status & ACTIVATE_EXCL).

(Partially workaround, it is minimalistic patch for now.)

12 years agoAdd fixmes
Zdenek Kabelac [Fri, 23 Mar 2012 10:34:51 +0000 (10:34 +0000)]
Add fixmes

There is missing some proper reaction when update fails ?

12 years agoAlways free hash table
Zdenek Kabelac [Fri, 23 Mar 2012 10:33:26 +0000 (10:33 +0000)]
Always free hash table

also in error path

12 years agoUpdate and fix monitoring of thin pool devices
Zdenek Kabelac [Fri, 23 Mar 2012 09:58:04 +0000 (09:58 +0000)]
Update and fix monitoring of thin pool devices

Code adds better support for monitoring of thin pool devices.
update_pool_lv uses DMEVENTD_MONITOR_IGNORE to not manipulate with monitoring.
vgchange & lvchange are checking real thin pool device for existance
as we are using   _tpool  real device and visible LV pool device might not
be even active (_tpool is activated implicitely for any thin volume).
monitor_dev_for_events is another _lv_postorder like code it might be worth
to think about reusing it here - for now update the code to properly
monitory thin volume deps.
For unmonitoring add extra code to check the usage of thin pool - in case it's in use
unmonitoring of thin volume is skipped.

12 years agoReturn mem fail if hash insert fails
Zdenek Kabelac [Fri, 23 Mar 2012 09:48:17 +0000 (09:48 +0000)]
Return mem fail if hash insert fails

12 years agoMake sure namelen fits into buffer allocated on stack
Zdenek Kabelac [Fri, 23 Mar 2012 09:43:44 +0000 (09:43 +0000)]
Make sure namelen fits into buffer allocated on stack

12 years agoFix typo in config option check
Zdenek Kabelac [Fri, 23 Mar 2012 09:42:36 +0000 (09:42 +0000)]
Fix typo in config option check

12 years agoImprove teardown_devs
Zdenek Kabelac [Fri, 23 Mar 2012 09:41:20 +0000 (09:41 +0000)]
Improve teardown_devs

Try to avoid start of dmeventd during vgremove if the code has any bug
inside.

12 years agoUpdate debug message
Zdenek Kabelac [Fri, 23 Mar 2012 09:39:59 +0000 (09:39 +0000)]
Update debug message

(compiled only with special debug define)

12 years agoUpdate lcov target
Zdenek Kabelac [Fri, 23 Mar 2012 09:39:03 +0000 (09:39 +0000)]
Update lcov target

12 years agoFix regression in thin monitoring
Zdenek Kabelac [Tue, 20 Mar 2012 17:42:19 +0000 (17:42 +0000)]
Fix regression in thin monitoring

Patch https://www.redhat.com/archives/lvm-devel/2012-February/msg00118.html
removed initilization of thin volume monitoring, leaving it only for
thin pool - but missed the code move part for monitoring of thin pools.
Effectively making thin pools not monitorable.

12 years agoFix check for passed in path for dmeventd startup
Zdenek Kabelac [Tue, 20 Mar 2012 17:38:47 +0000 (17:38 +0000)]
Fix check for passed in path for dmeventd startup

Check passed in executable path for dmeventd instead of predefined
compiled in path which is not the thing to be executed.

12 years agoSleep longer in the test so it really dies properly
Zdenek Kabelac [Tue, 20 Mar 2012 13:35:46 +0000 (13:35 +0000)]
Sleep longer in the test so it really dies properly

and check for right exit code from pgrep

12 years agoUpdate testing scripts
Zdenek Kabelac [Tue, 20 Mar 2012 10:51:57 +0000 (10:51 +0000)]
Update testing scripts

Make the teardown really usable - it will try down to remove all the left
devices even from previous test runs
(the only missing piece is probably proper mdadm teardown)
Add few more local vars
Try to setup PATH and LD_LIBRARY_PATH just once.
Try shorter sleeps.

12 years agoUpdate test for dmevent restart
Zdenek Kabelac [Tue, 20 Mar 2012 10:48:59 +0000 (10:48 +0000)]
Update test for dmevent restart

Actually restart was failing for different reason - so pass in proper
location of dmeventd for restart from lvm command and avoid using
the one from /sbin location.

Update pv create test with "" around path.

12 years agoSupport improperly formated device numbers
Zdenek Kabelac [Tue, 20 Mar 2012 10:47:02 +0000 (10:47 +0000)]
Support improperly formated device numbers

There are kernel drivers (smblk) which set '-1' as their device major number.
This number is listed in /proc/devices then - but the kernel itself is using
just 12 bits - thus device is accessible via 4095 - there is posted patch
for 3.4 to fix this behavior (0 for auto allocation was mean to be used).

However to still allow using such devices with older kernels add some code
to use same behavior - so cut 12 bits from the major number from /proc/devices.

For now use log_warn() - maybe the severity of the message could be lowered
to just verbose level.

12 years agoDo exit if LISTEN_PID environment variable not correct during systemd handover.
Peter Rajnoha [Fri, 16 Mar 2012 21:30:53 +0000 (21:30 +0000)]
Do exit if LISTEN_PID environment variable not correct during systemd handover.

This page took 0.069738 seconds and 5 git commands to generate.