1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Peter Rajnoha cba6186325 cmirror: check for cmirror availability during cluster mirror creation and activation
When creating/activating clustered mirrors, we should have cmirrord
available and running. If it's not, we ended up with rather cryptic
errors like:

$ lvcreate -l1 -m1 --type mirror vg
  Error locking on node 1: device-mapper: reload ioctl on  failed: Invalid argument
  Failed to activate new LV.

$ vgchange -ay vg
  Error locking on node node 1: device-mapper: reload ioctl on failed: Invalid argument

This patch adds check for cmirror availability and it errors out
properly, also giving a more precise error messge so users are able
to identify the source of the problem easily:

$ lvcreate -l1 -m1 --type mirror vg
  Shared cluster mirrors are not available.

$ vgchange -ay vg
  Error locking on node 1: Shared cluster mirrors are not available.

Exclusively activated cluster mirror LVs are OK even without cmirrord:

$ vgchange -aey vg
  1 logical volume(s) in volume group "vg" now active
2015-01-05 16:54:07 +01:00
..
activate cmirror: check for cmirror availability during cluster mirror creation and activation 2015-01-05 16:54:07 +01:00
cache lvmcache: Skip VG_GLOBAL cache lock state update. 2014-10-07 01:15:43 +01:00
cache_segtype cleanup: remove unused headers 2014-11-13 17:49:42 +01:00
commands segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
config config: add report/compact_output lvm.conf setting to enable or isable field compacting 2014-12-05 12:00:28 +01:00
datastruct cleanup: consolidate lv_layout and lv_role reporting 2014-08-25 16:14:40 +02:00
device cleanup: remove unused headers 2014-11-13 17:49:42 +01:00
display segments: introduce lvseg_name 2014-10-24 16:39:30 +02:00
error segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
filters cleanup: remove unused headers 2014-11-13 17:49:42 +01:00
format1 thin: simplify thin volume creation 2014-10-26 18:37:13 +01:00
format_pool thin: simplify thin volume creation 2014-10-26 18:37:13 +01:00
format_text pre-release 2014-11-11 14:13:00 +00:00
freeseg segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
label debug: drop printing debug trace without labeler 2014-09-24 10:54:48 +02:00
locking locking: rename LCK_CONVERT 2014-11-18 16:50:49 +01:00
log report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
metadata cmirror: check for cmirror availability during cluster mirror creation and activation 2015-01-05 16:54:07 +01:00
mirror segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
misc cache: use LV_PENDING_DELETE 2014-11-10 22:05:49 +01:00
mm cleanup: drop unused var 2014-11-18 16:50:49 +01:00
properties report: add separate fields for PV/VG/LV attributes 2014-07-04 15:40:17 +02:00
raid segtype: add SEG_ONLY_EXCLUSIVE flag 2014-11-10 22:05:48 +01:00
replicator cleanup: drop default implementation 2014-10-24 16:39:31 +02:00
report libdm: report: add more comments about helper macros to get reserved values 2014-12-19 09:23:05 +01:00
snapshot segtype: add SEG_ONLY_EXCLUSIVE flag 2014-11-10 22:05:48 +01:00
striped segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
thin cleanup: API get/set fixes 2014-11-10 22:05:48 +01:00
unknown segtype: drop cmdcontex pointer 2014-10-30 23:58:49 +01:00
uuid cleanup: drop unused define 2014-03-12 19:12:34 +01:00
zero cleanup: remove unused headers 2014-11-13 17:49:42 +01:00
Makefile.in filters: add "usable device" filter 2014-09-30 13:11:58 +02:00