mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Add missing log_error() to lvresize command when fsadm tool fails
Also add test case
This commit is contained in:
parent
bfcaa5a4ed
commit
da1350d420
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.89 -
|
Version 2.02.89 -
|
||||||
==================================
|
==================================
|
||||||
|
Add missing log_error() to lvresize command when fsadm tool fails.
|
||||||
Add support for DM_DEV_DIR device path into fsadm script.
|
Add support for DM_DEV_DIR device path into fsadm script.
|
||||||
Support different PATH setting for fsadm script testing.
|
Support different PATH setting for fsadm script testing.
|
||||||
Surround all executed commands with quotes in fsadm script.
|
Surround all executed commands with quotes in fsadm script.
|
||||||
|
@ -83,6 +83,7 @@ if check_missing ext3; then
|
|||||||
fscheck_ext3
|
fscheck_ext3
|
||||||
mount $dev_vg_lv $mount_dir
|
mount $dev_vg_lv $mount_dir
|
||||||
not fsadm -y --lvresize resize $vg_lv 4M
|
not fsadm -y --lvresize resize $vg_lv 4M
|
||||||
|
echo n | not lvresize -L4M -r -n $vg_lv
|
||||||
lvresize -L+20M -r -n $vg_lv
|
lvresize -L+20M -r -n $vg_lv
|
||||||
umount $mount_dir
|
umount $mount_dir
|
||||||
fscheck_ext3
|
fscheck_ext3
|
||||||
|
@ -676,15 +676,15 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
if (!lp->nofsck &&
|
if (!lp->nofsck &&
|
||||||
!_fsadm_cmd(cmd, vg, lp, FSADM_CMD_CHECK, &status)) {
|
!_fsadm_cmd(cmd, vg, lp, FSADM_CMD_CHECK, &status)) {
|
||||||
if (status != FSADM_CHECK_FAILS_FOR_MOUNTED) {
|
if (status != FSADM_CHECK_FAILS_FOR_MOUNTED) {
|
||||||
stack;
|
log_error("Filesystem check failed.");
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
/* some filesystems supports online resize */
|
/* some filesystems supports online resize */
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((lp->resize == LV_REDUCE) &&
|
if ((lp->resize == LV_REDUCE) &&
|
||||||
!_fsadm_cmd(cmd, vg, lp, FSADM_CMD_RESIZE, NULL)) {
|
!_fsadm_cmd(cmd, vg, lp, FSADM_CMD_RESIZE, NULL)) {
|
||||||
stack;
|
log_error("Filesystem resize failed.");
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user