Date: Sat, 19 Sep 2009 10:43:24 +0200 From: Roland Smith <rsmith@xs4all.nl> To: jaymax <jaymax36@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Undelete or recover from badblocks on disks Message-ID: <20090919084324.GB51231@slackbox.xs4all.nl> In-Reply-To: <25518685.post@talk.nabble.com> References: <25498179.post@talk.nabble.com> <20090918052422.GA8637@slackbox.xs4all.nl> <25518685.post@talk.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Fri, Sep 18, 2009 at 10:17:31PM -0700, jaymax wrote: > > Thanks Roland, > smartctl showed disk to be fine! > fls requires a disk image, is there one created by default in FreeBSD 6.0 . No, you have to create one. > Running fls in directory of deleted files/dir produced > > > #fls -adr 2 > > Missing image file names (img_open) > > > > Is there a solution to this ? Create a disk image from the damaged drive, and save it on another disk with enough space. You can use dd(1) to create a disk image. You can devide the image into several files. For example, I will use dd to get two consecutive 10 MiB pieces from a disk partition on a USB stick: # dd if=/dev/da0s1 of=dd1.img bs=1m count=10 10+0 records in 10+0 records out 10485760 bytes transferred in 1.031497 secs (10165575 bytes/sec) # dd if=/dev/da0s1 of=dd2.img bs=1m count=10 iseek=10 10+0 records in 10+0 records out 10485760 bytes transferred in 1.021128 secs (10268799 bytes/sec) Without specifying it, dd uses 512 byte blocks. This can take along time, because dd then needs to do a lot of small reads. Therefore I tend to specify a larger block size. Note that 'bs=1m count=10' reads the save amount of data as 'bs=10m count=1' and 'bs=1k count=10240'. Using a larger blocksize will usually mean faster reads, but I do not know what the practical limits to block sizes are. I would not start by using 'bs=1g', though. The (valid, IMHO) reason for using disk images is that you want to investigate a copy of the data, so you cannot accidentily destroy the original data. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAkq0mawACgkQEnfvsMMhpyWG9ACfWzT05vbi7kXO1M7VL02yNMmA 8HwAoJ3yUgVc90VvLriD0hQ63zENwM+Z =u9NX -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090919084324.GB51231>
