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

3860 Commits

Author SHA1 Message Date
Dave Wysochanski
c36d2b02a3 Add vgcreate_params_set_defaults().
Add function to set default vgcreate parameters based on existing VG or
internal defaults.  Should be no functional change.
2009-11-01 20:02:32 +00:00
Dave Wysochanski
4eb8d86346 Rename pvcreate_params processing functions to better match <object><action>.
Rename fill_default_pvcreate_params to pvcreate_params_set_defaults.
Rename pvcreate_validate_restore_params to pvcreate_restore_params_validate.
Rename pvcreate_validate_params to pvcreate_params_validate.
2009-11-01 19:51:54 +00:00
Peter Rajnoha
1b33fbf98b More cleanup in udev rules:
- add copyright notice for 10-dm.rules.in,

 - set DM_UDEV_DISABLE_{DISK, OTHER}_RULES_FLAG in 11-dm-lvm.rules directly
   for inappropriate and non-top-level subdevices in case we use older kernels
   where DM_COOKIE is not used (and therefore there are no flags passed from
   the LVM process itself). This applies for older kernels (version < 2.6.31),

 - remove unnecessary filters in 95-dm-notify.rules - the DM_COOKIE env var
   itself is set for change/remove udev events and for DM devices only so
   there's no need to double-check this.
2009-11-01 18:01:31 +00:00
Dave Wysochanski
3f74391b87 Update vgsplit to call vg_set_clustered(). 2009-10-31 17:43:57 +00:00
Dave Wysochanski
93c954dae1 Update vgcreate to call vg_set_clustered(). 2009-10-31 17:39:22 +00:00
Dave Wysochanski
f736563a7a Add vg_set_clustered() - move logic from vgchange.
Similar to other vg_set_* functions, we create a vg_set_clustered() function
which does a few checks and sets a flag.  This is where we check for
any limitations of clusters.
2009-10-31 17:30:52 +00:00
Dave Wysochanski
0350c4f0f6 Add vg_mda_count library function. 2009-10-31 17:26:13 +00:00
Dave Wysochanski
0c0caf0272 Add to vgcreate and vgextend nightly tests. 2009-10-31 16:43:07 +00:00
Alasdair Kergon
9abd966a80 Insert some missing stack macros into activation code. 2009-10-30 13:07:49 +00:00
Milan Broz
a1dbd7156c Recognise DRBD device part and handle it similar to MD devices.
The DRBD uses underlying device so code should prefer top
device if duplicate is found.

Patch also introduce
        dev_subsystem_part_major and dev_subsytem_name
functions to easily handle all these replication susbystems
and not hardcode md_major call.

See https://bugzilla.redhat.com/show_bug.cgi?id=530881
for full problem description.
2009-10-27 17:00:44 +00:00
Alasdair Kergon
b74e5b870c post-release 2009-10-27 01:13:20 +00:00
Alasdair Kergon
bcb021296f . 2009-10-27 00:52:45 +00:00
Alasdair Kergon
dcf907f36d add copyright lines 2009-10-26 22:42:07 +00:00
Alasdair Kergon
972b11e39e pre-release 2009-10-26 21:56:23 +00:00
Peter Rajnoha
10fffe842b Cleanup of previous commit with latest changes in udev support code. 2009-10-26 21:38:35 +00:00
Dave Wysochanski
963cf98df1 Document --all option in man pages, cleanup {pv|vg|lv}{s|display} man pages.
Option --all is only partially documented currently, so document in all
commands.  Also make {pv|vg|lv}{display|s} man pages consistent with help
output.  Remove ununsed 'disk_ARG' parameter.  Leave --trustcache out of
the man page output.  Update --units argument to show all possible units.
2009-10-26 14:37:09 +00:00
Peter Rajnoha
0f64ddf2fb Several changes to udev support code:
- we have these levels when the udev rules are processed:
   10-dm.rules --> [11-dm-<subsystem>.rules] --> [12-dm-permissions.rules] -->
   13-dm-disk.rules --> [...all the other foreign rules...] --> 95-dm-notify.rules

 - each level can be disabled now by
   DM_UDEV_DISABLE_{DM, SUBSYSTEM, DISK, OTHER}_RULES_FLAG

 - add DM_UDEV_DISABLE_DM_RULES_FLAG to disable 10-dm.rules

 - add DM_UDEV_DISABLE_OTHER_RULES_FLAG to disable all the other (non-dm) rules.
   We cutoff these rules by using the 'last_rule', so this one should really be
   used with great care and in well-founded situations. We use this for lvm's
   hidden and layer devices now.

 - add a parameter for add_dev_node, rm_dev_node and rename_dev_node so it's
   possible to switch on/off udev checks

 - use DM_UDEV_DISABLE_DM_RULES_FLAG and DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG
   if there's no cookie set and we have resume, remove and rename ioctl.
   This could happen when someone uses the libdevmapper that is compiled with
   udev_sync but the software does not make use of it. This way we can switch
   off the rules and fallback to libdevmapper node creation so there's no
   udev/libdevmapper race.
