Author Topic: Sd Storages Card: Why Mount -o Sync?  (Read 3142 times)

jan

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • http://www.spacezone.de/zaurus/articles/
Sd Storages Card: Why Mount -o Sync?
« on: March 05, 2006, 06:27:25 pm »
general questions

1. OZ Wordpress: Root on SD says we cannot run use "filesystem buffering" because crappy closed source drivers are used? Is this still the case?

2. The same article says later one should not mount 'sync'. So the "filesystem buffering" issue is not linked with 'mount -o sync', right?

3. Then, why does OZ generally mount cards with 'sync'? To my knowledge sync is still not really implemented for (v)fat and sync has disadvantages (speed, damages flash faster).

4. The article quoted above suggests keeping the (FAT) filesystem and loopback mount a disk image for speed reasons. Will 'eject card' properly unmount both?

5. People tend to use either FAT (obviously for compatibility reasons) or ext2/3 on storage cards? Why is this? Shouldn't jffs2 be a better choice?

I'm about to buy a big SD/MMC card

6. I found compatibility lists but they were pretty old (for collie, sharp rom), are there known problems with cards <=1GB. Should one consider speed? Decide by which info?

7. I think of keeping the most important stuff (PIM software and /home) on internal flash, additional software on SD (by ipkg-link). Is this a good idea?

SL-C860 (Boxer), OZ 3.5.4.1 GPE 2.7
my blog

CoreDump

  • Hero Member
  • *****
  • Posts: 713
    • View Profile
    • http://www.hentges.net
Sd Storages Card: Why Mount -o Sync?
« Reply #1 on: March 06, 2006, 04:10:26 am »
Quote
general questions

1. OZ Wordpress: Root on SD says we cannot run use "filesystem buffering" because crappy closed source drivers are used? Is this still the case?

hmm?

Quote
2. The same article says later one should not mount 'sync'. So the "filesystem buffering" issue is not linked with 'mount -o sync', right?

sync / async is all about buffering. If you run async, all data written to the card is buffered first (which speeds up writes a lot) and synced later. If you run "sync", the data is synced on each write (which is waaaayyy slow)

Quote
3. Then, why does OZ generally mount cards with 'sync'? To my knowledge sync is still not really implemented for (v)fat and sync has disadvantages (speed, damages flash faster).

Sync is the safe-mode for mounting removable media. With "async" you risk that the user pulls the car w/o umounting (and syncing) it first. This would leave your filesystem in a damaged state. With sync pulling a mounted card isn't a problem as long as do not write at the moment you remove the media.

Also some cards experience heavy filesystem instabilities when mounted async.

Quote
4. The article quoted above suggests keeping the (FAT) filesystem and loopback mount a disk image for speed reasons. Will 'eject card' properly unmount both?

Oh, that could work if "fuser" is installed. Otherwise no.

Quote
5. People tend to use either FAT (obviously for compatibility reasons) or ext2/3 on storage cards? Why is this? Shouldn't jffs2 be a better choice?

Nope, you do not want a journaling FS on a SD or CF card. It would reduce the life-span a lot.

Quote
I'm about to buy a big SD/MMC card

6. I found compatibility lists but they were pretty old (for collie, sharp rom), are there known problems with cards <=1GB. Should one consider speed? Decide by which info?

7. I think of keeping the most important stuff (PIM software and /home) on internal flash, additional software on SD (by ipkg-link). Is this a good idea?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117121\"][{POST_SNAPBACK}][/a][/div]
Webmaster of hentges.net & Embedded Linux Developer.

jan

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • http://www.spacezone.de/zaurus/articles/
Sd Storages Card: Why Mount -o Sync?
« Reply #2 on: March 06, 2006, 11:21:35 am »
Quote
Quote
general questions

1. OZ Wordpress: Root on SD says we cannot run use "filesystem buffering" because crappy closed source drivers are used? Is this still the case?

hmm?

Quote
2. The same article says later one should not mount 'sync'. So the "filesystem buffering" issue is not linked with 'mount -o sync', right?
sync / async is all about buffering.

Can someone comment on the article.

Quote
Quote
3. Then, why does OZ generally mount cards with 'sync'? To my knowledge sync is still not really implemented for (v)fat and sync has disadvantages (speed, damages flash faster).

Sync is the safe-mode for mounting removable media. With "async" you risk that the user pulls the car w/o umounting (and syncing) it first. This would leave your filesystem in a damaged state. With sync pulling a mounted card isn't a problem as long as do not write at the moment you remove the media.

Also some cards experience heavy filesystem instabilities when mounted async.

Shouldn't async and  unmount produce exactly the same thing than sync? Confused.

Quote
Quote
5. People tend to use either FAT (obviously for compatibility reasons) or ext2/3 on storage cards? Why is this? Shouldn't jffs2 be a better choice?

Nope, you do not want a journaling FS on a SD or CF card. It would reduce the life-span a lot.

So SD/CF cards don't use the same technology as the internal memory (NAND)?

Quote
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117160\"][{POST_SNAPBACK}][/a][/div]
« Last Edit: March 06, 2006, 11:23:15 am by jan »

SL-C860 (Boxer), OZ 3.5.4.1 GPE 2.7
my blog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Sd Storages Card: Why Mount -o Sync?
« Reply #3 on: March 06, 2006, 12:13:04 pm »
Quote
Can someone comment on the article.

From a quick read it looks like there are two ways to do this, one uses sync and the other async depending on the method type (Method 1 - Straight SD card; Method 2 - Disk Image.)

Quote
Shouldn't async and unmount produce exactly the same thing than sync? Confused.

Yes, they should, however Coredump was talking about users who just pull cards out without umounting them. Also note the instabilities caused by mounting async.

Quote
So SD/CF cards don't use the same technology as the internal memory (NAND)?

SD/CF cards (at the level we see them) have built-in wear leveling, raw NAND does not and that's why jffs2 is used.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva