From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <45876f97909809a360c52f90ee9c2952@hamnavoe.com> To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Tue, 4 Oct 2011 10:34:19 +0100 In-Reply-To: <6c0a6fdef3589e5cb13618f19d9ac9fc@chula.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] copying fossil filesystem to a bigger disk Topicbox-Message-UUID: 3080ad94-ead7-11e9-9d60-3106f5b1d025 I said: >> You could try telling your BIOS to use the disk in ATA (IDE) mode, and >> see if that gives you 512-byte sector emulation. However I seem to >> recall posts from Erik advising that some chipsets have bugs in this >> mode which affect Plan 9. quanstro@quanstro.net said: > to put a point on it, ata is an abstracted command set. ide is a register > set and protocol for delivering ata commands modeled on the isa bus. > > the disk interface (ide/ahci/something else) doesn't have anything to do > with the sector size. the sector size is reported in the ident block, which > emulation layers treat as an opaque sack of bits. But if you look at the drivers, disk interface (ide/ahci/something else) has everything to do with the sector size, because: - sdiahci.c uses drive->unit->secsize, which comes from an ata read capacity command in scisonline() - not from the ident block - sdata.c ignores drive->unit->secsize, and uses drive->secsize which is always set to 512 So, if the BIOS can be set to use IDE mode, the sdata driver will be used, and will treat the drive as if it has 512-byte sectors. This may or may not work, depending on what "logical sector size" actually means. I would have thought it meant that read/write commands are expressed in logical not physical sector terms; but then it seems odd that the WD20EARS reports 4096-byte blocksize in the read capacity command. My WD10EARS behaves differently: term% scuzz /dev/sdC0 block size: 512 capacity 1953525167 512 ok 8