From owner-freebsd-questions@FreeBSD.ORG Sun Jun 13 02:45:18 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 55BFA1065673 for ; Sun, 13 Jun 2010 02:45:18 +0000 (UTC) (envelope-from xyin@gmx.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 23E688FC08 for ; Sun, 13 Jun 2010 02:45:18 +0000 (UTC) Received: (qmail 20223 invoked by uid 0); 13 Jun 2010 02:45:16 -0000 Received: from 173.67.10.104 by www-us010.v300.gmx.net with HTTP Date: Sat, 12 Jun 2010 22:38:15 -0400 From: "Xihong Yin" Message-ID: <20100613024515.159000@gmx.com> MIME-Version: 1.0 To: "Polytropon" X-Authenticated: #50283380 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 X-GMX-UID: dDN1KHVfzVK0IRUsijMz+Yg/Njh6dI6+ X-FuHaFi: 0.46000000000000002,0.47999999999999998 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2010 02:45:18 -0000 'fdisk /dev/da0' output is ******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=14593 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=14593 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 234436482 (114470 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: I tried 'fsck_ufs /dev/da0', it says ** /dev/da0 Cannot find file system superblock ioctl (GCINFO): Inappropriate ioctl for device fsck_ufs: /dev/da0: can't read disk label I forget what layout the disk has. Normally I used /dev/da0s1d to mount the disk. What the next step should I do? Thanks, ----- Original Message ----- From: Polytropon Sent: 06/12/10 08:16 PM To: Xihong Yin Subject: Re: detached a mounted ufs filesystem 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 M agdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"