Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jul 2023 20:02:20 +0100
From:      Bob Bishop <rb@gid.co.uk>
To:        mike tancsa <mike@sentex.net>
Cc:        freebsd-embedded <freebsd-embedded@FreeBSD.org>
Subject:   Re: SD card corruption
Message-ID:  <C5FCB5FC-26A3-4DE1-A753-36A61FFC6E7D@gid.co.uk>
In-Reply-To: <709521ba-5719-5f80-10bf-1de05d99d5c1@sentex.net>
References:  <709521ba-5719-5f80-10bf-1de05d99d5c1@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> On 13 Jul 2023, at 16:33, mike tancsa <mike@sentex.net> wrote:
>=20
> TL;DR. We get batches of cards that suddenly fail with SD card wide =
file corruption out of the blue.
>=20
>=20
> A little background.  We have APUs (PCEngines) in the field that work =
REALLY well for reliability.  However, the odd time that things go =
south, its due to SD cards.  I had a couple of devices last week fail =
after about a year and when I got them back both had hundreds of fsck =
errors. These are devices that stay mounted Read Only so there are no =
writes to them. Even on the second partition of the nanobsd image which =
was never mounted had many fsck errors.  Normally we use SanDisk but had =
to switch to some PNY due to supply chain issues.  The PNY seem to be =
more failure prone than the SanDisk, but we do get the odd SanDisk too =
with the same pathology.
>=20
> Once I get the bad SD card back, I can newfs it and all is fine. e.g. =
I can fill the disk with 16GB of /dev/urandom files and the hashes all =
match over time.
>=20
> Is it just bad hardware / bad luck that is causing these seemingly =
catastrophic failures or are there things that should be done in the =
field to extend the life of SD cards ?

What=E2=80=99s the environment like? SD cards really don=E2=80=99t like =
being run hot for instance. Are there radios or other electrical noise =
nearby?

> Is there any way to predict these failures in advance ?
>=20
> If I newfs -E (does the -E make a difference?) the unused partition =
and then re-write it with the live image and then boot to the new =
partition, does that buy my any longevity ?
>=20
>     ---Mike
>=20
>=20

--
Bob Bishop
rb@gid.co.uk







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C5FCB5FC-26A3-4DE1-A753-36A61FFC6E7D>