HD Image Size Limits and hdachs
This has been asked on this list before, but wasn't answered (I've scoured the list and docs for the answer and it's not in either one):
What are Qemu's limits for hard drive image files?
For example, if I'm using qcow, how large of an image can I safely use, say, with Linux host & Linux guest? It seems like qemu-img lets me create pretty large images, but in a previous message Fabrice notes that the maximum parameters for the hdachs switch are: 16383,16,63[,none|lba|auto]. If I understand the math correctly, that yields a maximum of 7 gigabytes:
16383 cyls * 16 heads * 63 sectors * 512 bytes = 8455200768 total bytes, which comes out to 7Gb.
BUT, I have been creating qcow images 16Gb in size, and they've been working fine (while NOT using the -hdachs startup switch). So wouldn't that mean that qemu is able to guess geometry larger than it accepts on the command line with -hdachs? If so, isn't this sort of a bug?
What am I missing here?
Thanks..
Signature · 1 line
Jason "-headaches" Brittain
One thing is that the maximum number of heads is 256, not 16.
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
Quoted 1 line · Jim C. Brown
One thing is that the maximum number of heads is 256, not 16.
That's a good catch, if true. Thanks. But, the doc (the HTML one from CVS HEAD) is very specific about the range being from 1 to 16. I believe you're probably right and the doc is wrong.
Signature · 1 line
Jason Brittain
Hi,
Happy new year to all :-)
Quoted 8 lines · Jason Brittain
Quoted 1 line · Jim C. Brown
One thing is that the maximum number of heads is 256, not 16.
That's a good catch, if true. Thanks. But, the doc (the HTML one from CVS HEAD) is very specific about the range being from 1 to 16. I believe you're probably right and the doc is wrong.
No, the doc is correct. One must distinguish between the Physical CHS (with 16 heads max and this is what -hdachs specifies) and the Logical CHS (with 255 heads max) which is only used by the BIOS to increase the number of sectors that can be addressed. THe logical CHS is specified indirectly when you tell "lba" or "none" as forth argument to -hdachs.
Anyway, nowadays CHS is no longer used when accessing modern hard disks, so it is only a problem for old software using the BIOS to access the hard disk. So _never_ use -hdachs, except if you have to use an old DOS disk image coming from another emulator.
Fabrice.