1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
Commit Graph

1738 Commits

Author SHA1 Message Date
Jonathan Earl Brassow
4a5195c38a 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>
2010-08-02 21:07:40 +00:00
Jonathan Earl Brassow
0864378250 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.
2010-08-02 19:03:45 +00:00
Alasdair Kergon
855e4aac41 Fix lib.device-mapper to wait for include too 2010-08-02 13:56:34 +00:00
Zdenek Kabelac
51c8e01575 Do not use VPATH in include/Makefile 2010-08-02 13:17:03 +00:00
Alasdair Kergon
b87c774102 revert the 'Base' change - that wasn't the cause of the problem 2010-08-02 12:57:04 +00:00
Alasdair Kergon
6aa05bdc37 Fix exported_symbols generation to use standard compiler arguments. 2010-08-02 12:44:21 +00:00
Alasdair Kergon
4abee1da76 Use #include <> not "" in lvm2app.h which gets installed on the system. 2010-08-02 12:23:01 +00:00
Alasdair Kergon
2106e8f031 Make liblvm.device-mapper wait for include file generation. 2010-08-02 12:10:35 +00:00
Alasdair Kergon
4befd355b3 Drop explicit 'Base' version from exported symbols. 2010-07-31 14:13:59 +00:00
Alasdair Kergon
a544f403a2 Fix configure to supply DEFAULT_RUN_DIR to Makefiles. 2010-07-31 00:43:41 +00:00
Takahiro Yasui
8f1afa1766 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>
2010-07-30 17:50:15 +00:00
Alasdair Kergon
9934a167a2 post-release 2010-07-28 21:58:08 +00:00
Alasdair Kergon
798ffad9a9 Never use clvmd singlenode unless explicitly requested with -Isinglenode. 2010-07-28 14:01:40 +00:00
Alasdair Kergon
fb3b7f2274 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]
2010-07-28 13:55:42 +00:00
Alasdair Kergon
a1affa1dc3 day+1 2010-07-28 11:49:42 +00:00
Alasdair Kergon
2de4f65474 pre-release 2010-07-27 22:52:19 +00:00
Alasdair Kergon
38befc5ded . 2010-07-27 21:57:37 +00:00
Petr Rockai
2f54dbd28c Make vgck warn about missing PVs. 2010-07-27 20:05:29 +00:00
Dave Wysochanski
2ab98aa919 Clarify help text for vg_mda_count. 2010-07-21 19:44:25 +00:00
Jonathan Earl Brassow
56fe3c6176 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).
2010-07-21 13:40:21 +00:00
Jonathan Earl Brassow
8d983d6f2d Fix for bug 614164: No check for existing name when splitting mirror
The user could use the same name as an existing LV when specifying a
name for an LV split off from a mirror.  This causes all sorts of
issues.
2010-07-13 22:24:39 +00:00
Jonathan Earl Brassow
659f47f76a Fix for bugs: 612248 & 612291 Split mirror issues
The main problem with these bugs was that the newly split
off LV was not being suspended properly.  This meant that
the memlock count was not being balanced, the DM devices
were not being renamed, and some DM devices which should
have been removed were not.

I've also renamed some of the variables and added comments
to make things clearer as to what is going on.  (I can break
this patch in two if it means easier review.)
2010-07-13 21:48:16 +00:00
Fabio M. Di Nitto
e34342c1f3 Add dm_create_lockfile to libdm to handle pidfiles for all daemons.
Switch dmeventd to use dm_create_lockfile and drop duplicate code.
Allow clvmd pidfile to be configurable.
Switch cmirrord and clvmd to use dm_create_lockfile.
2010-07-13 13:51:01 +00:00
Dave Wysochanski
d2f48d07bb Update comments about memory handling in lvm2app.h. 2010-07-12 18:12:23 +00:00
Peter Rajnoha
a3bdff883b Add more verbose messages while checking volume_list and hosttags settings.
This should bring less confusion when there are some settings left and
people just forgot about it and then they run into problems. These messages
should give them a hint of what's really going on.
2010-07-12 11:37:49 +00:00
Dave Wysochanski
b3e684d1fe Update WHATS_NEW 2010-07-09 17:01:11 +00:00
Alasdair Kergon
2d3164a59f Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
Alasdair Kergon
37ee12b2eb Fix redundant declarations and always compile with -Wredundant-decls. 2010-07-09 15:26:41 +00:00
Jonathan Earl Brassow
0b18937cbe Finish fix for bug 607347: failing both redundant mirror log legs...
A previous check-in added logic to handle the case where both images
of a mirrored log failed.  It solved the problem by simply removing
the log entirely - leaving the parent mirror with a 'core' log.  This
worked for most cases.  However, if there was a small delay between
the failures of the two mirrored log devices, the mirror would hang,
LVM would hang, and no additional LVM commands could be issued.

