Subject: Re: life of CF card
To: Thomas Isenbarger <tom@isenbarger.us>
From: Forest Bond <forest@alittletooquiet.net>
List: port-hpcmips
Date: 12/17/2006 14:27:32
--lc9FT7cWel8HagAv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Dec 16, 2006 at 06:53:09PM -0600, Thomas Isenbarger wrote:
> Can anyone point me to an article or give me information about the =20
> life time of compact flash cards?  After all the work I am putting =20
> into setting up NetBSD on my Mobilepro 790, I don't want to lose it!  =20
> How do folks out there deal with the prospect of cards going bad?

In general, you want to minimize writes to the card.  I do this by mounting=
 the
root filesystem read-only.  That sort of thing is a little complicated.  I =
mount
certain directories as ramdisks (/var/run, I think) and disable most logging
functions.  Certain files must be handled with care; most UNIX systems expe=
ct
/etc to be writeable in order to update mtab.  It takes some trial-and-erro=
r to
get it right.

This may be overkill.  Modern CF cards should spread writes over the entire
device.  This keeps wear even, extending the lifetime of the device.

> I have a Powerbook with a PC card slot and an appropriate adapter for =20
> my CF card.  Does anyone have a good solution for backing up a CF =20
> card using a Mac, for instance, writing the contents of the CF card =20
> to a file on my Powerbook in some way?

Hopefully, the device is accessible via /dev/wd.. or something similar.  If=
 you
know which device fd to use, you can simply `cat /dev/wd0 | gzip > backup.g=
z`.
But that means that, in order to restore your backup, you really ought to
restore it to a CF card that is completely identical to the card your backup
came from.  Otherwise, you will need to figure out how to mount the card an=
d tar
up the filesystem.  I don't know the BSDs all that well, and probably could=
n't
give you advice on how to do that sort of thing.

-Forest

--lc9FT7cWel8HagAv
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFhZokRO4fQQdv5AwRAgvZAKCEMWk4zGrmYU38sBH4psZx52QuHgCg25CS
Rr2xvkXoO0j3gx68pz8tf6Q=
=cGDh
-----END PGP SIGNATURE-----

--lc9FT7cWel8HagAv--