Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

If it's not in the computer, it doesn't exist.


devel / comp.unix.bsd.freebsd.misc / Oops: unplugged flash drive without unmounting

SubjectAuthor
o Oops: unplugged flash drive without unmountingWinston

1
Oops: unplugged flash drive without unmounting

<yd1qy7lfpt.fsf@UBEblock.psr.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=177&group=comp.unix.bsd.freebsd.misc#177

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!aioe.org!F27FZjotXSOprNc+aWsnFA.user.46.165.242.75.POSTED!not-for-mail
From: wbe@UBEBLOCK.psr.com.invalid (Winston)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Oops: unplugged flash drive without unmounting
Date: Fri, 08 Apr 2022 12:09:18 -0400
Organization: Aioe.org NNTP Server
Message-ID: <yd1qy7lfpt.fsf@UBEblock.psr.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="10937"; posting-host="F27FZjotXSOprNc+aWsnFA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (berkeley-unix)
Mail-Copies-To: never
Cancel-Lock: sha1:9zxg3aIp2t2vtYFFxkuV9wEkd5U=
X-Notice: Filtered by postfilter v. 0.9.2
 by: Winston - Fri, 8 Apr 2022 16:09 UTC

Background:

I accidentally unplugged a USB flash drive without first unmounting it.
The file partition had a UFS2 fs.

Before discovering that mistake, I had mounted and unmounted other
flash drives on the same mount point.

When I saw that /mnt still claimed to have a fs mounted, I figured out
which flash drive it had been, and plugged it back in.

Not surprisingly, umount didn't seem to care that the drive had been
plugged back in, and did a forcible unmount.

Attempting to mount the partition failed (as expected), saying unclean,
run fsck. fsck just gave a quick error that implied the fs was no
longer usable. fsck_ffs and fsck_ufs tried harder, but reported a flood
of problems (mostly INODE CHECK-HASH FAILED, but earlier ones reported
problems with the cylinder group, superblock, etc.) at terminal speed
before I ^C'd it. Since the drive was just a backup copy of something
else, I newfs'ed it, and the drive now works again.

Questions:

* Was there anything I could have done to re-associate the drive with
the mount point?

* I'm a bit surprised that failing to umount would leave the fs in such
bad shape. In case the drive had had something important on it, is
there a better way than fsck* to fix a UFS2 fs that was detached
without umount'ing, or is the only solution to let fsck do its thing
and hope that the file(s) are still there when it's finished?

Thanks!
-WBE

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor