1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
lvm2/lib/metadata
Milan Broz f72a06ccf7 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.
2009-12-09 18:09:52 +00:00
..
lv_alloc.h Update a few more uint64_t's related to the 64-bit status change. 2009-12-04 17:48:32 +00:00
lv_manip.c Update a few more uint64_t's related to the 64-bit status change. 2009-12-04 17:48:32 +00:00
merge.c Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
metadata-exported.h Switch status from 32-bit to 64-bit 2009-11-24 22:55:55 +00:00
metadata.c Fix tools to report error when stopped by user. 2009-12-03 19:18:33 +00:00
metadata.h Consolidate LV allocation into alloc_lv(). 2009-09-28 17:46:15 +00:00
mirror.c Remove newly created log volume if initial deactivation fails. 2009-12-09 18:09:52 +00:00
pv_alloc.h Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
pv_manip.c Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
pv_map.c Do not include MISSING_PVs in allocation maps. 2009-04-23 16:41:27 +00:00
pv_map.h Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
segtype.c Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
segtype.h Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
snapshot_manip.c Use log_error macro consistently throughout in place of log_err. 2009-07-15 20:02:46 +00:00