]> sourceware.org Git - lvm2.git/log
lvm2.git
13 years agoRemove explicit double quotes from columns.h 'id' entries.
Dave Wysochanski [Fri, 20 Aug 2010 12:44:17 +0000 (12:44 +0000)]
Remove explicit double quotes from columns.h 'id' entries.

The 'id' entries in columns.h are the report field names.  Since these are
unique, we'd like to use them in generation of 'get' / 'set' functions.
As a step towards using them for this purpose, remove the explicit double
quotes and use the macro '#' character to add the double quotes back when
placing them into the '_fields' array 'id' member.

13 years agoAdd 'flags' field to columns.h and define FIELD_MODIFIABLE.
Dave Wysochanski [Fri, 20 Aug 2010 12:44:03 +0000 (12:44 +0000)]
Add 'flags' field to columns.h and define FIELD_MODIFIABLE.

Add a 'flags' field to columns.h, and set it to 0 by default.
Define FIELD_MODIFIABLE flag to indicate whether a 'set' function exists
to change the field's value.

13 years agoAdd vg_mda_size and vg_mda_free functions.
Dave Wysochanski [Fri, 20 Aug 2010 12:43:49 +0000 (12:43 +0000)]
Add vg_mda_size and vg_mda_free functions.

Add supporting functions to get vg_mda_size and vg_mda_free fields.
Should be no functional change.

13 years agoFix wrong use of LCK_WRITE
Milan Broz [Thu, 19 Aug 2010 23:26:31 +0000 (23:26 +0000)]
Fix wrong use of LCK_WRITE

In all top vg read functions only LCK_VG_READ/WRITE can be used.
All other vg lock definitions are low-level backend machinery.

Moreover, LCK_WRITE cannot be tested through bitmask.
This patch fixes these mistakes.

For _recover_vg() we do not need lock_flags, it can be only
two of above and we always upgrading to LCK_VG_WRITE lock there.
(N.B. that code is racy)

There is no functional change in code (despite wrong masking
it produces correct bits:-)

13 years agoDetect LUKS signature in pvcreate
Milan Broz [Thu, 19 Aug 2010 23:08:18 +0000 (23:08 +0000)]
Detect LUKS signature in pvcreate

One shiny day we should use libblkid here. But now using LUKS is
very common together with LVM and pvcreate destroys LUKS completely.

So for user's convenience, try to detect LUKS signature and allow abort.

13 years agoFix file descriptor leak in swap signature detection
Milan Broz [Thu, 19 Aug 2010 23:05:45 +0000 (23:05 +0000)]
Fix file descriptor leak in swap signature detection

13 years agoRemove assumption that --yes must be used only in --force mode
Milan Broz [Thu, 19 Aug 2010 23:04:37 +0000 (23:04 +0000)]
Remove assumption that --yes must be used only in --force mode

This is not only undocumented but is is also in violation with --help
documentation.

Using --yes without --force is useful in pvcreate when it detects
old signature.

13 years agoChange the pvcreate swap/md logic
Milan Broz [Thu, 19 Aug 2010 23:03:34 +0000 (23:03 +0000)]
Change the pvcreate swap/md logic

pvcreate detects MD and swap signature.

The logic hidden there is not only documented but it is also
user unfriendly. Who invented this logic should run pvcreate
on its own critical MD device to see why;-)

This patch
 - creates one function instead of duplication code
 - asks if user want to overwrite signature
 - allows aborting (!)
 (Please note that writing LVM signatute without wiping old
 is wrong, it confuses blkid, MD will not work anyway and
 swap and LUKS is broken too.)

13 years agopost-release
Alasdair Kergon [Thu, 19 Aug 2010 22:33:14 +0000 (22:33 +0000)]
post-release

13 years agopre-release
Alasdair Kergon [Wed, 18 Aug 2010 20:57:10 +0000 (20:57 +0000)]
pre-release

13 years agoFix dm-mod autoloading logic to not assume control node is set correctly.
Peter Rajnoha [Wed, 18 Aug 2010 13:11:56 +0000 (13:11 +0000)]
Fix dm-mod autoloading logic to not assume control node is set correctly.

We can't rely on the fact that udev should prepare the node with right major
and minor number to trigger the module autoloading. We have to take into
account that the node could be missing or it could exist with improper
major and minor number assigned (e.g. from previous kernel versions in
an environment with static nodes and without udev). Make any corrections
if needed!

13 years agoFix for bug 596453: multiple mirror image failures cause lvm repair...
Jonathan Earl Brassow [Tue, 17 Aug 2010 23:56:23 +0000 (23:56 +0000)]
Fix for bug 596453: multiple mirror image failures cause lvm repair...

