From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: 63 sectors Date: Wed, 03 Sep 2008 13:26:31 +0200 Message-ID: <48BE7467.3080900@redhat.com> References: <48BE46DD.1070703@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: KVM list , "H. Peter Anvin" To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:35954 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751840AbYICL2E (ORCPT ); Wed, 3 Sep 2008 07:28:04 -0400 In-Reply-To: <48BE46DD.1070703@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: > I can think of a few workarounds, all bad: > - add a partitioning tool (or option to qemu-img) to format the disk, > placing the first partition on the fourth cylinder, aligning it. tell > the users not to wipe the disks out but instead install to one of the > existing parititions Well, that one slightly modified could work out quite well, at least for linux. As far I know the linux kernel uses the geometry provided by the storage adapter only in case the disk is blank. If there is a partition table present on the disk, the linux kernel will calculate the geometry based on that. Background for this is that scsi disks have no disk geometry, they just have a bunch of sectors. The scsi hostadapter bioses have to pull out some geometry out of thin air to satisfy ms-dos and real os boot loaders, and there was no standard on how to do that. Thus moving disks from one scsi adapter to another may result in hba-reported and on-disk geometry being different, and the only sane way to deal with that is using the on-disk geometry. With LBA this is much less an issue these days though. So qemu-img could create a partition table, containing one partition, hinting 32 sectors/cylinder. Linux should keep that geometry then, even when distro installers are deleting the partition and creating their own scheme. Dunno how what *BSD or Windows guests will deal with that though. cheers, Gerd