Subject: Re: Odd dmesg log messages
To: None <current-users@netbsd.org>
From: Takahiro Kambe <taca@back-street.net>
List: current-users
Date: 12/05/2007 10:31:38
In message <20071205011725.GA8335@panix.com>
	on Tue, 4 Dec 2007 20:17:26 -0500,
	Thor Lancelot Simon <tls@rek.tjls.com> wrote:
> On Wed, Dec 05, 2007 at 12:10:34AM -0000, explorer@flame.org wrote:
> > raid0: RAID Level 1
> > raid0: Components: /dev/wd0g /dev/wd1g
> > raid0: Total Sectors: 566273088 (276500 MB)
> > WARNING: double match for boot device (wd0, wd1)
> 
> Two BIOS drives have the same signature because they have exactly the same
> contents in their first sectors.  The kernel can't be certain which one you
> actually booted from, so you might get / mounted from the other one by
> accident.  Typically happens when one clones disks with dd instead of using
> the tools to partition them -- the tools write a unique signature into
> place...
In my case, it isn't exactly the same case above:

pdcsata0 at pci2 dev 2 function 0
pdcsata0: Promise PDC20579 SATA150 controller (rev. 0x02)
pdcsata0: interrupting at ioapic0 pin 22 (irq 10)
pdcsata0: bus-master DMA support present
atabus0 at pdcsata0 channel 0
atabus1 at pdcsata0 channel 1
...
pdcsata0 port 0: device present, speed: 1.5Gb/s
pdcsata0 port 1: device present, speed: 1.5Gb/s
wd0 at atabus0 drive 0: <Maxtor 6B250S0>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 233 GB, 486344 cyl, 16 head, 63 sec, 512 bytes/sect x 490234752 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(pdcsata0:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
...
wd1 at atabus1 drive 0: <Maxtor 6B250S0>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 233 GB, 486344 cyl, 16 head, 63 sec, 512 bytes/sect x 490234752 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(pdcsata0:1:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
...
ataraid0: found 1 RAID volume
ld0 at ataraid0 vendtype 0 unit 0: Promise ATA RAID-1 array
ld0: 233 GB, 30515 cyl, 255 head, 63 sec, 512 bytes/sect x 490234624 sectors
WARNING: double match for boot device (wd0, wd1)
WARNING: double match for boot device (wd0, ld0)


ld0 is RAID1 constructed with wd0 and wd1 by Promise controller.  So,
first sectors of wd0 and wd1 have really the same content.

After all, I configured a kernel that root device to ld0.

I think we need some mechanism to specify root device's priority.

-- 
Takahiro Kambe <taca@back-street.net>