1
0
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:
Zdenek Kabelac 2011-09-21 10:39:47 +00:00
parent bfcaa5a4ed
commit da1350d420
3 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
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.
Support different PATH setting for fsadm script testing.
Surround all executed commands with quotes in fsadm script.

View File

@ -83,6 +83,7 @@ if check_missing ext3; then
fscheck_ext3
mount $dev_vg_lv $mount_dir
not fsadm -y --lvresize resize $vg_lv 4M
echo n | not lvresize -L4M -r -n $vg_lv
lvresize -L+20M -r -n $vg_lv
umount $mount_dir
fscheck_ext3

View File

@ -676,7 +676,7 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
if (!lp->nofsck &&
!_fsadm_cmd(cmd, vg, lp, FSADM_CMD_CHECK, &status)) {
if (status != FSADM_CHECK_FAILS_FOR_MOUNTED) {
stack;
log_error("Filesystem check failed.");
return ECMD_FAILED;
}
/* some filesystems supports online resize */
@ -684,7 +684,7 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
if ((lp->resize == LV_REDUCE) &&
!_fsadm_cmd(cmd, vg, lp, FSADM_CMD_RESIZE, NULL)) {
stack;
log_error("Filesystem resize failed.");
return ECMD_FAILED;
}
}