# Check a Compact Flash Card for errors



## overmind (Aug 3, 2010)

Let's say I had a file server running from a complact flash card.
After an year I had errors, so I did a fsck, I found lots of errors, I've fixed but then the CF seemed unreliable (more errors appeared after every fsck).

So my question is: If I have a CF on da0 and I `dd if=/dev/zero of=/dev/da0`
after that it is possible somehow to check if the card is still reliable?

What should I use? Should I newfs the CF and then fsck it?

It is possible to know what parts of CF are burned?

I think some parts are bad on some of my CFs, at beginning. Is there such thing as beginning of a CF? On a hard drive If I destroy boot sector the hard will not boot. If I destroy more at beginning of hard drive I will not be able to properly format (this might be valid for older hard drives). So how things are with CF?

If I use a small FreeBSD written at first 100 MB of a 4 GB flash card and I rewrote those first 100MB every time until that area is burned, what will happen next? Will the CF allocate/use automaticaly the next 100MB ? I will still be able to boot?

CF and SD manufacturers advice us not to delete single files from a CF/SD but to wait to fill it up and then format it (for example when we use a SD on a digital camera). That way SD/CF will last longer?

Tell me more about your experience with CF/SD on FreeBSD. (I've used CF for partitions mounted rw with noatime).

thank you and best regards


----------



## fbsd1 (Aug 5, 2010)

Read this http://forums.freebsd.org/showthread.php?t=11715
to learn about Flash Memory Technology:


Then buy a new CF and throw the old one away.


----------



## fronclynne (Aug 6, 2010)

Hmm, just recall that newfs(8) for 8.1 has added [thread=16299]trim support[/thread], so some of that tell-all is out-of-date.  More general support is perhaps on the horizon (dunno if we'll see it in 8.x or 9.x).


----------



## olav (Aug 7, 2010)

fbsd1 said:
			
		

> Read this http://forums.freebsd.org/showthread.php?t=11715
> to learn about Flash Memory Technology:
> 
> 
> Then buy a new CF and throw the old one away.



If I follow this guide and run two CF in mirror then it should be good/stable enough for production use?


----------