The lvm repair issues I believe are the superficial symptoms of this
bug - there are worse issues that are not as clearly seen.  From my
inline comments:
* If the mirror was successfully recovered, we want to always
* force every machine to write to all devices - otherwise,
* corruption will occur.  Here's how:
*    Node1 suffers a failure and marks a region out-of-sync
*    Node2 attempts a write, gets by is_remote_recovering,
*          and queries the sync status of the region - finding
*          it out-of-sync.
*    Node2 thinks the write should be a nosync write, but it
*          hasn't suffered the drive failure that Node1 has yet.
*          It then issues a generic_make_request directly to
*          the primary image only - which is exactly the device
*          that has suffered the failure.
*    Node2 suffers a lost write - which completely bypasses the
*          mirror layer because it had gone through generic_m_r.
*    The file system will likely explode at this point due to
*    I/O errors.  If it wasn't the primary that failed, it is
*    easily possible in this case to issue writes to just one
*    of the remaining images - also leaving the mirror inconsistent.
*
* We let in_sync() return 1 in a cluster regardless of what is
* in the bitmap once recovery has successfully completed on a
* mirror.  This ensures the mirroring code will continue to
* attempt to write to all mirror images.  The worst that can
* happen for reads is that additional read attempts may be
* taken.

13 years agoAttempt to fix buildbot failure in t-lvconvert-mirror.sh due to failing to
Alasdair Kergon [Tue, 17 Aug 2010 22:01:41 +0000 (22:01 +0000)]
Attempt to fix buildbot failure in t-lvconvert-mirror.sh due to failing to
wait for mirror to get into sync before running subsequent command.

13 years agoUse 'SINGLENODE' instead of 'dead' in clvmd singlenode messages.
Alasdair Kergon [Tue, 17 Aug 2010 19:25:05 +0000 (19:25 +0000)]
Use 'SINGLENODE' instead of 'dead' in clvmd singlenode messages.
Ignore snapshots when performing mirror recovery beneath an origin.
Pass LCK_ORIGIN_ONLY flag around cluster.
Add suspend_lv_origin and resume_lv_origin using LCK_ORIGIN_ONLY.

13 years agoAllow internal suspend and resume of origin without its snapshots.
Alasdair Kergon [Tue, 17 Aug 2010 16:25:32 +0000 (16:25 +0000)]
Allow internal suspend and resume of origin without its snapshots.

13 years agoFix dev_manager_transient to access -real device not snapshot-origin. (brassow)
Alasdair Kergon [Tue, 17 Aug 2010 01:51:12 +0000 (01:51 +0000)]
Fix dev_manager_transient to access -real device not snapshot-origin. (brassow)

Another reminder why cloning functions impedes maintenance.

13 years agoMonitor origin -real device below snapshot instead of overlay device. (brassow)
Alasdair Kergon [Tue, 17 Aug 2010 01:16:41 +0000 (01:16 +0000)]
Monitor origin -real device below snapshot instead of overlay device. (brassow)

13 years agoDon't really change monitoring status when in test mode.
Alasdair Kergon [Mon, 16 Aug 2010 23:29:09 +0000 (23:29 +0000)]
Don't really change monitoring status when in test mode.

13 years agoAdd some v1 to v2 metadata upgrade testing.
Mike Snitzer [Mon, 16 Aug 2010 23:21:20 +0000 (23:21 +0000)]
Add some v1 to v2 metadata upgrade testing.

13 years agoVarious small cleanups and fixes related to monitoring.
Alasdair Kergon [Mon, 16 Aug 2010 22:54:35 +0000 (22:54 +0000)]
Various small cleanups and fixes related to monitoring.

13 years agoRemove superfluous NULL pointer tests before dm_free from dmeventd.
Alasdair Kergon [Mon, 16 Aug 2010 18:19:46 +0000 (18:19 +0000)]
Remove superfluous NULL pointer tests before dm_free from dmeventd.

13 years agoFix for bug 612291: dm devices of split off mirror images are not removed
Jonathan Earl Brassow [Mon, 16 Aug 2010 18:02:14 +0000 (18:02 +0000)]
Fix for bug 612291: dm devices of split off mirror images are not removed

DM devices were not handled properly on nodes in a cluster that were not
where the splitmirrors command was issued.  This was happening because
suspend_lv/resume_lv were being used in a place where activate_lv should
have been used.

When the suspend/resume are issued on (effectively) new LVs, their
'resource' (UUID) is not located in the lv_hash.  Thus, both operations
turn into no-ops.  You can see this from the output of clvmd from one
of the remote nodes:
<snip>
do_suspend_lv, lock not already held
<snip>
do_resume_lv, lock not already held