When the first leg of the log fails, it signals the need for repair.
Before 'lvconvert --repair' is run by dmeventd, the second leg fails.
'lvconvert' would see both devices as failed and try to remove the
log entirely.  When it came time to suspend the parent mirror to
update the configuration, the suspend would hang because it couldn't
get any I/O through the mirrored log, which was plugged waiting for
corrective action.  The solution is to replace the log with an error
target to clear any pending writes before removing it.  This allows
the parent mirror to suspend and make the proper changes.
2010-07-09 15:08:12 +00:00
Zdenek Kabelac
1e699db631 Do not log backtrace in valid _lv_resume() code path 2010-07-08 12:24:04 +00:00
Dave Wysochanski
e0132ef4cb Add prompt if using --metadataignore argument with vgmetadatacopies.
When using vgmetadatacopies value other than "umanaged" (0), prompt
the user if the usage of --metadataignore would change the value of
vgmetadatacopies.  The main 2 cases are:
1) pvchange --metadataignore
2) vgextend --metadataignore

We leave the prompt check in the tools, and do not change anything
if the user says 'n'.

Examples:
vgextend --metadataignore y vgtest /dev/loop0
Setting metadataignore will override preferred number of copies of VG vgtest metadata.
Are you sure? [y/n]: y
  No physical volume label read from /dev/loop0
  Physical volume "/dev/loop0" successfully created
  Volume group "vgtest" successfully extended

pvchange --metadataignore y /dev/loop3
Setting metadataignore on /dev/loop3 will override preferred number of copies of VG vgtest metadata.
Are you sure? [y/n]: y
  WARNING: Changing preferred number of copies of VG vgtest metadata from 3 to 2
  Physical volume "/dev/loop3" changed
  1 physical volume changed / 0 physical volumes not changed

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-07-07 19:02:50 +00:00
Alasdair Kergon
23aa1c6524 Adjust auto-metadata repair and caching logic to try to cope with empty mdas.
- If a PV contained empty mdas, the auto-recovery code was not kicking in.
- The 'inconsistent' state was getting lost when metadata was cached so
  recovery didn't kick in.  But leave the behaviour alone when using
  precommitted metadata because of a warning in a confusing FIXME.

In my testing, pvs and vgs didn't repair inconsistent metadata like they
used to do.  (How many other tools fail similarly now?)

And there should be no need to cache inconsistent metadata because it is
supposed to get repaired under the protection of a write lock immediately it is
discovered.

This code is in need of a redesign based on first principles.
I still see bugs in this code and this commit is risky.
2010-07-07 02:53:16 +00:00
Alasdair Kergon
9de129d5b2 post-release 2010-07-07 02:37:28 +00:00
Alasdair Kergon
9d4cb8e97a . 2010-07-07 02:24:05 +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
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
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
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
Petr Rockai
d55a7f18b0 . 2010-06-30 21:58:13 +00:00
Alasdair Kergon
cbc562a636 Update partial mode warning message. 2010-06-30 16:43:09 +00:00
Alasdair Kergon
4107d4d24d post-release 2010-06-30 14:50:32 +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
Dave Wysochanski
c2584edbdb Update nightly tests for vgextend --metadataignore. 2010-06-30 13:11:12 +00:00
Dave Wysochanski
bc1a30f542 Update WHATS_NEW for --metadataignore and --vgmetadatacopies changes. 2010-06-29 12:06:14 +00:00
Jonathan Earl Brassow
184ca578a0 Fix for bz608048 from Taka...
The same region size is used for both mirror volume and mirrored
log volume, but when the physical extent size is bigger than region size,
the size of mirror leg for mirrored log is smaller than the region size
and lvcreate command fails.

This patch adjusts a region size of mirrored log to a smaller value of
region size or physical extent size.

[This patch ensures that the region_size of the mirrored log does not
exceed the size of the mirrored log itself, which would violate the
kernel constraint: (region_size <= ti->len).]

