[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] Patch for fsadm bz 64146



This patch address problem from  BZ 64146.

Instead of leaving lvresize to fail when running on the mounted fs (user
expects online resize to happen and it's currently possible only with -n
option) - this patch changes 'fsadm check' behavior so it returns success for
mounted  filesystem. This allows lvresize to processed further and run the
online resize even without passing -n option.

Anyone sees this modified behavior of fsadm script as a problem ?
(change success for mounted fs).

Zdenek
Index: scripts/fsadm.sh
===================================================================
RCS file: /cvs/lvm2/LVM2/scripts/fsadm.sh,v
retrieving revision 1.20
diff -u -p -r1.20 fsadm.sh
--- scripts/fsadm.sh	8 Oct 2010 15:02:05 -0000	1.20
+++ scripts/fsadm.sh	29 Oct 2010 19:43:33 -0000
@@ -365,7 +365,10 @@ resize() {
 ###################
 check() {
 	detect_fs "$1"
-	detect_mounted && error "Cannot fsck device \"$VOLUME\", filesystem is mounted on $MOUNTED"
+	if detect_mounted ; then
+		verbose "Skipping fsck device \"$VOLUME\" as filesystem is mounted on $MOUNTED";
+		cleanup 0
+	fi
 	case "$FSTYPE" in
 	  "xfs") dry $XFS_CHECK "$VOLUME" ;;
 	  *)    # check if executed from interactive shell environment
Index: WHATS_NEW
===================================================================
RCS file: /cvs/lvm2/LVM2/WHATS_NEW,v
retrieving revision 1.1782
diff -u -p -r1.1782 WHATS_NEW
--- WHATS_NEW	29 Oct 2010 16:44:47 -0000	1.1782
+++ WHATS_NEW	29 Oct 2010 19:43:33 -0000
@@ -1,5 +1,6 @@
 Version 2.02.76
 ===================================
+  Exit with success when fsadm check is run on mounted filesystem.
   Automatically unmount invalidated snapshots in dmeventd.
   Fix a deadlock caused by double close in clvmd.
   Add dmeventd -R to restart dmeventd without losing monitoring state. (2.02.75)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]