'activate_lv' enjoins the other nodes in the cluster to process the lock
and activate the new LV.  clvmd output from remote node as follows:
do_lock_lv: resource 'zMseY7CBuO3Ty09vXlplPAHzD0Y0CovjrTdv0R1VcwggMwPdYhutHErRcwm5Nd2S', cmd = 0x19 LCK_LV_ACTIVATE (READ|LV|NONBLOCK), flags = 0x84 (DMEVENTD_MONITOR ), memlock = 1
sync_lock: 'zMseY7CBuO3Ty09vXlplPAHzD0Y0CovjrTdv0R1VcwggMwPdYhutHErRcwm5Nd2S' mode:1 flags=1
sync_lock: returning lkid 27b0001

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
13 years agoset DEFAULT_RUN_DIR (missed from earlier checkin?)
Alasdair Kergon [Mon, 16 Aug 2010 17:49:26 +0000 (17:49 +0000)]
set DEFAULT_RUN_DIR (missed from earlier checkin?)

13 years agoWHATS_NEW_DM
Peter Rajnoha [Mon, 16 Aug 2010 11:22:08 +0000 (11:22 +0000)]
WHATS_NEW_DM

13 years agodm-mod autoloading support is in kernel 2.6.36 actually.
Peter Rajnoha [Mon, 16 Aug 2010 11:13:18 +0000 (11:13 +0000)]
dm-mod autoloading support is in kernel 2.6.36 actually.

14 years agoFix udev rules to support udev database content generated by older rules.
Peter Rajnoha [Thu, 12 Aug 2010 13:41:18 +0000 (13:41 +0000)]
Fix udev rules to support udev database content generated by older rules.

This can happen with older rules (without support for synthesized events)
that are still part of initrd while using new udev rules in the system itself.

The consequence was that new udev rules incorrectly assumed that not having
DM_UDEV_PRIMARY_SOURCE_FLAG set always means the uevent is synthesized and
inappropriate (device is still not properly activated) and so it should be
ignored. However, initrd is not updated automatically while updating the
libdevmapper/udev rules in the system and so we end up with the rules not
detecting and setting crucial parts in the initrd environment and the rules
in the system that rely on the information that should have been stored in
udev db (which is incorrect in this configuration, of course).

The overall consequence is that the update of libdevmapper/lvm2 without
regenerating the initrd could end up with a boot failure! Ignoring the event
means removing any existing symlinks in /dev!

To fix this, increase udev rules version to make a difference. So from now on,
mark rules without proper support for synthesized events as
DM_UDEV_RULES_VSN="1" and 2 (or higher) if that support is included.

14 years agoReinstate detection of inappropriate uevent with DISK_RO set and suppress it.
Peter Rajnoha [Thu, 12 Aug 2010 13:07:08 +0000 (13:07 +0000)]
Reinstate detection of inappropriate uevent with DISK_RO set and suppress it.

We still need to detect this one! We're not so strict with CHANGE events as
with the ADD events while applying filters in the rules so this one would
pass and it would process the rules prematurely (because it appears *before*
the actual CHANGE event used when resuming a DM device while setting read-only
state at the same time).

14 years agoFix clvmd init script return code when executed as non-root user.
Fabio M. Di Nitto [Thu, 12 Aug 2010 09:14:59 +0000 (09:14 +0000)]
Fix clvmd init script return code when executed as non-root user.

clvmd daemon itself does the right thing when invoked as non-root, by
returning 4.

The patch removes the use daemon function from
/etc/rc.d/init.d/functions that´s unnecessary and has th bad habit to
mask the return codes from the real daemon.

Add a simple and generic check to see if clvmd is executed by root or not.

Our stop/reload/restart paths in the init script are complex and not all
the tools involved in the process are guaranteed to return 4 if executed
by non-root against a process that´s running as root (for example kill
-TERM will return -1 and parsing the output to catch the error is
suboptimal at best).

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

14 years agofix t-pvcreate-operation-md.sh to require kernel.org Linux >= 2.6.33 for
Mike Snitzer [Thu, 12 Aug 2010 04:56:05 +0000 (04:56 +0000)]
fix t-pvcreate-operation-md.sh to require kernel.org Linux >= 2.6.33 for
the final alignment_offset check.  In the future, might look to check
for the RHEL6 kernel too.

14 years agoChange default alignment of pe_start to 1MB.
Mike Snitzer [Thu, 12 Aug 2010 04:11:48 +0000 (04:11 +0000)]
Change default alignment of pe_start to 1MB.

The new standard in the storage industry is to default alignment of data
areas to 1MB.  fdisk, parted, and mdadm have all been updated to this
default.

Update LVM to align the PV's data area start (pe_start) to 1MB.  This
provides a more useful default than the previous default of 64K (which
generally ended up being a 192K pe_start once the first metadata area
was created).

Before this patch:
# pvs -o name,vg_mda_size,pe_start
  PV         VMdaSize  1st PE
  /dev/sdd     188.00k 192.00k

After this patch:
# pvs -o name,vg_mda_size,pe_start
  PV         VMdaSize  1st PE
  /dev/sdd    1020.00k   1.00m

The heuristic for setting the default alignment for LVM data areas is:
- If the default value (1MB) is a multiple of the detected alignment
  then just use the default.
- Otherwise, use the detected value.

In practice this means we'll almost always use 1MB -- that is unless:
- the alignment was explicitly specified with --dataalignment
- or MD's full stripe width, or the {minimum,optimal}_io_size exceeds
  1MB
- or the specified/detected value is not a power-of-2

14 years agoRequire --restorefile when using pvcreate --uuid.
Mike Snitzer [Thu, 12 Aug 2010 04:08:59 +0000 (04:08 +0000)]
Require --restorefile when using pvcreate --uuid.

Introduce --norestorefile to allow user to override the new requirement.

This can also be overridden with "devices/require_restorefile_with_uuid"
in lvm.conf -- however the default is 1.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agoWHATS_NEW_DM
Peter Rajnoha [Wed, 11 Aug 2010 13:12:31 +0000 (13:12 +0000)]
WHATS_NEW_DM

14 years agoRecognise and give preference to md device partitions (blkext major).
Peter Rajnoha [Wed, 11 Aug 2010 12:14:23 +0000 (12:14 +0000)]
Recognise and give preference to md device partitions (blkext major).

We can already detect MD devices internally. But when using MD partitions,
these have "block extended major" (blkext) assigned (259). Blkext major
is also used in general, so we need to check whether the original device
is an MD device actually.

14 years agoUpdate WHATS_NEW.
Petr Rockai [Mon, 9 Aug 2010 14:06:03 +0000 (14:06 +0000)]
Update WHATS_NEW.

14 years agoNever scan internal LVM devices.
Petr Rockai [Mon, 9 Aug 2010 14:05:16 +0000 (14:05 +0000)]
Never scan internal LVM devices.

14 years ago[REGEX] fix a long standing off-by-one error (found by valgrind-pool)
Joe Thornber [Mon, 9 Aug 2010 10:58:27 +0000 (10:58 +0000)]
[REGEX] fix a long standing off-by-one error (found by valgrind-pool)

14 years ago[MM] Make valgrind aware of the pool allocators
Joe Thornber [Mon, 9 Aug 2010 10:56:01 +0000 (10:56 +0000)]
[MM] Make valgrind aware of the pool allocators

./configure with --enable-valgrind-pool to enable this.

14 years ago[REGEX] fix bug in matcher that was causing segfault with chars of 0x80 and over.
Joe Thornber [Mon, 9 Aug 2010 10:30:52 +0000 (10:30 +0000)]
[REGEX] fix bug in matcher that was causing segfault with chars of 0x80 and over.

14 years ago[REGEX] Parse regexes that contain chars with value > 0x80
Joe Thornber [Mon, 9 Aug 2010 10:29:42 +0000 (10:29 +0000)]
[REGEX] Parse regexes that contain chars with value > 0x80

This is a long standing issue.  Fixed by casting a char value to
unsigned char before using it as an index into a bitset.

14 years ago[REGEX] add a unit test for regexes containing chars with value over x80
Joe Thornber [Mon, 9 Aug 2010 10:27:31 +0000 (10:27 +0000)]
[REGEX] add a unit test for regexes containing chars with value over x80

14 years ago[REGEX] matcher_t unit test now takes a flag to turn on fingerprinting
Joe Thornber [Mon, 9 Aug 2010 10:23:54 +0000 (10:23 +0000)]
[REGEX] matcher_t unit test now takes a flag to turn on fingerprinting

14 years agoFix for bug 619221 - log device splitting regression
Jonathan Earl Brassow [Fri, 6 Aug 2010 15:38:32 +0000 (15:38 +0000)]
Fix for bug 619221 - log device splitting regression

An incorrect fix on July 13, 2010 for an annoyance has caused a regression.
The offending check-in was part of the 2.02.71 release of LVM.  That
check-in caused any PVs specified on the command line to be ignored when
performing a mirror split.

This patch reverses the aforementioned check-in (solving the regressions)
and posits a new solution to the list reversal problem.  The original
problem was that we would always take the lowest mimage LVs from a mirror
when performing a split, but what we really want is to take the highest
mimage LVs.  This patch accomplishes that by working through the list in
reverse order - choosing the higher numbered mimages first.  (This also
reduces the amount of processing necessary.)

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Reviewed-by: Takahiro Yasui <takahiro.yasui@hds.com>
14 years agoA misunderstanding of the return value of 'dm_bit' has been causing a data
Jonathan Earl Brassow [Wed, 4 Aug 2010 18:18:18 +0000 (18:18 +0000)]
A misunderstanding of the return value of 'dm_bit' has been causing a data
corruption bug in cmirror.  'dm_bit' is only ever used as a boolean operation
within LVM, but it can return a range of values.  If the bit is set, a power of
2 is returned.  If the bit is unset, 0 is returned.

