View Single Post
ReinhardE's Avatar
Posts: 35 | Thanked: 0 times | Joined on Dec 2005 @ München
#259
Originally Posted by armin
Good hint! I backuped my 512mb RS-MMC, reformatted with VFAT32 using 1kb cluster size, and restored it.
Today I received my new 2GB Kingston MMC, so I backed up my maps
from a 1GB card (fromatted with FAT32 and logical sector size 512 bytes)

The 1 GB card:
/dev/sdc1 1017268 761980 255288 75% /USBc1

The (uncompressed) backup file (ls -l):
584038400 2006-08-25 12:50 Maps.tar

I tested the new 2 GB card via
fsck -v /dev/sdc1
and was told that the logical sector size is 512 bytes.

So I untared the backup and to my surprise the MMC card was full, before everything was backed up.

That was the time when I realized that the minimum allocation size for a file is cluster size (which was 32KB) and not logical sector size.

By formatting the card with
mkfs.vfat -S 512 -s 1 /dev/sdc1
one achieves 512 bytes logical sector size (-S 512) and 1 logical sector per cluster (-s 1), and therefore 512 bytes per cluster.

After restoring my tar file, it took only 27% of disk space:

The 2 GB card:
/dev/sdc1 2007789 534883 1472906 27% /USBc1

The bad news: my Nokia phone (symbian) cannot read the card any more