1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Prevent snapshots getting activated in a clustered VG.

This commit is contained in:
Alasdair Kergon 2005-08-04 01:27:25 +00:00
parent a4be2c013c
commit 78a352c2eb
2 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.01.14 -
================================
Prevent snapshots getting activated in a clustered VG.
Separate out _build_dev_string.
Move zero_lv to toollib.
Fix pool format handler to work with pv segment code.

View File

@ -906,6 +906,12 @@ static int _populate_origin(struct dev_manager *dm,
return 0;
}
+ if (dl->lv->vg->status & CLUSTERED) {
+ /* FIXME put csnap code here */
+ log_error("Clustered snapshots are not yet supported");
+ return 0;
log_debug("Adding target: 0 %" PRIu64 " snapshot-origin %s",
dl->lv->size, params);
if (!dm_task_add_target(dmt, UINT64_C(0), dl->lv->size,
@ -1400,11 +1406,19 @@ static int _expand_lv(struct dev_manager *dm, struct logical_volume *lv)
/*
* FIXME: this doesn't cope with recursive snapshots yet.
*/
if ((snap_seg = find_cow(lv)))
if ((snap_seg = find_cow(lv))) {
if (lv->vg->status & CLUSTERED) {
log_error("Clustered snapshots are not yet supported");
return 0;
}
return _expand_snapshot(dm, lv, snap_seg);
else if (lv_is_origin(lv))
} else if (lv_is_origin(lv)) {
if (lv->vg->status & CLUSTERED) {
log_error("Clustered snapshots are not yet supported");
return 0;
}
return _expand_origin(dm, lv);
}
return _expand_vanilla(dm, lv, 0);
}