Discussion:
[Grml] [PATCH] grml-chroot enhance: fail-safe when umount fails
Michael Gebetsroither
2010-06-08 14:36:11 UTC
Permalink
Revisiting an old issue.
On Sat, Nov 29, 2008 at 11:11 AM, Michael Gebetsroither
NACK as this causes problems with multiple grml-chroots running.
---
usr_sbin/grml-chroot | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot
index eb9cefc..bce9c50 100755
--- a/usr_sbin/grml-chroot
+++ b/usr_sbin/grml-chroot
@@ -56,7 +56,7 @@ function mountit
function umount_all
{
for i in $MOUNTED_; do
- umount "${DEST_}/$i"
+ umount "${DEST_}/$i" || umount -l "${DEST_}/$i"
done
}
In this case, the sentence in man, "After COMMAND exits, mounts are
cleaned up properly." might not be always correct.
Right, it's not entirely correct. If you close multiple grml-chroot
instances in the wrong order you will experience mountpoints from
grml-chroot not cleand up. And get the appropriate error messages.

Though your patch destroys _every_ other grml-chroot instance running in
parallel because you just unmount filesystems which are in use.

greets,
michael
Michael Gebetsroither
2010-06-08 14:36:11 UTC
Permalink
Revisiting an old issue.
On Sat, Nov 29, 2008 at 11:11 AM, Michael Gebetsroither
NACK as this causes problems with multiple grml-chroots running.
---
usr_sbin/grml-chroot | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot
index eb9cefc..bce9c50 100755
--- a/usr_sbin/grml-chroot
+++ b/usr_sbin/grml-chroot
@@ -56,7 +56,7 @@ function mountit
function umount_all
{
for i in $MOUNTED_; do
- umount "${DEST_}/$i"
+ umount "${DEST_}/$i" || umount -l "${DEST_}/$i"
done
}
In this case, the sentence in man, "After COMMAND exits, mounts are
cleaned up properly." might not be always correct.
Right, it's not entirely correct. If you close multiple grml-chroot
instances in the wrong order you will experience mountpoints from
grml-chroot not cleand up. And get the appropriate error messages.

Though your patch destroys _every_ other grml-chroot instance running in
parallel because you just unmount filesystems which are in use.

greets,
michael
Michael Gebetsroither
2010-06-08 14:36:11 UTC
Permalink
Revisiting an old issue.
On Sat, Nov 29, 2008 at 11:11 AM, Michael Gebetsroither
NACK as this causes problems with multiple grml-chroots running.
---
usr_sbin/grml-chroot | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot
index eb9cefc..bce9c50 100755
--- a/usr_sbin/grml-chroot
+++ b/usr_sbin/grml-chroot
@@ -56,7 +56,7 @@ function mountit
function umount_all
{
for i in $MOUNTED_; do
- umount "${DEST_}/$i"
+ umount "${DEST_}/$i" || umount -l "${DEST_}/$i"
done
}
In this case, the sentence in man, "After COMMAND exits, mounts are
cleaned up properly." might not be always correct.
Right, it's not entirely correct. If you close multiple grml-chroot
instances in the wrong order you will experience mountpoints from
grml-chroot not cleand up. And get the appropriate error messages.

Though your patch destroys _every_ other grml-chroot instance running in
parallel because you just unmount filesystems which are in use.

greets,
michael

Loading...