Subject: Re: Attaching additional HDD - such simple(?) thing not without problems
To: None <pavel.cahyna@st.mff.cuni.cz,>
From: Quentin Garnier <cube@cubidou.net>
List: netbsd-users
Date: 05/24/2006 12:48:57
--8SdtHY/0P4yzaavF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, May 24, 2006 at 12:40:14PM +0200, Pavel Cahyna wrote:
> On Wed, May 24, 2006 at 11:19:43AM +0200, Quentin Garnier wrote:
> > On Wed, May 24, 2006 at 10:16:39AM +0200, Pavel Cahyna wrote:
> > > On Wed, May 24, 2006 at 02:54:07AM +0200, Zbigniew Baniewski wrote:
> > > > piixide0 at pci0 dev 7 function 1
> > > > piixide0: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
> > > > piixide0: bus-master DMA support present
> > > > piixide0: primary channel wired to compatibility mode
> > > > piixide0: primary channel ignored (disabled)
> > > > piixide0: secondary channel wired to compatibility mode
> > > > piixide0: secondary channel interrupting at irq 15
> > > > atabus0 at piixide0 channel 1
> > >=20
> > > > hptide0 at pci0 dev 19 function 0
> > > > hptide0: Triones/Highpoint HPT370 IDE Controller
> > > > hptide0: bus-master DMA support present
> > > > hptide0: primary channel wired to native-PCI mode
> > > > hptide0: using irq 10 for native-PCI interrupt
> > > > atabus1 at hptide0 channel 0
> > > > hptide0: secondary channel wired to native-PCI mode
> > > > atabus2 at hptide0 channel 1
> > >=20
> > > So, you have several ATA busses (channels). And the hptide ones have
> > > higher numbers, so all devices on them will have higher numbers.
> > >=20
> > > Add a line
> > > atabus0 at hptide0 channel 0
> > >=20
> > > to your kernel config file and recompile. This should work and should=
 be
> > > enough.
> >=20
> > No;  that will just wire down atabus0, not wd0.  If you only fix
> > atabus0, you'll indeed get an atabus1 attaching to piixide0, but you
> > will still have a wd0 attaching to that atabus1.
>=20
> Ah. I was thinking that then the enumeration of wd* would start at the
> lowest - numbered atabus. Sorry.
>=20
> Adding wd0 at atabus0 drive 0 should be _really_ enough, no?

In the initial poster's case, it would be wd0 at atabus1 (or 2, I
haven't read the dmesg, only the excerpt above.

Depending on the version of config(1) (I think only -current will not
show that behaviour, I don't remember when I changed it), it will
complain if you add 'wd0 at atabus1' but 'atabus1' is not explicitely
defined earlier.  However, it will work as long as there is an 'atabus*'
defined.

> > What amuses me greatly is this thread is how Linux mostly lacks that
> > ability of wiring this down.  I'm surprised the initial poster got so
> > much attention with his issue, considering Linux has the exact same
> > issue with SCSI drives (which include SATA drives, due to the way Linux
> > handles those...).  Also, RedHat Linux has a "solution" for that, using
> > file-system labels.  Of course, it uses the same labels for all
> > installations, so that mixing drives from two different RedHat
> > installations leads to interesting results.
>=20
> Linux can mount filesystems by UUID, even if probably very few people use
> this.

Yes, just as NetBSD can be wired down.  My point was:  default install.
I've had headaches because of that much more painful than a quick edit
of /etc/fstab, because when you have 'LABEL=3D/' everywhere, you have to
hunt for the actual underlying device.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--8SdtHY/0P4yzaavF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iQEVAwUBRHQ6GdgoQloHrPnoAQJdqgf9EpeqEWxF1WSmU01HT0czhYyxxjWcKv7v
qgGv+E3PkpgTVrVh48uPqk8N6Hh6qU54VRu70b47oGkV3LmgJtelat+TMIQdZT3z
oG46M7WCovHUf/w90RrYQqx2mMEeMksqymE/R04ZpkIk/L0Cl8uXRwiCA50TfJOw
LzmMxytpgDRN1zDizAvSSWs/wjRTzn+yJp9gvVKAlfYbhJh5plD0ZfoPTKXc6za4
3zd4kIq9tcjMtCNGNTrGkDjLosSqU5dj+KpMdkAICUrjaymboxGqt6PTqtzEO6uV
s/WSNZO6JD2/VhtS22hfARUh62aOVosxivLUzDbkrCja6+McFfzJDA==
=Hcqd
-----END PGP SIGNATURE-----

--8SdtHY/0P4yzaavF--