[Bug 242004] New: hotplug unmount is not supported
https://bugzilla.novell.com/show_bug.cgi?id=242004 Summary: hotplug unmount is not supported Product: openSUSE 10.2 Version: Final Platform: i686 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: w@sfgate.com QAContact: qa@suse.de Un-plug of a USB drive won't unmount filesystems. Here is fix working for me. --------- --- /lib/udev/mount.sh.orig 2006-11-25 14:55:27.000000000 +0200 +++ /lib/udev/mount.sh 2007-02-03 21:00:45.000000000 +0200 @@ -23,6 +23,13 @@ # $Id: $ # +if [ "$ACTION" = "" -o "$SUBSYSTEM" = "" ]; then + err_mesg Bad hotplug agent invocation, no action + exit 1 +fi + +info_mesg $0 $* ACTION=$ACTION + NODES="$DEVNAME $DEVLINKS" # scan /etc/fstab @@ -46,6 +53,15 @@ . /etc/sysconfig/hardware/scripts/functions +if [ "$ACTION" = "remove" ]; then + # umount options: + # -v : be verbose + MESSAGE="`umount -v $DEVNAME 2>&1`" + RET=$? + test $? != 0 && err_mesg "Could not unmount '$DEVNAME'." + exit $RET +fi + # fsck options: # -M : respect fs_pass_no, emulate mount # -a : auto repair @@ -72,3 +88,4 @@ RET=$? test $? != 0 && err_mesg "Could not mount '$DEVNAME'." exit $RET + --------------- --- /etc/udev/rules.d/85-mount-fstab.rules.orig 2006-12-08 17:32:03.000000000 +0200 +++ /etc/udev/rules.d/85-mount-fstab.rules 2006-12-15 19:12:55.000000000 +0200 @@ -1,3 +1,2 @@ # check fstab and possibly mount -SUBSYSTEM=="block", ACTION=="add", KERNEL=="sd*[0-9]|hd*[0-9]", RUN+="mount.sh" - +SUBSYSTEM=="block", ACTION=="add|remove", KERNEL=="sd*[0-9]|hd*[0-9]", RUN+="mount.sh" --------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=242004 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |zoz@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=242004 zoz@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #1 from zoz@novell.com 2007-02-08 08:42 MST ------- Hello Vladimir, this feature (automaount as root via udev) was intended for the experienced user. The easy (un)plugging of storage like usb-sticks and similar is handled via hal and the desktop. Mounting via mount.sh should make usage of shared storage devices (which do not just belong to one person). E.g. external disks as backup medium or music/film storage. If such devices are mounted rw, then you should normally not just unplug them. I expected that you first unmount them manually. If mounted ro you can of course just unplug them with little possible damage (just access time of the files could be wrong and of the journal of reiserfs or ext3). On the other hand if it was already unplugged it is to late to do anything else except unmounting it if not already happened. I guess i will add it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=242004 ------- Comment #2 from w@sfgate.com 2007-02-08 15:28 MST ------- Thanks, Christian, -- now I see what motivation lies behind current design decision, and promise avoid unplug my ext3 usb backup drive before unmount:) Two words about where my request came from. Being tired all those evolving GUI dependencies, users like me would prefer JUST plug/unplug memory card from Canon cameras for move and mencode captures to x264 with simple and dumb-reliable shell script. UUID-attached fstab entry can even route data to certain user's home. That says, there still exist some automation room in auto-unmount, -- no matter what procedure steps we will recommend users to do (from rw-mounted filesystem consistency point of view). Thanks, again. --Vladimir -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=242004#c3
Christian Zoz
participants (1)
-
bugzilla_noreply@novell.com