mirror of
git://sourceware.org/git/lvm2.git
synced 2026-01-25 00:32:58 +03:00
Compare commits
6 Commits
dm_v1_02_1
...
v2_02_12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec8efa35a1 | ||
|
|
f72bf20482 | ||
|
|
ebde2002e8 | ||
|
|
352a66f46f | ||
|
|
d84c5391f7 | ||
|
|
f4c582472b |
@@ -1,6 +1,9 @@
|
||||
Version 2.02.12 -
|
||||
Version 2.02.12 - 16th October 2006
|
||||
===================================
|
||||
Propogate clustered flag in vgsplit and require resizeable flag.
|
||||
Fix pvdisplay to use vg_read() for non-orphans.
|
||||
Fall back to internal locking if external locking lib is missing or fails.
|
||||
Retain activation state after changing LV minor number with --force.
|
||||
Propagate clustered flag in vgsplit and require resizeable flag.
|
||||
|
||||
Version 2.02.11 - 12th October 2006
|
||||
===================================
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
Version 1.02.13 -
|
||||
=============================
|
||||
|
||||
Version 1.02.12 - 13 Oct 2006
|
||||
=============================
|
||||
Avoid deptree attempting to suspend a device that's already suspended.
|
||||
|
||||
@@ -144,18 +144,18 @@ int init_locking(int type, struct cmd_context *cmd)
|
||||
case 2:
|
||||
if (!cmd->is_static) {
|
||||
log_very_verbose("External locking selected.");
|
||||
if (!init_external_locking(&_locking, cmd))
|
||||
break;
|
||||
return 1;
|
||||
if (init_external_locking(&_locking, cmd))
|
||||
return 1;
|
||||
}
|
||||
if (!find_config_tree_int(cmd, "locking/fallback_to_clustered_locking",
|
||||
DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING))
|
||||
break;
|
||||
log_very_verbose("Falling back to clustered locking.");
|
||||
/* Fall through */
|
||||
#endif
|
||||
|
||||
#ifdef CLUSTER_LOCKING_INTERNAL
|
||||
log_very_verbose("Falling back to internal clustered locking.");
|
||||
/* Fall through */
|
||||
|
||||
case 3:
|
||||
log_very_verbose("Cluster locking selected.");
|
||||
if (!init_cluster_locking(&_locking, cmd))
|
||||
|
||||
@@ -294,16 +294,15 @@ static int lvchange_persistent(struct cmd_context *cmd,
|
||||
log_error("Major number must be specified with -My");
|
||||
return 0;
|
||||
}
|
||||
if (lv_info(cmd, lv, &info, 0) && info.exists &&
|
||||
!arg_count(cmd, force_ARG)) {
|
||||
if (yes_no_prompt("Logical volume %s will be "
|
||||
"deactivated temporarily. "
|
||||
"Continue? [y/n]: ", lv->name) == 'n') {
|
||||
log_print("%s device number not changed.",
|
||||
lv->name);
|
||||
return 0;
|
||||
}
|
||||
if (lv_info(cmd, lv, &info, 0) && info.exists)
|
||||
active = 1;
|
||||
if (active && !arg_count(cmd, force_ARG) &&
|
||||
yes_no_prompt("Logical volume %s will be "
|
||||
"deactivated temporarily. "
|
||||
"Continue? [y/n]: ", lv->name) == 'n') {
|
||||
log_print("%s device number not changed.",
|
||||
lv->name);
|
||||
return 0;
|
||||
}
|
||||
log_verbose("Ensuring %s is inactive.", lv->name);
|
||||
if (!deactivate_lv(cmd, lv)) {
|
||||
|
||||
@@ -19,10 +19,32 @@ static int _pvdisplay_single(struct cmd_context *cmd,
|
||||
struct volume_group *vg __attribute((unused)),
|
||||
struct physical_volume *pv, void *handle)
|
||||
{
|
||||
int consistent = 0;
|
||||
int ret = ECMD_PROCESSED;
|
||||
uint64_t size;
|
||||
|
||||
const char *pv_name = dev_name(pv->dev);
|
||||
|
||||
if (pv->vg_name) {
|
||||
if (!lock_vol(cmd, pv->vg_name, LCK_VG_READ)) {
|
||||
log_error("Can't lock %s: skipping", pv->vg_name);
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
if (!(vg = vg_read(cmd, pv->vg_name, (char *)&pv->vgid, &consistent))) {
|
||||
log_error("Can't read %s: skipping", pv->vg_name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((vg->status & CLUSTERED) && !locking_is_clustered() &&
|
||||
!lockingfailed()) {
|
||||
log_error("Skipping clustered volume group %s",
|
||||
vg->name);
|
||||
ret = ECMD_FAILED;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!*pv->vg_name)
|
||||
size = pv->size;
|
||||
else
|
||||
@@ -31,7 +53,7 @@ static int _pvdisplay_single(struct cmd_context *cmd,
|
||||
if (arg_count(cmd, short_ARG)) {
|
||||
log_print("Device \"%s\" has a capacity of %s", pv_name,
|
||||
display_size(cmd, size));
|
||||
return ECMD_PROCESSED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (pv->status & EXPORTED_VG)
|
||||
@@ -44,15 +66,19 @@ static int _pvdisplay_single(struct cmd_context *cmd,
|
||||
|
||||
if (arg_count(cmd, colon_ARG)) {
|
||||
pvdisplay_colons(pv);
|
||||
return ECMD_PROCESSED;
|
||||
goto out;
|
||||
}
|
||||
|
||||
pvdisplay_full(cmd, pv, handle);
|
||||
|
||||
if (!arg_count(cmd, maps_ARG))
|
||||
return ECMD_PROCESSED;
|
||||
goto out;
|
||||
|
||||
return ECMD_PROCESSED;
|
||||
out:
|
||||
if (pv->vg_name)
|
||||
unlock_vg(cmd, pv->vg_name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int pvdisplay(struct cmd_context *cmd, int argc, char **argv)
|
||||
|
||||
Reference in New Issue
Block a user