From owner-freebsd-questions@FreeBSD.ORG Sun Jun 13 00:16:51 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19EFF1065676 for ; Sun, 13 Jun 2010 00:16:51 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id CF1DD8FC12 for ; Sun, 13 Jun 2010 00:16:50 +0000 (UTC) Received: from r55.edvax.de (port-92-195-117-232.dynamic.qsc.de [92.195.117.232]) by mx02.qsc.de (Postfix) with ESMTP id 4976A1E1EA; Sun, 13 Jun 2010 02:16:49 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o5D0Gma7003311; Sun, 13 Jun 2010 02:16:48 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 13 Jun 2010 02:16:48 +0200 From: Polytropon To: "Xihong Yin" Message-Id: <20100613021648.4642654e.freebsd@edvax.de> In-Reply-To: <20100612235037.158980@gmx.com> References: <20100612235037.158980@gmx.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: detached a mounted ufs filesystem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2010 00:16:51 -0000 On Sat, 12 Jun 2010 19:46:26 -0400, "Xihong Yin" 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. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...