detached a mounted ufs filesystem

Polytropon freebsd at
Sun Jun 13 00:16:51 UTC 2010

On Sat, 12 Jun 2010 19:46:26 -0400, "Xihong Yin" <xyin at> wrote:
> I accidentally detached my usb external hard drive without
> umount it. The hard driver filesysystem is ufs. Now I can't
> mount it because I can't see the slices. What I get is only
> da0 and da0a in the /dev directory. Is there a way to fix
> the filesystem?

First of all, what does

	# fdisk da0

say? Has there already been a try to run fsck for this disk?

Which layout (slices, partitions) should the disk contain?

In case you lost "just" a partition table, install the program
"testdisk" from ports or packages.

If you don't have a backup of the data on the disk, keep in mind
that everything you do is basically able to do more damage. If
you have enough hard disk space, make a dd copy of the whole disk
first and continue working with this 1:1 copy.

Before you start using forensic tools, you should try to get
the disk back into action. If this fails, we'll talk about how
to recover files. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list