On Wednesday 09 March 2011, Philippe De Muyter wrote:
I have worked with many CompactFlash cards, none of which had a size which was a power of 2 :
I have not seen a drive size which is a power of two, but the USB and SD drives are normally a multiple of full segments, which are each a power of two in size, which does not seem to be the case for your CF cards. However, all your cards are a multiple of 516096 bytes, which is the maximum number of sectors per head (63) multiplied with the number of on an ATA device. Apparently, the CF cards must waste a little space to fit the ATA spec.
If the theory is correct, adding 516095 bytes and rounding down to full multiples of 512 KB gives the most likely actual size of the drive. For the 2GB and 4GB card, this turns out to be a multiple of 8MB, for the 1GB cards, it's less clear, but 1GB NAND flash chips often have only 256KB or 128KB segments, while the larger cards normally have 2MB segments or larger (depending on the number of chips and planes).
Size in bytes Label 1008451584 Kingston 1GB 3.3V ASSY IN TAIWAN CF/1GB
1008730112 = 2M * 481
1024966656 Sony CompactFlash 66x 10MB/s [Read] 1GB
1024983040 = 512K * 1955 (could be anything)
1025482752 Kingston Digital Memory Card 1024 MB CF/1024
1025507328 = 2M * 489
1996259328 Kingston ultimate 2GB 266X
1996488704 = 8M * 238
2029805568 Kingston 2GB
2030043136 = 8M * 242
2038063104 Transcend ultra 2GB Industrial
2038431744 = 8M * 243
2048901120 Sony CompactFlash 66x 10MB/s [Read] 2GB
2048917504 = 2M * 977
2096898048 innoDisk Industrial CF card iCF 4000 2GB Industrial
2097152000 = 8M * 250
4017807360 Kingston 4GB CF/4GB
4018143232 = 8M * 479
4076642304 Kingston ultimate 4GB 266X CF/4GB-U2
4076863488 = 8M * 486
Thanks for sharing the list!
The one that I test here is a 'Transcend ultra 2GB Industrial'
Ok, the 8MB segment size is confirmed by the drive size (modulo cylinder size).
flashbench -s --scatter-span=3 --scatter-order=14 --blocksize=8192 --count=100 /dev/sdb -o output.plot
I did that, but the output.plot file is empty :(
I tried to reproduce it here, and accidentally pasted the '>' from the email into the command line, which resulted in bash overwriting the flashbench command with an empty shell script. Maybe you did the same? Deleting and rebuilding flashbench fixed it here.
Arnd