[nycbug-talk] OpenBSD, numbering disks...

George Georgalis george
Mon Jul 18 23:59:51 EDT 2005


What's the best way to assure my root ata disk doesn't get renumbered,
when new sata drives are added?

On an openbsd install, I'm using an ata drive for the OS (wd0); but
when I power up with an sata drive connected, the sata gets numbered
wd0 with my OS now on wd1. The bios seems to properly load the kernel
from the ata drive and boot the root fs, but it then fails to do a fsck
on /dev/rwd0a (which is now an unformatted sata drive) and drops me to a
shell with a 150Mb "root_device" mounted read-only.  The tail of dmesg
says

wd0: no disk label
dkcsum: wd0 matched BIOS disk 81
dkcsum: wd1 matched BIOS disk 80


This box is to host a variety of dynamic stuff on the (4) sata removable
drive trays, the sata drive(s) may or not have a disklabel or spun up at
boot, well that was the plan. I was hoping I'd be able to work out a way
to unmount, power off a drive (with the tray assembly), change it, power
up the new disk, format and mount it.

But now it is not clear that I'll be able to use a drive that's not spun
up at boot, and the drive renumbering thing has me worried about doing
anything planned with this box.

ide only dmesg http://nycbug.org/?NAV=dmesgd&dmesgd_criteria=&dmesgid=690#691

my borked submit of a bunch of dmesg from /var/log/messages shows something
real strange. http://nycbug.org/?NAV=dmesgd&dmesgd_criteria=&dmesgid=690#690

pciide0 at pci0 dev 15 function 0 "VIA VT8237 SATA" rev 0x80: DMA
pciide0: using irq 11 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <ST3400832AS>
wd0: 16-sector PIO, LBA48, 381554MB, 781422768 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
pciide1 at pci0 dev 15 function 1 "VIA VT82C571 IDE" rev 0x06: ATA133, channel 0 configured to compatibility, channel 1 configured to compatibility
wd1 at pciide1 channel 0 drive 0: <Maxtor 6Y060L0>
wd1: 16-sector PIO, LBA, 58644MB, 120103200 sectors
wd1(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 6
...
wd0: no disk label
dkcsum: wd0 matched BIOS disk 81
dkcsum: wd1 matched BIOS disk 80
root on wd1a
rootdev=0x10 rrootdev=0x310 rawdev=0x312


exactly how that got in my /var/log/messages I don't know.. something
to do with a warm boot vs cold and powering various (empty/full) sata
trays on or off.  I thought it was from booting with an empty sata tray
on while the loaded tray was off, but I cannot reproduce it now.

Main thing is do I have to write some crack script to determine
(depending on what if any sata drives are present at boot) the device
number the root partition is on and properly fsck+mount it when the
system is normally in read-only mode??

// George


-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george at galis.org




More information about the talk mailing list