]> sourceware.org Git - lvm2.git/commit
Remove newly created log volume if initial deactivation fails.
authorMilan Broz <mbroz@redhat.com>
Wed, 9 Dec 2009 18:09:52 +0000 (18:09 +0000)
committerMilan Broz <mbroz@redhat.com>
Wed, 9 Dec 2009 18:09:52 +0000 (18:09 +0000)
commit0a22655ff30ccb584d5b059abe4169f5877baa4f
tree2e6a65fe62bc2f00c8bb5cbb7c774c45249c47b1
parent8def378b5eda0dbb9b5151e09830471750d1e3f1
Remove newly created log volume if initial deactivation fails.

If there is problem deactivate LV and
_init_mirror_log is called with remove_on_failure = 1,
remove the newly created log LV from metadata.

(This can happen if there is active device with the same name
but different UUID.)

The main reason for this "workaround" patch is to
 - do not keep _mlog volume in metadata, so user can repeat the action
 - print better error message describing the real problem

# lvcreate -m 2 -n lv1 -l 1 --nosync vg_bar
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  /dev/vg_bar/lv1_mlog: not found: device not cleared
  Aborting. Failed to wipe mirror log.
  Error locking on node bar-01: Input/output error
  Unable to deactivate mirror log LV. Manual intervention required.
  Failed to create mirror log.

# lvcreate -m 2 -n lv1 -l 1 --nosync vg_bar
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Aborting. Unable to deactivate mirror log.
  Failed to initialise mirror log.
WHATS_NEW
lib/metadata/mirror.c
This page took 0.03773 seconds and 5 git commands to generate.