'log_test_bit' (a function in the cluster mirror log daemon code) has switched
to using the dm bit operations in rhel6.  There are two places in the daemon
code where 'log_test_bit' is not used merely as a boolean, but rather the
return value is used as the return value for the log functions 'is_clean' and
'in_sync' - having assumed that 'dm_bit' was returning 0 or 1 only.

One place the 'in_sync' function is utilized is in 'dm_rh_get_state' - a
function that informs the mirroring code how to treat I/O and which devices to
read/write from.  'dm_rh_get_state' was checking if the return value of
'in_sync' was 1 to determine if the region was DM_RH_CLEAN.  Since 'dm_bit'
(and by extension 'log_test_bit' and 'in_sync') was returning powers of 2,
DM_RH_CLEAN was rarely being reported as it should have been.  Thinking the
region was out-of-sync, the mirroring code would write only to the primary
device.  When the primary device was failed, all of those writes were lost -
leaving the entire mirror corrupted.

14 years agoReduce severity of the "mirror transient status" log message (this was never
Petr Rockai [Wed, 4 Aug 2010 15:55:03 +0000 (15:55 +0000)]
Reduce severity of the "mirror transient status" log message (this was never
intended to be a log_error).

14 years agoRequire logical volume(s) to be explicitly named for lvconvert --merge.
Mike Snitzer [Tue, 3 Aug 2010 20:22:31 +0000 (20:22 +0000)]
Require logical volume(s) to be explicitly named for lvconvert --merge.

14 years agoAvoid changing aligned pe_start as a side-effect of very verbose logging.
Mike Snitzer [Tue, 3 Aug 2010 18:19:42 +0000 (18:19 +0000)]
Avoid changing aligned pe_start as a side-effect of very verbose logging.

14 years agoUse built-in rules for device aliases: block/ < dm- < disk/ < mapper/ < other.
Peter Rajnoha [Tue, 3 Aug 2010 13:39:27 +0000 (13:39 +0000)]
Use built-in rules for device aliases: block/ < dm- < disk/ < mapper/ < other.

14 years agoFix 'void*' arithmetic warnings in dbg_malloc.c.
Zdenek Kabelac [Tue, 3 Aug 2010 13:24:07 +0000 (13:24 +0000)]
Fix 'void*' arithmetic warnings in dbg_malloc.c.
Use more readable char[idx] access instead of *char+idx access.

14 years agoFix 'void*' arithmetic warning in some functions from libdm-iface.c.
Zdenek Kabelac [Tue, 3 Aug 2010 13:16:21 +0000 (13:16 +0000)]
Fix 'void*' arithmetic warning in some functions from libdm-iface.c.

14 years agoFix const warning in dev_manager_info() and _dev_manager_lv_rmnodes().
Zdenek Kabelac [Tue, 3 Aug 2010 13:13:01 +0000 (13:13 +0000)]
Fix const warning in dev_manager_info() and _dev_manager_lv_rmnodes().

14 years agoFix constness warning in archive_file structure from archive.c.
Zdenek Kabelac [Tue, 3 Aug 2010 13:09:21 +0000 (13:09 +0000)]
Fix constness warning in archive_file structure from archive.c.

14 years agoUse void parameter for function definition.
Zdenek Kabelac [Tue, 3 Aug 2010 13:06:35 +0000 (13:06 +0000)]
Use void parameter for function definition.

14 years agoWait for node creation before displaying debug info in dmsetup.
Zdenek Kabelac [Tue, 3 Aug 2010 13:04:32 +0000 (13:04 +0000)]
Wait for node creation before displaying debug info in dmsetup.

Readahead check needs to see created node - so wait till udev gets in sync.

14 years agoClean generated files .exported_symbols_generated, example.conf for distclean.
Zdenek Kabelac [Tue, 3 Aug 2010 13:00:45 +0000 (13:00 +0000)]
Clean generated files .exported_symbols_generated, example.conf for distclean.

14 years agoFix return status 0 for "dmsetup info -c -o help".
Zdenek Kabelac [Tue, 3 Aug 2010 12:56:00 +0000 (12:56 +0000)]
Fix return  status 0 for "dmsetup info -c -o help".

Solution returns success for _report_init when help is passed,
and caller needs to check for _report existance.

14 years agoAdd check for kernel semaphore support and disable udev_sync if not available.
Peter Rajnoha [Tue, 3 Aug 2010 07:56:03 +0000 (07:56 +0000)]
Add check for kernel semaphore support and disable udev_sync if not available.

udev_sync feature requires semaphores (part of System V IPC) to be configured
in kernel (CONFIG_SYSVIPC). Check whether it is supported and if not, give
a warning message and disable udev synchronisation code automatically to
avoid any further error states and associated problems.

One should use the kernel with System V IPC support enabled or libdevmapper
with udev_sync feature disabled.

14 years agoTaka's fix for handling failure of all mirrored log devices and
Jonathan Earl Brassow [Mon, 2 Aug 2010 21:07:40 +0000 (21:07 +0000)]
Taka's fix for handling failure of all mirrored log devices and
all but one mirror leg.

<patch header>
To handle a double failure of a mirrored log, Jon's two patches are
commited, however, lvconvert command can't still handle an error
when mirror leg and mirrored log got failure at the same time.

  [Patch]: Handle both devices of a mirrored log failing (bug 607347)
  posted: https://www.redhat.com/archives/lvm-devel/2010-July/msg00009.html
  commit: https://www.redhat.com/archives/lvm-devel/2010-July/msg00027.html

  [Patch]: Handle both devices of a mirrored log failing (bug 607347) -
           additional fix
  posted: https://www.redhat.com/archives/lvm-devel/2010-July/msg00093.html
  commit: https://www.redhat.com/archives/lvm-devel/2010-July/msg00101.html

In the second patch, the target type of mirrored log is replaced with
error target when remove_log is set to 1, but this procedure should be
also used in other cases such as the number of mirror leg is 1. This
patch relocates the procedure to the main path.

In addition, I added following three changes.

- Removed tmp_orphan_lvs handling procedure
  It seems that _delete_lv() can handle detached_log_lv properly
  without adding mirror legs in mirrored log to tmp_orphan_lvs.
  Therefore, I removed the procedure.

- Removed vg_write()/vg_commit()
  Metadata is saved by vg_write()/vg_commit() just after detached_log_lv
  is handled. Therefore, I removed vg_write()/vg_commit().

- With Jon's second patch, we think that we don't have to call
  remove_mirror_log() in _lv_update_mirrored_log() because will be
  handled remove_mirror_images() in _lvconvert_mirrors_repaire().
</patch header>

Signed-off-by: Takahiro Yasui <takahiro.yasui@hds.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoDisallow mirrored logs in cluster mirrors.
Jonathan Earl Brassow [Mon, 2 Aug 2010 19:03:45 +0000 (19:03 +0000)]
Disallow mirrored logs in cluster mirrors.

The cluster log daemon (cmirrord) is not multi-threaded and
can handle only one request at a time.  When a log is stacked
on top of a mirror (which itself contains a 'core' log), it
creates a situation that cannot be solved without threading.

When the top level mirror issues a "resume", the log daemon
attempts to read from the log device to retrieve the log
state.  However, the log is a mirror which, before issuing
the read, attempts to determine the 'sync' status of the
region of the mirror which is to be read.  This sync status
request cannot be completed by the daemon because it is
blocked on a read I/O to the very mirror requesting the
sync status.

14 years agoFix lib.device-mapper to wait for include too
Alasdair Kergon [Mon, 2 Aug 2010 13:56:34 +0000 (13:56 +0000)]
Fix lib.device-mapper to wait for include too

14 years agoMinor speedup of lock test -
Zdenek Kabelac [Mon, 2 Aug 2010 13:23:01 +0000 (13:23 +0000)]
Minor speedup of lock test -
Instead of waiting for flock process finish kill the flock process.

14 years agoAdd shell function to trim spaces.
Zdenek Kabelac [Mon, 2 Aug 2010 13:20:50 +0000 (13:20 +0000)]
Add shell function to trim spaces.
Test values as "$val" to avoid weird results when spaces are in output.

14 years agoUsing count=0 is sufficient for creation of zeroed files.
Zdenek Kabelac [Mon, 2 Aug 2010 13:18:42 +0000 (13:18 +0000)]
Using count=0 is sufficient for creation of zeroed files.

14 years agoVisually better align lines which are executed as a result of true
Zdenek Kabelac [Mon, 2 Aug 2010 13:18:01 +0000 (13:18 +0000)]
Visually better align lines which are executed as a result of true
or false result of previous command.

14 years agoDo not use VPATH in include/Makefile
Zdenek Kabelac [Mon, 2 Aug 2010 13:17:03 +0000 (13:17 +0000)]
Do not use VPATH in include/Makefile

14 years agorevert the 'Base' change - that wasn't the cause of the problem
Alasdair Kergon [Mon, 2 Aug 2010 12:57:04 +0000 (12:57 +0000)]
revert the 'Base' change - that wasn't the cause of the problem

14 years ago Fix exported_symbols generation to use standard compiler arguments.
Alasdair Kergon [Mon, 2 Aug 2010 12:44:21 +0000 (12:44 +0000)]
  Fix exported_symbols generation to use standard compiler arguments.

14 years agoUse #include <> not "" in lvm2app.h which gets installed on the system.
Alasdair Kergon [Mon, 2 Aug 2010 12:23:01 +0000 (12:23 +0000)]
Use #include <> not "" in lvm2app.h which gets installed on the system.

14 years agoMake liblvm.device-mapper wait for include file generation.
Alasdair Kergon [Mon, 2 Aug 2010 12:10:35 +0000 (12:10 +0000)]
Make liblvm.device-mapper wait for include file generation.

14 years agoDrop explicit 'Base' version from exported symbols.
Alasdair Kergon [Sat, 31 Jul 2010 14:13:59 +0000 (14:13 +0000)]
Drop explicit 'Base' version from exported symbols.

14 years agoFix configure to supply DEFAULT_RUN_DIR to Makefiles.
Alasdair Kergon [Sat, 31 Jul 2010 00:43:41 +0000 (00:43 +0000)]
Fix configure to supply DEFAULT_RUN_DIR to Makefiles.

14 years agoFix wrong number of mirror log at allocate policy
Takahiro Yasui [Fri, 30 Jul 2010 17:50:15 +0000 (17:50 +0000)]
Fix wrong number of mirror log at allocate policy

With mirror_log_fault_policy of 'remove' and mirror_image_fault_policy
of 'allocate', the log type of the mirror volume is converted from
'disk' or 'mirrored' to 'core' when all mirror legs but one in a mirror
volume broke.

Keep new_log_count as a number of valid log devices by using log_count
variable for a temporary usage in the first phase of error recovery
in _lvconvert_mirrors_repair().

Signed-off-by: Takahiro Yasui <takahiro.yasui@hds.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
14 years agoRemove irrelevant comments relating to vg_mda_copies.
Dave Wysochanski [Fri, 30 Jul 2010 16:47:27 +0000 (16:47 +0000)]
Remove irrelevant comments relating to vg_mda_copies.

14 years agopost-release
Alasdair Kergon [Wed, 28 Jul 2010 21:58:08 +0000 (21:58 +0000)]
post-release

14 years ago Never use clvmd singlenode unless explicitly requested with -Isinglenode.
Alasdair Kergon [Wed, 28 Jul 2010 14:01:40 +0000 (14:01 +0000)]
 Never use clvmd singlenode unless explicitly requested with -Isinglenode.

14 years agoChange clvmd to communicate with lvm via a socket in /var/run/lvm. (mbroz)
Alasdair Kergon [Wed, 28 Jul 2010 13:55:42 +0000 (13:55 +0000)]
Change clvmd to communicate with lvm via a socket in /var/run/lvm.   (mbroz)

https://bugzilla.redhat.com/show_bug.cgi?id=614248 [CVE-2010-2526]

14 years agoadd copyright notices to new files
Alasdair Kergon [Wed, 28 Jul 2010 12:20:38 +0000 (12:20 +0000)]
add copyright notices to new files

14 years agoday+1
Alasdair Kergon [Wed, 28 Jul 2010 11:49:42 +0000 (11:49 +0000)]
day+1

14 years ago.
Alasdair Kergon [Wed, 28 Jul 2010 10:44:29 +0000 (10:44 +0000)]
.

14 years agoRevert unsuccessful table load preparation in combined "create, load and resume"...
Peter Rajnoha [Wed, 28 Jul 2010 10:30:28 +0000 (10:30 +0000)]
Revert unsuccessful table load preparation in combined "create, load and resume" scenario.

There was missing "revert" call in _create_and_load_v4 fn while the preparation
for table load ends up with failure in create/load/resume sequence. Otherwise
we could end up with a device being created, but not table-loaded nor resumed.

Even though the table is not loaded and the device is not resumed at this
stage, we still need to synchronize with udev when calling the revert
"remove" ioctl - there's still a remove uevent generated! The "revert"
code does exactly that.

14 years agopre-release
Alasdair Kergon [Tue, 27 Jul 2010 22:52:19 +0000 (22:52 +0000)]
pre-release

14 years ago.
Alasdair Kergon [Tue, 27 Jul 2010 21:57:37 +0000 (21:57 +0000)]
.

14 years agoFix dm_create_lockfile error paths - incorrectly unlinked in-use lockfile.
Alasdair Kergon [Tue, 27 Jul 2010 21:56:14 +0000 (21:56 +0000)]
Fix dm_create_lockfile error paths - incorrectly unlinked in-use lockfile.
(Jan Friesse)

14 years agoDo not create a clustered volume group in t-nomda-missing.
Petr Rockai [Tue, 27 Jul 2010 21:08:32 +0000 (21:08 +0000)]
Do not create a clustered volume group in t-nomda-missing.

14 years agoMake vgck warn about missing PVs.
Petr Rockai [Tue, 27 Jul 2010 20:05:29 +0000 (20:05 +0000)]
Make vgck warn about missing PVs.

14 years agoInitial import of document describing LVM's policies
Jonathan Earl Brassow [Mon, 26 Jul 2010 20:31:53 +0000 (20:31 +0000)]
Initial import of document describing LVM's policies
surrounding device faults/failures.

14 years agoRemove unneeded "active" variable in vgchange_monitoring().
Dave Wysochanski [Mon, 26 Jul 2010 19:03:29 +0000 (19:03 +0000)]
Remove unneeded "active" variable in vgchange_monitoring().

14 years agoClarify help text for vg_mda_count.
Dave Wysochanski [Wed, 21 Jul 2010 19:44:25 +0000 (19:44 +0000)]
Clarify help text for vg_mda_count.

14 years agoBuilding without the '--enable-cmirrord' option means that
Jonathan Earl Brassow [Wed, 21 Jul 2010 15:21:24 +0000 (15:21 +0000)]
Building without the '--enable-cmirrord' option means that
CMIRRORD_PIDFILE is not defined.  This makes the build fail.
Therefore, we need to conditionalize the check for cmirrord
based on if CMIRRORD_PIDFILE is defined.

14 years agoDon't fail t-pvcreate-operation-md if mdadm is broken.
Petr Rockai [Wed, 21 Jul 2010 14:12:47 +0000 (14:12 +0000)]
Don't fail t-pvcreate-operation-md if mdadm is broken.

14 years agoIt's not enough to check for the kernel module in the case of cluster
Jonathan Earl Brassow [Wed, 21 Jul 2010 13:40:21 +0000 (13:40 +0000)]
It's not enough to check for the kernel module in the case of cluster
mirrors, we must also check that the log daemon (cmirrord) is running.
The log module can be auto-loaded, but the daemon cannot be
"auto-started".  Failing to check for the daemon produces cryptic
messages that customers have a hard time deciphering.  (The system
messages do report that the log daemon is not running, but people
don't seem to find this message easily.)

Here are examples of what is printed when the module is available,
but the log daemon has not been started.

[root@bp-01 LVM2]# lvcreate -m1 -l1 -n lv vg
  Shared cluster mirrors are not available.

[root@bp-01 LVM2]# lvcreate -m1 -l1 -n lv vg -v
    Setting logging type to disk
    Finding volume group "vg"
    Archiving volume group "vg" metadata (seqno 3).
    Creating logical volume lv
    Executing: /sbin/modprobe dm-log-userspace
    Cluster mirror log daemon is not running
  Shared cluster mirrors are not available.
    Creating volume group backup "/etc/lvm/backup/vg" (seqno 4).

14 years agoupdate configure
Alasdair Kergon [Wed, 21 Jul 2010 12:54:21 +0000 (12:54 +0000)]
update configure

14 years ago[REGEX] calculate dfa states on demand
Joe Thornber [Wed, 21 Jul 2010 12:09:12 +0000 (12:09 +0000)]
[REGEX] calculate dfa states on demand

14 years ago[REGEX] remove the state_queue structure.
Joe Thornber [Wed, 21 Jul 2010 12:02:51 +0000 (12:02 +0000)]
[REGEX] remove the state_queue structure.

Instead we just have a 'next' field in the dfa_state.

14 years ago[REGEX] factor _calc_state() out of _calc_states()
Joe Thornber [Wed, 21 Jul 2010 12:00:53 +0000 (12:00 +0000)]
[REGEX] factor _calc_state() out of _calc_states()

14 years ago[REGEX] reduce the number of charset nodes that are produced
Joe Thornber [Wed, 21 Jul 2010 11:58:49 +0000 (11:58 +0000)]
[REGEX] reduce the number of charset nodes that are produced

14 years ago[REGEX] another matcher_t test with a larger set of regexes, only interested in the...
Joe Thornber [Wed, 21 Jul 2010 11:52:46 +0000 (11:52 +0000)]
[REGEX] another matcher_t test with a larger set of regexes, only interested in the fingerprint

14 years ago[REPORT-GENERATORS] cut down stylsheet.css to what we actually use
Joe Thornber [Wed, 21 Jul 2010 10:00:38 +0000 (10:00 +0000)]
[REPORT-GENERATORS] cut down stylsheet.css to what we actually use

14 years ago[REGEX] add a fingerprinting facility to allow test code to compare dfas
Joe Thornber [Tue, 20 Jul 2010 15:32:07 +0000 (15:32 +0000)]
[REGEX] add a fingerprinting facility to allow test code to compare dfas

14 years ago[UNIT-TEST] test for recent dm_bit_and() function
Joe Thornber [Tue, 20 Jul 2010 15:28:22 +0000 (15:28 +0000)]
[UNIT-TEST] test for recent dm_bit_and() function

14 years ago[UNIT-TESTS] add test for the recent dm_bitset_equal() function
Joe Thornber [Tue, 20 Jul 2010 15:26:43 +0000 (15:26 +0000)]
[UNIT-TESTS] add test for the recent dm_bitset_equal() function

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