Subject: Re: problems with second ide drive
To: Christos Zoulas <>
From: Manuel Bouyer <>
List: current-users
Date: 05/19/1999 10:51:51
On May 19, Christos Zoulas wrote
> I just installed a second ide drive on my machine, but I am having a lot
> of problems with it. I am running current as of two days ago... The drive
> and the controller are:
> pciide0 at pci0 dev 7 function 1: Intel 82371FB IDE controller (PIIX)
> pciide0: bus-master DMA support present
> pciide0: primary channel wired to compatibility mode
> wd1 at pciide0 channel 0 drive 1: <WDC AC24300L>
> wd1: drive supports 16-sector pio transfers, lba addressing
> wd1: 4112MB, 8912 cyl, 15 head, 63 sec, 512 bytes/sect x 8421840 sectors
> wd1: 32-bits data port
> wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2

Could you send the complete dmesg output ? I'd like to know what wd0 is,
which modes the controllers uses, etc ...

> With the default configuration, (using DMA mode) I could write to the drive.
> I labelled it and made a few filesystems on it. When I started writing a lot
> of crap on it, it paniced. After the reboot the label was gone. I relabelled
> it and I could find the filesystems and fsck them. Again after I tried to
> write to them, I got a panic and when I rebooted the label was gone.
> It seems that somehow I am getting inconsistant data from it, because
> when I tried to mount some of them, I got bad superblock, but if I did
> an fsck to the filesystem that failed, then I could mount it sometimes.
> Then I added in flags not to use ultra dma and it made no difference.

Sure, the PIIX can't use Ultra-DMA. I guess you'll be using DMA mode 1 or 2,
this depends on what wd0 is.

> Finally I gave up and made it use just PIO, the label stuck around,
> and I could use the filesystems. Then, when I tried to untar something
> big in one of the partitions, I can consistently get it to panic in
> ffs_hashalloc ->...-> sys_mkdir.

Did you try to newfs again the filesystems before ? It may be possible that
some table got corrupted, which are not checked by fsck.

> Any ideas on what to do next?
> wd0 is an old 500M drive running in dma mode 1 and pio mode 0 and it works
> reliably.

Hum, that can be the reason then. 
Any chances to put the new disk as master on the second channed ? You'll
get much better performances.

Manuel Bouyer, LIP6, Universite Paris VI.