* what should i do? using DOM and CF's problem
@ 2005-10-10 3:53 wen jia
2005-10-10 6:28 ` Charles Manning
0 siblings, 1 reply; 3+ messages in thread
From: wen jia @ 2005-10-10 3:53 UTC (permalink / raw)
To: linux-mtd
hi,everyone
I want to use DOM or CF in a ATM-like machine. In this machine I have to
record after each exchange, and there is no UPS, so sudden Power loss must
be accepted. I don't select DOC for its high price, not using harddisk for
its high heat and easy damage.
There is a article talking about the DOM,CF & DOC. And from this article
there is no safe way to use a DOM,CF even DOC under such environment. what
should I do?
here is the article:http://www.koansoftware.com/en/art.php?art=40
Linux DiskOnChip, DiskOnModule, Compact Flash
Note that DOC (DiskOnChip) adn DOM (DiskOnModule) are completely different
items:
DiskOnModule
A DOM device is interface compatible with a standard IDE drive, the
software can't tell the difference, so consequently, you don't need any
special boot sector or driver for it, the normal IDE driver and boot
techniques will do. They do have some problems which I have tried to
summarize in another posting in this thread.
DiskOnChip
A a DOC is basically a bank-switched flash memory device that comes with a
tricky boot firmware preinstalled which replaces the BIOS's handlers for
disk access calls. So the device *appears* as an IDE drive, but only as
long as all accesses go through the BIOS. Since Linux does not use the
BIOS, using a DOC requires a special device driver (which has been
available for quite some time under "MTD Devices".
There are two things to consider when running a Linux system off a DOM, DOC
or a CF
Wear
These devices use flash memory as their storage media. You can write to
each block of flash memory only so many times (typically in the range of
ten thousand to hundred thousand times). They do presumably implement some
kind ow wear levelling internally (transparently distribute write accesses
evenly over all available flash blocks) which improves things,
but nevertheless, if the Linux system keeps writing data to files, such a
device can be worn out in a matter of weeks. To deal with this, the system
should avoid write accesses where possible (best is to mount it read only,
if not possible, at least use the "-noatime" mount option).
Sudden power loss
These devices are made to replace IDE disks, so they have apparently copied
some of the problems of rotating had disk as well: It appears that, if
power is lost while a write access was in progress, such a device can be
seriously damaged. This has never been officialy acknowledged nor denied by
any manufacturer as far as I am aware, but I have read numerous reports
from credible people who have seen it happen. Some said that the device was
damaged completely in the process, others said they were able to bring it
back to life by doing a low-level format. In any case, all data on the
device was lost.
In summary
If a sudden loss of power is an even remote possiblity for your
application, the only way to safely use a DOM or CF is to keep it mounted
read-only, and even if a power failure can be ruled out, there are still
good reasons to keep it like that.
JFFS2
Neither a DOM or CF formatted with JFFS2 won't help for several reasons:
1. No read/write filesystem (neither JFFS* nor any other) can prevent a
situation where a power failure happens while a write access is pending.
2. In order to do proper wear-levelling, JFFS needs to know the underlying
media's block structure. But this information is invisible at the IDE
interface. It may even vary across different CF makes/models.
About StrataFlash
StrataFlash is just plain flash memory and it makes sense
to use JFFS2 on Strataflash, because such a configuration should be
resilient to power failures.
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: what should i do? using DOM and CF's problem
2005-10-10 3:53 what should i do? using DOM and CF's problem wen jia
@ 2005-10-10 6:28 ` Charles Manning
2005-10-10 9:02 ` David Woodhouse
0 siblings, 1 reply; 3+ messages in thread
From: Charles Manning @ 2005-10-10 6:28 UTC (permalink / raw)
To: linux-mtd; +Cc: wen jia
On Monday 10 October 2005 16:53, wen jia wrote:
> hi,everyone
> I want to use DOM or CF in a ATM-like machine. In this machine I have to
> record after each exchange, and there is no UPS, so sudden Power loss must
> be accepted. I don't select DOC for its high price, not using harddisk for
> its high heat and easy damage.
> There is a article talking about the DOM,CF & DOC. And from this article
> there is no safe way to use a DOM,CF even DOC under such environment. what
> should I do?
> here is the article:http://www.koansoftware.com/en/art.php?art=40
DOM and DOC or anything else won't help if you're using FAT.
Consider using NAND flash or SmartMedia or XD. These are raw NAND flash parts.
Then, use them with JFFS2 or YAFFS. That should give you a very reliable
solution.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: what should i do? using DOM and CF's problem
2005-10-10 6:28 ` Charles Manning
@ 2005-10-10 9:02 ` David Woodhouse
0 siblings, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2005-10-10 9:02 UTC (permalink / raw)
To: Charles Manning; +Cc: linux-mtd, wen jia
On Mon, 2005-10-10 at 19:28 +1300, Charles Manning wrote:
> DOM and DOC or anything else won't help if you're using FAT.
>
> Consider using NAND flash or SmartMedia or XD. These are raw NAND
> flash parts. Then, use them with JFFS2 or YAFFS. That should give you
> a very reliable solution.
The DiskOnChip _is_ basically raw NAND parts, albeit with a helpful
extra ASIC with ECC and a FIFO, and possibly even DMA support in the
latest versions. You should be able to use JFFS2 on that quite happily.
DOM and CF are different.
--
dwmw2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-10 9:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-10 3:53 what should i do? using DOM and CF's problem wen jia
2005-10-10 6:28 ` Charles Manning
2005-10-10 9:02 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox