OESF Portables Forum
General Forums => General Discussion => Topic started by: Anonymous on February 12, 2004, 05:35:11 pm
-
I purchased a 256 meg sd card... Formatted it (ext2). Now I would like to verify that it is in fact using the entire 256meg for the ext2 filesystem.
I ran fsck.ext2 and got /dev/mmcda1 : clean 83/62496 files, 28479/249805 blocks
Is this the correct command to also show the filesystem , and how big it is? I know it is used to resolve file problems? If another command, what would I use..
Thanks
Greg
-
mount, df, something like that.
Si
-
yes monut did. Seems a lot of overhead though. On 256 meg card,
it came up with 241,914 1k blocks.. so that is 247,719,936 or 247MEG.
Using 8meg overhead..
-
By default, ext2 filesystems use 5% overhead for the superuser. This option can be changed, not sure what the implications are though.
-
You will get a similair overhead formatting your SD/CF card with fat16 on anything higher than win95 due to the quick restore bullshit that MS filesystem have these days - again I think it can be changed but not with GUI formatter.
Also a number of HD and other storage device manufacturers seem to count 256 MB in 256,000,000 bytes rather than 256*1024*1024 bytes as most people wont know the difference.
Stu
-
a number of HD and other storage device manufacturers seem to count 256 MB in 256,000,000 bytes rather than 256*1024*1024 bytes as most people wont know the difference.
You are correct about how manufacturers of memory count the bytes.
CompactFlash Memory Card datasheet from the manufacturer specifies
Capacity 256MB
Capacity (formatted) 256,901,120 bytes
which is less than 256*1024*1024=268,435,456
-
I forgot to add:
The block size is 1024 so,
249,805*1024=255,800,320 which means not much overhead, only 1,100,800
-
I just checked my flash card. It is CF, not SD.
fdisk -s /dev/hda1
250,608*1024=256,622,592 which is very close to specification.
-
Checking my 128MB SD card I get
fdisk -s /dev/mmcda1
122992*1024=125,946,880
Yes, SD card is ext2 and so is the CF card above.
fdisk -l /dev/mmcda1
8 heads, 32 sectors, 960 cylinders
where a cylinder is 256*512 bytes
256*512*960=125,829,120
So, looks like ext2 format uses 125MB on this SD card.
-
Okay, out of curriosity, I mounted my CFcards and did a df -h (Linux notebook)
256 MB Kodak: 245M
64 MB Lexar: 62M
What\'s the big hairy deal? It\'s not like it\'s 1989, and you just got your first 40 MB hard drive installed and, HORRORS, there\'s only 36 MB left with a DOS FAT file system on an MFM drive. You don\'t even have to partition these things because of the DOS 33 MB limit! (Oh, the \"good ol\' days.\")
Hello, people!
In case you\'ve missed it, drive sizes are aproximated and stuck on the drive by the marketing department, not the engineering department, and approved by the legal department. Most critical of all, file systems take up space.
-
I repeated measurements using
fdisk -s PARTITION
with flash cards mounted and got better results. Above results are with cards unmounted.
CF
250880*1024=256,901,120 (exactly the specification!)
SD
123008*1024=125,960,192
(128,450,560 is the spec for CF cards, don\'t know spec for SD cards)
The SD spec calls for 980 cylinders and I measure 960.
256*512*20=2,621,440 is the missing memory. Where are these 20 cylinders?
# fdisk -lu /dev/mmcda
Disk /dev/mmcda: 8 heads, 32 sectors, 961 cylinders
Units = sectors of 1 * 512 bytes
Device Boot Start End Blocks Id System
/dev/mmcda1 32 246015 122992 83 Linux
#
Sectors start at 32 and end at 246015.
246015*512=125,959,680 ?not what I expect. I thought it would be 128MB.