lifetime of sd card

Hi, all:
for sd card which less than 2G, life cycles is 100, 000 times, that is long enough.
But for the one greater than 2G, life cycles is 10, 000 times,
I have checked the mojo in bb, it use swap when have more application in the system.
MTD technology take care of underside of writing and reading but for 10,000 times, how long do you think will BB which has a mojo run on the sd card can work?
Any ideas? Any solutions?
Frank
|

You may want to look at unionfs, casper, and especially this page:
http://wiki.flimzy.com/index.php/Install_Debian_on_USB

In a nutshell, it is about having a read-only base filesystem; when
you need to write on it, modifications are stored in a ramdisk; when
your ramdisk is full, or when you shutdown the system, a "layer" is
realized with the changed files, stored on the flash after the base
filesystem, and next time unionfs will virtually applies this layer to
the base filesystem. Thus you have not touched the base filesystem,
only wrote once on the flash (the layer), but you always see your
modificaitons, and you have the impression that your filesystem is
read/write.

Well it is maybe unclear in my description, but look at the wiki page,
it is worth it. The only drawback I see is the memory consumption,
which is not a problem on a desktop PC, but may become short depending
on your usage of a beagleboard.

Hadrien

Robert Nelson wrote:

Switch to ext2 instead of ext3. (this removes the journal which is
deleted and rewritten quite a bit..
http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq.html)

I have to disagree with that. (However right you may be about lifetime) When we used ext2, our cards were regularly rendered unbootable, until fscked on another computer.

frank zhu escribió:

Hi, all:
    for sd card which less than 2G, life cycles is 100, 000 times, that is long enough.
But for the one greater than 2G, life cycles is 10, 000 times,
    I have checked the mojo in bb, it use swap when have more application in the system.
    MTD technology take care of underside of writing and reading but for 10,000 times, how long do you think will BB which has a mojo run on the sd card can work?
    Any ideas? Any solutions?
Frank

There are some tips for running the nslu with debian on a flash device.
http://www.cyrius.com/debian/nslu2/linux-on-flash.html

May be some tips didn't apply to beagleboard, but worth reading anyway.

Fede

Yeap, I agree that's one big downfall for ext2 in an embedded system,
if the system ever hard locks or something and requires a hard reboot,
you really have to watch it to ensure it actually starts up again.
(depending on how bad it is, you will probably also require a manual
fsck in the process.)

Hint: the fsck is process is a little easier if you have a usb hub
that lights up when the kernel connects to the usb subsystem and turns
off when it's ready to be turned off. Usually 2-3 reboots with this
process and it's up running again (debian/mojo/ubuntu with sd card
mounted as 'ro')

Which is why ext3 is really recommended for the average user.. (even
if it wears out SD cards faster over time..)

Regards,

Great link! I would say that every one of those tips are applicable to the BB, with the exception of periodically moving the swap file. Pretty much all modern flash disk controllers have wear leveling, so moving the file is probably moot. I never run swap on flash disk based embedded systems anyway, preferring to keep total memory use under the system memory.

-Glen

Couldn’t tmpfs and or aufs/unionfs save some unnecessary rewrites to directories that get lots of writes like /var/log and /tmp?

Glen:
When not many application, it is ok. When you have more app, memory
will be used up so some will have to be swapped into the disk.
Best regards
Frank


— On Wed, 1/21/09, Brian Phelps lm317t@gmail.com wrote:


> From: Brian Phelps lm317t@gmail.com
> Subject: [beagleboard] Re: lifetime of sd card
> To: beagleboard@googlegroups.com
> Date: Wednesday, January 21, 2009, 4:32 PM
>
> Couldn’t tmpfs and or aufs/unionfs save some unnecessary rewrites to directories that get lots of writes like /var/log and /tmp?
>
> On Wed, Jan 21, 2009 at 1:49 PM, Glen Duncan <playaspec@gmail.com> wrote:
>
> > On Wed, Jan 21, 2009 at 12:14 PM, Federico Claramonte <fclaramonte@indra.es> wrote:
> >
> > > >
> > >
> > > There are some tips for running the nslu with debian on a flash device.
> > > http://www.cyrius.com/debian/nslu2/linux-on-flash.html
> > >
> > > May be some tips didn’t apply to beagleboard, but worth reading anyway.
> >
> > Great link! I would say that every one of those tips are applicable to the BB, with the exception of periodically moving the swap file. Pretty much all modern flash disk controllers have wear leveling, so moving the file is probably moot. I never run swap on flash disk based embedded systems anyway, preferring to keep total memory use under the system memory.
> >
> > -Glen
>
> –
> got e-?
> http://electronjunkie.wordpress.com

|

some assorted remarks;

try to do without swap. often this is feasible.
if you have to use swap, put it on a separate device if possible (sd
or usb). if it breaks you can easily replace it.
(and by that time there will be bigger/better storage). 2gb sd is
already pretty dirt cheap nowadays.
best solution for fs if you care about duration and system size is
probably a rfs on squashfs with unionfs with ext3 on top of it. (see
e.g. how eeepc does things)

FM

Anybody make an SD card or USB drive with DRAM instead of Flash? That
might make a nice swap space.