Filesystem to use on compact flash card. - Embedded

This is a discussion on Filesystem to use on compact flash card. - Embedded ; Hi All, I am working on a new embedded Linux project. We are using compact flash to store the whole OS image and a writeable partition for storing certain logged information. All other partitions on the CF are read only. ...

+ Reply to Thread
Results 1 to 14 of 14

Thread: Filesystem to use on compact flash card.

  1. Filesystem to use on compact flash card.

    Hi All,

    I am working on a new embedded Linux project. We are using compact
    flash to store the whole OS image and a writeable partition for
    storing certain logged information. All other partitions on the CF
    are read only. The system currently uses ext3. Additionally the
    system will be installed at locations where power cycling can happen
    without warning (no UPS).

    Can anyone recommend the best filesystem to use on the CF? The main
    requirements are:

    - can survive power cycling without warning
    - not wear out the CF with too many write operations

    Thanks for any responses.

  2. Re: Filesystem to use on compact flash card.

    >
    > Can anyone recommend the best filesystem to use on the CF? The main
    > requirements are:
    >
    > - can survive power cycling without warning


    Not possible !
    The CF itself can be damaged when power goes down while writing. This
    has nothing to do with the file system.

    Even worse: the CF might be damaged so badly that in needs factory
    reformatting before it's accessible again.

    Even worse: The CF manufactures don't provide any specification how long
    it needs power after a write to ensure that the CF data will not be
    damaged. So even a hardware based solution is not possible.

    (This was already discussed here several times and no solution was found.)

    > - not wear out the CF with too many write operations


    The CF card does wear handling internally, so there is no use in trying
    not to write too often to the same address (which can be ensured eg by
    JFFS2). You just need to switch off maintaining the last access date
    (and whatever read statistics).

    -Michael

  3. Re: Filesystem to use on compact flash card.

    Hello Sean,

    sean.machin@thompsontec.com wrote:

    > I am working on a new embedded Linux project. We are using compact
    > flash to store the whole OS image and a writeable partition for
    > storing certain logged information. All other partitions on the CF
    > are read only. The system currently uses ext3. Additionally the
    > system will be installed at locations where power cycling can happen
    > without warning (no UPS).


    Your first look should be to find CF cards which WILL NOT BE DAMAGED by a
    power cycle in the middle of an operation. You will have to look at
    the "professional" series of CF cards with a builtin capacitor.

    Or: You add an extra capacitor only for the CF card into your system.

    For the file system: you should not use a journaling file system. It will
    produce much more wear out. Many people are using ext2.

    Use the mount option "noatime".

    regards

    Wolfgang



  4. Re: Filesystem to use on compact flash card.

    > CF cards which WILL NOT BE DAMAGED...

    Do these really exist ?

    Do the manufacturers guarantee
    that function in the docs ?

    -Michael

  5. Re: Filesystem to use on compact flash card.

    On Apr 26, 5:32*am, Michael Schnell
    wrote:
    > > CF cards which WILL NOT BE DAMAGED...

    >
    > Do these really exist ?
    >
    > Do the manufacturers guarantee
    > that function in the docs ?
    >
    > -Michael


    Thanks for the responses guys. On that project we also have the
    option of using different hardware.
    Would using an SD card with JFFS2 or YAFFS be a better solution in
    terms of handling
    power outages and wear handling?

  6. Re: Filesystem to use on compact flash card.

    > Would using an SD card with JFFS2 or YAFFS be a better solution in
    > terms of handling power outages and wear handling?


    No. SD-cards behave in the same way as CF cards, as they have internal
    wear leveling.

    JFFS2 is only applicable if you have flash that is directly addressable
    by the CPU.

    -Michael

  7. Re: Filesystem to use on compact flash card.

    Sean,

    sean.machin@thompsontec.com wrote:

    > Thanks for the responses guys. On that project we also have the
    > option of using different hardware.
    > Would using an SD card with JFFS2 or YAFFS be a better solution in
    > terms of handling power outages and wear handling?


    Please understand that the problem of power outage is a problem of the
    INTERNAL controller inside a SD or CF card. If you want to avoid this
    problem, add an extra capacitor only for the SD/CF card to your board.
    It is not possible to cure such a failure with an external software.

    And please, don't use an journaling file system on flashcards with internal
    controller (SD,MMC,CF), as they give your product a shorter lifetime
    because of accelerated wear out.

    regards

    Wolfgang

  8. Re: Filesystem to use on compact flash card.

    Wolfgang Mes wrote:

    > Sean,
    >
    > sean.machin@thompsontec.com wrote:
    >
    >> Thanks for the responses guys. On that project we also have the
    >> option of using different hardware.
    >> Would using an SD card with JFFS2 or YAFFS be a better solution in
    >> terms of handling power outages and wear handling?

    >
    > Please understand that the problem of power outage is a problem of the
    > INTERNAL controller inside a SD or CF card. If you want to avoid this
    > problem, add an extra capacitor only for the SD/CF card to your board.



    Just HOW MUCH capacitance is needed?


    --

    Jerry McBride (jmcbride@mail-on.us)

  9. Re: Filesystem to use on compact flash card.

    > Just HOW MUCH capacitance is needed?

    I never saw any spec by a memory card manufacturer on ho long the
    internal work after a write to the card will last and how much energy it
    takes. Unless you find such a spec you can't be sure. If you find it,
    please let us know !

    -Michael

  10. Re: Filesystem to use on compact flash card.

    Michael Schnell wrote:
    >> Just HOW MUCH capacitance is needed?

    >
    > I never saw any spec by a memory card manufacturer on ho long the
    > internal work after a write to the card will last and how much energy it
    > takes. Unless you find such a spec you can't be sure. If you find it,
    > please let us know !
    >
    > -Michael


    Over the years, so engineers have measured the current into the MMC card
    to see how long it "runs on".

    I don't have any links to such measurments, but it would be easy to
    setup again to see if more modern cards are any better.


    donald

  11. Re: Filesystem to use on compact flash card.

    > Over the years, so engineers have measured the current into the MMC card
    > to see how long it "runs on".


    No chance !

    In the card, the actions to do wear leveling take place after a write
    access.

    Here it reorganizes it's memory structure, moving information from
    tiered pages to seldom used pages, all of which needs appropriate
    updating of lots of pointer tables, which - again - dwell in pages that
    might be prone to wear out and sometimes need to be moved. So this
    process is too rare to offer decent statistics and it's proceeding can't
    be predicted (unless the manufacturer who knows what is going on there
    releases decent specs on it).


    -Michael

  12. Re: Filesystem to use on compact flash card.

    Michael Schnell wrote:

    >> CF cards which WILL NOT BE DAMAGED...

    >
    > Do these really exist ?
    >
    > Do the manufacturers guarantee
    > that function in the docs ?
    >

    http://www.stec-inc.com/product/mach4cf.php


  13. Re: Filesystem to use on compact flash card.

    >
    > If the spec sheets don't give a clue, watching the current after many
    > read and writes would help to understand the algorithm.


    I don't agree. A new card will do many (millions) of write cycles
    without the need of reorganization. If the card is used a lot the time
    needed for housekeeping after a write will increase dramatically.

    -Michael

  14. Re: Filesystem to use on compact flash card.

    > http://www.stec-inc.com/product/mach4cf.php
    >


    On the first sight, I don't see such a parameter. I'll have to take a
    deeper look at the data sheet

    -Michael

+ Reply to Thread