2009-10-26 14:29:33 +00:00
Peter Rajnoha
3fa82818b9 Rename 11-lvm.rules to 11-dm-lvm.rules and 12-dm-disk.rules to 13-dm-disk.rules. 2009-10-26 14:04:31 +00:00
Dave Wysochanski
c48ba4464c Update lvcreate/lvconvert man pages to explain PhysicalVolume parameter.
Addresses rhbz 500177.
2009-10-26 13:41:13 +00:00
Alasdair Kergon
2d1118a26f Permit snapshots of mirrors. (brassow) 2009-10-26 10:01:56 +00:00
Dave Wysochanski
53560b8e0b Minor fix to vgcreate/vgextend man pages for PHYSICAL DEVICE OPTIONS. 2009-10-26 02:36:29 +00:00
Alasdair Kergon
3f647cdf32 Cleanup mimagetmp LV if allocation fails for new lvconvert mimage. 2009-10-23 01:24:17 +00:00
Alasdair Kergon
9a0dc6d522 Fix clvmd segfault when refresh_toolcontext fails. (brassow, bz 506986) 2009-10-22 17:45:23 +00:00
Alasdair Kergon
c819525e81 Remember to clear 'global lock held during cache refresh' state after use. 2009-10-22 17:33:09 +00:00
Peter Rajnoha
4024ad5eb2 Add manpage entry for dmsetup udevflags. 2009-10-22 13:12:20 +00:00
Peter Rajnoha
2c0df9552f Use udev flags in the rules and cleanup the rules:
- remove default permissions set in 95-dm-notify.rules (and add a hint in 12-dm-permissions.rules to set it by the user directly)
 - add multipath DM_ACTION=="PATH_FAILED" filter
 - remove unnecessary filters in the headers of the rules (we can simply use DM_UDEV_RULES_VSN instead)
 - fix symlink priorities in /dev/disk/ (snapshot volumes have low priority for FS UUID symlinks so it will not overwrite symlinks for the origin)
2009-10-22 13:11:33 +00:00
Peter Rajnoha
9359586fde Use udev flags support in LVM and provide dm_tree_add_new_dev_with_udev_flags wrapper for dm_tree_add_new_dev. 2009-10-22 13:00:07 +00:00
Peter Rajnoha
68069c70e1 Add udev flags support in libdevmapper and provide 'dmsetup udevflags' command to decode them. 2009-10-22 12:55:47 +00:00
Alasdair Kergon
6a00ceeb66 . 2009-10-22 11:25:46 +00:00
Petr Rockai
8143f55488 Only announce mirror monitoring to syslog after initialisation succeeds. 2009-10-22 10:40:41 +00:00
Petr Rockai
03e03fb7a1 Fix the "const discarded" warnings introduced in the unknown segment patch. 2009-10-22 10:38:07 +00:00
Jonathan Earl Brassow
b13b8c1882 Clarify message:
"  Mirror status: 1/2 images failed."

Half of an image?  Half of the images?  No, 1 of 2 images.
2009-10-21 22:19:39 +00:00
Petr Rockai
02a2afb64f Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
Jonathan Earl Brassow
ae8e907d72 I saw this in a bug report:
[root@xxxx-01 ~]# lvconvert -m 1 --corelog VG/cmirror
  Unable to convert the log of inactive cluster mirror cmirror

I've tried to clean-up the message a little more, so the name
of the mirror stands out more while preserving the sense that
it's not a problem with the specific device, but the fact that
it is inactive that is causing the problem.

New msg:
  Unable to convert the log of an inactive cluster mirror, cmirror
2009-10-14 14:55:44 +00:00
fabbione
f042834068 configure.in: don't set default file owner and group
Per discussion on lvm-devel mailing list and part of debian patch set,
don't set defaults for owner and group, since nobody seems to use them, and
still allow override.
2009-10-14 04:10:41 +00:00
Alasdair Kergon
63130374b9 Attempt to build dmeventd.static. 2009-10-13 02:35:26 +00:00
Alasdair Kergon
ac01d56747 More build cleanups (linker parameter ordering). 2009-10-13 01:31:10 +00:00
fabbione
6f751afae4 Disable realtime support by default.
This code is used only in a under development feature and it's not used
anywhere in the tree.