Signed-off-by: Takahiro Yasui <takahiro.yasui@hds.com>
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-06-28 14:19:41 +00:00
Alasdair Kergon
1c78aa19ff Generate liblvm2app and libdevmapper exported symbols from header files.
Detection is simply by prefix - dm_ or lvm_ - and any additional symbols needed
but not detected this way are placed in .exported_symbols.
2010-06-25 18:17:38 +00:00
Alasdair Kergon
962811198f Update liblvm2app exported symbols.
Add Makefile target to generate current list of lvm2app.h functions.
2010-06-25 12:19:52 +00:00
Zdenek Kabelac
34c937510d Preload libc locale messages.
Preload libc.mo file for localized lvm before taking memory lock - this way
we prevent disk access for some error paths in libdm, that prints localized
errno messages while they are still in memory locked state.
2010-06-24 08:29:30 +00:00
Jonathan Earl Brassow
00268c1b82 update WHATS_NEW file with entry for simultaneous mirror image and
mirrored log image fault-handling fix.
2010-06-23 21:01:42 +00:00
Alasdair Kergon
4cae37c340 post-release 2010-06-23 19:35:11 +00:00
Alasdair Kergon
63f8ad01b2 pre-release 2010-06-23 17:48:41 +00:00
Alasdair Kergon
1a6159aca5 In some C++ standards, typeof is not reserved. 2010-06-23 17:03:14 +00:00
Milan Broz
8f3295456d Fix clvmd init script status
- s/Active clustred VG/clustered VG/ (only LV can be active)

- print only active LVs (not all) in status command
(In the lvdisplay form /dev/vg/lv.)

For now, still use awk (already used in clustered_vgs).

https://bugzilla.redhat.com/show_bug.cgi?id=598495
2010-06-23 16:24:13 +00:00
Zdenek Kabelac
7d62ac4b34 Fix typo: "INTERNAL ERROR" -> "INTERNAL_ERROR"
Author: Xinwei Hu
        xwhu at novell dot com
2010-06-23 12:54:46 +00:00
Alasdair Kergon
beb14c3fa7 Add lv_path to reports to offer full /dev pathname. 2010-06-23 12:32:08 +00:00
Zdenek Kabelac
9c7755c862 Better WHATS_NEW message - as we still have not fixed 'make exec_prefix' build 2010-06-23 10:21:00 +00:00
Milan Broz
866553e76f Fix "allocated" warning typo. 2010-06-22 21:10:53 +00:00
Dave Wysochanski
f8f2be527f Add device name to output of error messages in raw_read_mda_header().
It would be helpful if we had the device name when something like
a mda_header checksum error occurs.

Before:
./tools/lvm pvs -opv_name,vg_name,uuid,mda_count,pv_mda_count_ignored,vg_mda_count,vg_mda_count_ignored,vg_mda_copies
  Incorrect metadata area header checksum
  PV         VG      PV UUID                                #PMda #PMdaIgn #VMda #VMdaIgn #VMdaCps
  /dev/loop0 vgtest2 sVv26t-gjpb-Rcau-uBDO-Cx04-GbRR-6Ssq7e     2        0     4        0        4
  /dev/loop1 vgtest2 zXWStT-qE8F-mbkc-RfgH-aytv-mptF-Y5Ce09     2        0     4        0        4
  /dev/loop2         riCpK9-9G8r-LlIp-i2oh-mb3N-CUzk-u5YpuR     1        0     0        0        0
  /dev/loop3 vgtest  tQCUjm-rmyd-i92d-4eeE-UYBW-v1vQ-kRaA17     2        0     4        2        0
  /dev/loop4 vgtest  ZRvpeI-p8F1-ccVW-BBac-xhl1-aGXU-CbP0oo     2        2     4        2        0

After:
./tools/lvm pvs -opv_name,vg_name,uuid,mda_count,pv_mda_count_ignored,vg_mda_count,vg_mda_count_ignored,vg_mda_copies
  Incorrect metadata area header checksum on /dev/loop2 at offset 4096
  PV         VG      PV UUID                                #PMda #PMdaIgn #VMda #VMdaIgn #VMdaCps
  /dev/loop0 vgtest2 sVv26t-gjpb-Rcau-uBDO-Cx04-GbRR-6Ssq7e     2        0     4        0        4
  /dev/loop1 vgtest2 zXWStT-qE8F-mbkc-RfgH-aytv-mptF-Y5Ce09     2        0     4        0        4
  /dev/loop2         riCpK9-9G8r-LlIp-i2oh-mb3N-CUzk-u5YpuR     1        0     0        0        0
  /dev/loop3 vgtest  tQCUjm-rmyd-i92d-4eeE-UYBW-v1vQ-kRaA17     2        0     4        2        0
  /dev/loop4 vgtest  ZRvpeI-p8F1-ccVW-BBac-xhl1-aGXU-CbP0oo     2        2     4        2        0
