Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Dec 2009 18:27:22 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: AHCI/ATA_CAM for dummies?
Message-ID:  <4B25A28A.1040305@FreeBSD.org>
In-Reply-To: <hg19vu$22q$1@ger.gmane.org>
References:  <4B241509.8060906@FreeBSD.org> <hg19vu$22q$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras wrote:
> Doug Barton wrote:
>> I'd like to test the new stuff, but my main concern at this point is
>> that I am not 100% sure how to change my fstab, what will happen if I
>> need to revert, etc. I'm sure I probably _could_ figure it out, but it
>> would save me a lot of time if someone could write down really
>> explicit step-by-step instructions ... put this in your kernel config,
>> do this to fstab, do this if it blows up, etc.
>>
>> Any takers?  :)
> 
> Maybe
> 
> http://ivoras.sharanet.org/blog/tree/2009-11-17.trying-ahci-in-8.0.html

That has a lot of good information, but most of it is irrelevant to me
(you seriously missed the "for dummies" issue). :)  Also, thanks to
everyone who gave suggestions related to glabel, but I don't want to
use it.

What I've done that's worked is:

1. Add "options ATA_CAM" to my kernel config. AFAICS it's not
necessary to do anything special with ahci, that's included in ata_cam.

2. I already had atapicam in my kernel (which I commented out since
it's included in ata_cam as well), but I'm assuming that at least the
following are needed:
device          scbus   # SCSI bus (required for SCSI)
device          da      # Direct Access (disks)
device          cd      # CD
device          pass    # Passthrough device (direct SCSI access)

3. Comment out everything ata-related EXCEPT "device ata". Without
that one the kernel boots but stops cold when it tries to mount the
root file system.

4. Edit fstab. I actually copied all the ad0 entries, commented out
the old ones, and in the new ones I changed "ad0" to "ada0".

5. Update dumpdev in /etc/rc.conf

So far so good. :)  I am actually kind of curious as to why "device
ata" is needed, but it doesn't seem to be hurting anything.

Regarding what's on your web page Ivan, I'm confused about NCQ. I did
what you suggested:
camcontrol tags ada0
(pass0:ata0:0:0:0): device openings: 1

Which is different from what you got. The relevant lines from
'camcontrol identify' are:
pass0: <Hitachi HTS721010G9SA00 MCZOC10H> ATA-7 SATA 1.x device
pass0: 100.000MB/s transfers (UDMA5, PIO size 8192bytes)
protocol              ATA/ATAPI-7 SATA 1.x
Native Command Queuing (NCQ)   yes		31/0x1F

Is there something I need to change to make this work, or is NCQ not
available for SATA 1.x devices? Are there any other parameters worth
tweaking?


Thanks,

Doug

-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B25A28A.1040305>