Allow to build it conditionally.
2009-10-12 16:59:20 +00:00
Christine Caulfield
8fd85fb6e6 Make clvmd return 0 on success rather than 1. 2009-10-12 08:33:30 +00:00
fabbione
1dbfe1e856 Merge Debian patch 05 debian: keep libdm-abi consistent.
This appears to be the only user visible feature that can change libdm ABI
at build time.

Thanks to Bastian Blank for the patch.
2009-10-12 04:06:42 +00:00
Alasdair Kergon
d3fd4c0381 Extra libs must be appended, not defined first. 2009-10-09 16:04:54 +00:00
Alasdair Kergon
0e20e05795 linking parms missing from o->so conversion. 2009-10-09 15:55:31 +00:00
Dave Wysochanski
3bb0dc03af Cleanup comment and some whitespace. 2009-10-06 16:00:38 +00:00
Dave Wysochanski
4257485ff2 Add --pvmetadatacopies as a synonym for --metadatacopies in various commands.
Going forward, we would like to allow users to specify the total
number of metadatacopies in a VG rather than on a per-PV basis.  In
order to facilitate that, introduce --pvmetadatacopes to replace
--metadatacopies everywhere.  We still allow --metadatacopies for
pv commands, but require --pvmetadatacopies for vg commands.
Eventually we will introduce --vgmetadatacopies.  Once we do that,
we should either deprecate --metadatacopies or make it a synonym based
on the command (pvmetadatacopies for pv commands, and vgmetadatacopies
for vg commands).  The latter option would likely just require a simple
'strncpy' check against cmd->command->name to qualify the merge_synonym
call.

Update nightly tests to cover the pvmetadatacopies synonym.

Note that this patch is the result of an eariler review comment for
the implicit pvcreate patches.  Should apply cleanly on top of the
implicit pvcreate patches (I applied after patch 10/10 in that series).

NOTE: This patch will require --pvmetadatacopies for vgconvert as
--metadatacopies is no longer accepted.
2009-10-05 20:55:56 +00:00
Dave Wysochanski
f69b7a58f2 Add --pvmetadatacopies as a synonym for --metadatacopies in various commands.
Going forward, we would like to allow users to specify the total
number of metadatacopies in a VG rather than on a per-PV basis.  In
order to facilitate that, introduce --pvmetadatacopes to replace
--metadatacopies everywhere.  We still allow --metadatacopies for
pv commands, but require --pvmetadatacopies for vg commands.
Eventually we will introduce --vgmetadatacopies.  Once we do that,
we should either deprecate --metadatacopies or make it a synonym based
on the command (pvmetadatacopies for pv commands, and vgmetadatacopies
for vg commands).  The latter option would likely just require a simple
'strncpy' check against cmd->command->name to qualify the merge_synonym
call.

Update nightly tests to cover the pvmetadatacopies synonym.

Note that this patch is the result of an eariler review comment for
the implicit pvcreate patches.  Should apply cleanly on top of the
implicit pvcreate patches (I applied after patch 10/10 in that series).

NOTE: This patch will require --pvmetadatacopies for vgconvert as
--metadatacopies is no longer accepted.
2009-10-05 20:53:41 +00:00
Dave Wysochanski
fd4fe42013 Update help messages for vgextend / vgcreate to mention PHYSICAL DEVICE OPTIONS. 2009-10-05 20:22:58 +00:00
Dave Wysochanski
930820b738 Add implicit tests for implicit pvcreate during vgcreate and vgextend.
Update tests and WHATS_NEW for implicit pvcreate support.
2009-10-05 20:04:40 +00:00
Dave Wysochanski
06cc081ca2 Update vgcreate and vgextend man pages to clarify implicit pvcreate.
vgcreate and vgextend now implicitly call pvcreate on devices not
currently initialized for LVM use.  Previously these commands would
fail with an error, so clarify the new behavior in the man page.
2009-10-05 20:04:21 +00:00
Dave Wysochanski
ee9bf16d1a Add implicit pvcreate support to vgcreate and vgextend.
Adds implicit pvcreate support when calling vgcreate or vgextend with
device paths that are not yet PVs.  This changes the behavior of vgcreate
and vgextend from failing with an error message to implicitly pvcreating.
2009-10-05 20:04:08 +00:00
Dave Wysochanski
f08e65fd04 Move pvcreate_validate_params into toollib to allow calling from mutiple tools.
For implicit pvcreate support, we need to call this from vgcreate and vgextend,
so move it into toollib.
2009-10-05 20:03:54 +00:00