2010-06-22 19:18:27 +00:00
Milan Broz
88880e1f89 Use flexible data[] in cmirrord request to prevent abort in runtime size checks. 2010-06-22 13:11:29 +00:00
Jonathan Earl Brassow
bc59859a59 Mirrors can be layered - as in the case of an converting 2-way
to 3-way mirror.  When conversion operations are performed on
these types of mirrors, log options can be confused/ignored.

In the case of a converting 3-way mirror, we have a top-level
2-way corelog mirror whose legs are 1) a 2-way disk-log mirror
and 2) a linear device.  If we wish to convert this 3-way mirror
to a 2-way mirror, the linear device is removed and the extra
top layer is eliminated.  If we also wished to convert the disk
log to a core log in the same step, ambiguity creeps in.  It is
somewhat obvious what the user wants - a 2-way mirror with a
corelog.  However, looking at the top level mirror before
compression, it seems that the mirror already has a core log.
This is why the operation seemed to fail.

This patch simply re-evaluates what mirrored_seg points to after
a compression and then considers the log argument.

This is a fix for bug 599898.
2010-06-21 16:12:33 +00:00
Alasdair Kergon
d48af1520d Various cleanups following recent commits. 2010-06-21 15:56:57 +00:00
Milan Broz
aa9797fa3c Let running clvmd process time to reexec.
Because execve stops the command loop,
we never receive response (only socket close) for clvmd -S,
so waiting for response here makes no sense.

But if the calling process (clvmd -S)  exits too early, connection
is closed from client side, clvmd takes this as an error and
never run restart code.

Ugly hack(TM).
2010-06-21 10:45:15 +00:00
Peter Rajnoha
44a82780b9 Use early udev synchronisation and update of dev nodes for clustered mirrors.
When using clustered mirrors, we need device nodes to be created during
processing of device tree, not at its end like we normally do (we need to
access the nodes in cmirror prematurely). Therefore we use a new flag called
"immediate_dev_node" stored in deptree's load_properties struct to instruct the
device tree processing code to immediately synchronize with udev and flush all
stacked node operations so the nodes are prepared for use.

For now, the immediate_dev_node is used for clustered mirrors during
processing the dm_tree_preload_children code only. We can add more later if
needed.
2010-06-21 08:54:32 +00:00
Jonathan Earl Brassow
c76681596e daemons/cmirrord/functions.c (part of cmirrord) was referencing
linux/kdev_t.h even though it wasn't needed.  Strangely, it seems
to be causing problems on various architectures (i686) in the
function daemons/cmirrord/functions.c:disk_status_info()->sprintf.

I'm not sure why this is a problem since none of the macros in
kdev_t.h are used in that code, but it certainly doesn't hurt to
pull an unnecessary header and it seems to fix the problem.
2010-06-18 20:58:04 +00:00
Zdenek Kabelac
3ce8520c5e Add man pages for lvmconf and unsupported lvmsadc and lvmsar tools. 2010-06-18 10:19:29 +00:00
Milan Broz
01f5823ee4 Fix exit code when requesting help using documented -o help option.
IOW fix lvs -o help
...
  Command failed with status code 5.
2010-06-17 13:15:51 +00:00
Milan Broz
c7ec3c65f4 Clean up cluster lock mode and flags definition.
Code is mixing up internal DLM and LVM definitions of lock
modes and flags.

OpenAIS and singlenode locking do not depend on DLM but
code currently cannot be compiled without libdlm.h!

LCK_* flags is LVM abstraction, used through all the code.
Only low-level backend (clvmd-cman etc) should use DLM definitions,
also this code should do all needed conversions.

Because there are two DLM flags used in generic code
(NOQUEUE, CONVERT) we define it similar way like lock modes.
(So all needed binary-compatible flags are on one place in locking.h)

(Further code cleaning still needed, though:-)
2010-06-17 12:48:54 +00:00
Zdenek Kabelac
d01b8d03db Add man page for dmeventd
(inspired by patch from Danny Rawlins, monster.romster at gmail dot com)
2010-06-17 12:14:43 +00:00
Zdenek Kabelac
41ff900c99 Update lvresize/extend/reduce manpages with --nofsck, --resizefs options 2010-06-17 11:25:43 +00:00
Milan Broz
9ca07f4298 Fix lvm2cmd example in documentation. 2010-06-16 13:03:48 +00:00
Milan Broz
0e93522190 Remove C++ private keyword from headers.
Add extern C definition for libdevmapper, lvm2app and lvm2cmd.
2010-06-16 13:01:25 +00:00
Zdenek Kabelac
057462c4e6 Update WHATS_NEW for last commit 2010-06-07 14:39:18 +00:00
Milan Broz
f58ca71942 Fix segfault in clvmd -R if no response from daemon received. 2010-06-07 13:52:52 +00:00
Alasdair Kergon
262a39dfd0 post-release 2010-06-07 10:25:43 +00:00
Alasdair Kergon
d531d56dbb pre-release 2010-06-04 17:23:49 +00:00
Milan Broz
8b78a832fa Fix restart of clvmd using -S switch
- allocate environment dynamically (still missing some limit?)
 - try to recover, if destroy failed (do not destroy lvm here) and free memory
 - check strdup() return codes
 - report failure to log
 - do not print NULL in exclusive lock loop
