Re: Stale mount on disconnected device: how to delete it?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Dec 18, 2007 at 01:13:55AM +0100, Romain Tartière wrote:
On Mon, Dec 17, 2007 at 10:32:48AM -0800, Yuri wrote :
In case of USB device (which device in question in this problem
happens to be) usbd can be used to mount it.

If attach/detach events trigger mount/unmount commands this problem
shouldn't exist. I didn't try though.

The problem is that the detach event can be caught only too late to
unmount the device properly. How may it be possible to sync a disk
``as soon as it is detached'' (that is when it is not physically
connected to the computer anymore)? Mounting the disk read-only may
be a workaround, just as not caching writes (default behaviour of some
versions of Windows) and syncing the disk all the time, but this is
not as reliable as the mount system provided by Unix and Unix like
operating systems.

AFAICR, this is the sole weakness of the FreeBSD operating system I
know :) And since it is, according to me, an operator error, the best
we can do is to use the system as it was designed for ;)

Off the top of my head, what is wrong/hard with just logging a device
failure, discarding all remaining cached operations, and unmounting the
fs when a disk device goes missing? I understand that this is not a
viable solution for critical filesystems, but I can see nothing wrong
with this approach for removable devices and/or non-critical fs's.

Just my $0.02.

\n\n
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Nikos Ntarmos <ntarmos@xxxxxxxxxxxxxxx>

iD8DBQFHZ2ABm6J1ac+VFgoRAhWtAJ4uomUoe0IDVG0qG2W+t7y9ZSMjugCbBAoz
LtIIMhMCk9iZ3NeStO8uwLU=
=+o7j
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Stale mount on disconnected device: how to delete it?
    ... If attach/detach events trigger mount/unmount commands this problem ... Mounting the disk read-only may be a workaround, ... as the mount system provided by Unix and Unix like operating systems. ...
    (freebsd-hackers)
  • SUMMARY: Creating bare-metal recovery disks
    ... Copy system disk ... To create an ADVFS root and /usr partition, ... Next you are going to need to make the following mount points: ... mkdir /rootclone ...
    (Tru64-UNIX-Managers)
  • Re: having trouble mounting disk image on loopback device
    ... a dd image taken from a physical disk. ... Therefore, to mount each partition, I used these commands: ... mount command will not suffice...For that matter, ... The device must contain a filesystem recognizable ...
    (comp.os.linux.misc)
  • Re: NFS mounts not largefiles by default?
    ... > That's simply because there is no such mount option for nfs filesystems. ... >>up several terminal sessions on the console which appeared to be hung ... three Sun Rays, and I don't normally use its console, just the Rays. ... directories are on a separate disk. ...
    (comp.unix.solaris)
  • Re: Diagnosing the colored pinwheel
    ... Your boot drive needs a minimum of 15% unused disk space so it can create files for swapping and other system-related activity. ... Activity Monitor and top do specific work that will not highlight some symptoms an app or system may exhibit. ... Boot drive means that mount that the system and kernel was loaded from, typically the one given the "/" designation. ...
    (comp.sys.mac.apps)

Loading