Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2016 20:42:56 -0600
From:      Kevin Day <toasty@dragondata.com>
To:        "Julian H. Stacey" <jhs@berklix.com>
Cc:        "freebsd-fs@FreeBSD.org Filesystems" <freebsd-fs@freebsd.org>
Subject:   Re: when ufs is 99% full, current seems to limit creat to 28672 bytes
Message-ID:  <AA0042EB-7EF2-468C-8EC6-82794FF1EFAD@dragondata.com>
In-Reply-To: <201612292039.uBTKdGR4033963@fire.js.berklix.net>
References:  <201612292039.uBTKdGR4033963@fire.js.berklix.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>=20
> It was really a temporary cludge of mine to tickle for bad blocks,
> working from inside the file system. I'd better do it properly,
> unmount & experiment with eg camcontrol on the partition or whole
> disk, or search ports/ &/or write  a little C prog that reads blocks
> from a file (aka dev name of partition or whole disk, stores, to
> memory, & writes back blocks)
>=20

If you don=E2=80=99t mind losing everything:

dd if=3D/dev/zero of=3D/dev/daXXX
(write blocks of zeros to drive, starting at the first sector and going =
until the end)

then

dd of=3D/dev/null if=3D/dev/daXXX
(read everything back and throw it away)

If both complete without error, you=E2=80=99re good. Call newfs and =
start over.


If you have space somewhere else to fit the entire drive and don=E2=80=99t=
 want to lose everything:

dd if=3D/dev/daXXX of=3D/path/to/giant/file
(copy the entire drive to /path/to/giant/file)

dd if=3D/path/to/giant/file of=3D/dev/daXXX
(copy it back to the drive)



If any of those do produce errors and you want dd to continue just =
skipping the errored sector(s) add =E2=80=9Cconv=3Dsync,noerror=E2=80=9D =
and instead of a bad sector being a fatal error, it=E2=80=99ll replace =
it with all NULs and keep going.

=E2=80=94 Kevin




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AA0042EB-7EF2-468C-8EC6-82794FF1EFAD>