2010-06-04 12:59:30 +00:00
Milan Broz
8c19b52bda Fix clvmd initscript restart command to start clvmd if not yet running. 2010-06-03 21:03:53 +00:00
Zdenek Kabelac
0b6ee2252c Use absolute paths in commands
clvmd restart does not work at all if clvmd binary is not in current
dir.
2010-06-03 13:50:26 +00:00
Milan Broz
a9ffbb0803 Require partial option in lvchange --refresh for partials LVs.
We must not refresh LV if some PVs are missing and partial activation
was not requested.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=598886
2010-06-03 12:45:05 +00:00
Dave Wysochanski
224457fb0f Revert _init_rand() to reset errno - restores original init behavior. 2010-06-01 21:47:57 +00:00
Alasdair Kergon
b00dc7153a Don't merge unchanged persistent cache file before dumping if tool scanned. 2010-06-01 19:02:12 +00:00
Peter Rajnoha
97617cfc76 Fix incorrect memory pool deallocation while using vg_read for files.
We create a separate pool "lvm2 vg_read" for vg_read and we don't use
cmd->mem anymore.
2010-06-01 12:08:50 +00:00
Mike Snitzer
735cac19f2 Add --type parameter description to the lvcreate man page. 2010-05-28 03:50:15 +00:00
Mike Snitzer
3755951091 Document 'clear' in dmsetup man page. 2010-05-27 19:00:14 +00:00
Alasdair Kergon
bc653452a7 Replace strncmp kernel version number checks with proper ones 2010-05-24 23:11:34 +00:00
Alasdair Kergon
ca92b9a5f0 Avoid selecting names under /dev/block if there is an alternative. 2010-05-24 22:53:48 +00:00
Alasdair Kergon
fa7fa300e3 Choose between clustered log versions based on kernel version.
Add fixmes for broken strcmp.
2010-05-24 17:46:47 +00:00
Alasdair Kergon
4e553333d9 Update clustered log kernel module name to log-userspace. 2010-05-24 16:30:15 +00:00
Zdenek Kabelac
360f97c31d Replicator: update activate code for vgchange
Activate only the first replicator-dev LV, that activates all other
related LVs from Replicator. In case of error during this activation,
it will not retry again for other heads (less confusing error log).
2010-05-24 09:03:39 +00:00
Zdenek Kabelac
f20300cc8b Replicator: add replicator to dtree
Adding all replicator related LVs to dtree.
Start of one replicator_dev initiate start of all other related.
2010-05-24 09:01:05 +00:00
Zdenek Kabelac
f687bd63b8 Replicator: VG with cmd_missing_vgs does not generate output
Do not print message if missing VG is found.
2010-05-24 08:59:29 +00:00
Mikulas Patocka
b68340f6d9 Fix scripts/relpath.awk to work with mawk
length(array) is specific to GNU awk and doesn't work in mawk.
Use a return value of "split" function to indicate array size, this is
supported in both gawk and mawk.

This patch fixes the following errors during "make install" when mawk is
installed as a default awk.

mawk: scripts/relpath.awk: line 25: illegal reference to array from
mawk: scripts/relpath.awk: line 25: illegal reference to array to
mawk: scripts/relpath.awk: line 27: illegal reference to array from
mawk: scripts/relpath.awk: line 32: illegal reference to array to

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2010-05-21 15:28:16 +00:00
Zdenek Kabelac
c5eb266a80 Replicator: update _create_partial_dtree()
Adding function _add_partial_replicator_to_dtree() to create
partial tree for Replicator target.

Using dm_tree_node_set_presuspend_node() for Replicator.
2010-05-21 14:47:58 +00:00
Zdenek Kabelac
04f3cea84a Replicator: activate checks for missing vgs
Activation needs to have all remote VGs locked to pass for replicator.
So if activated LV is replicator-dev LV - read all remote VGs.
2010-05-21 14:34:01 +00:00