Subject: Re: RAID-1 and crash dumps
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 02/02/2004 23:55:07
On Fri, Jan 30, 2004 at 07:48:19PM +0200, Martti Kuparinen wrote:
> Hi!
>
> I'm updating our RAID-1 documenation to match -current's new tricks
> but I got few problems...
>
> I have two identical 120 GB disks on my server (NetBSD/i386 1.6ZI):
>
> # dmesg | grep wd
> wd0 at atabus0 drive 0: <IC35L120AVV207-1>
> wd0: drive supports 16-sector PIO transfers, LBA48 addressing
> wd0: 115 GB, 239340 cyl, 16 head, 63 sec, 512 bytes/sect x 241254720 sectors
> wd0: 32-bit data port
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
> wd0(viaide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
> wd1 at atabus1 drive 0: <IC35L120AVV207-1>
> wd1: drive supports 16-sector PIO transfers, LBA48 addressing
> wd1: 115 GB, 239340 cyl, 16 head, 63 sec, 512 bytes/sect x 241254720 sectors
> wd1: 32-bit data port
> wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
> wd1(viaide0:1:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
>
> I've configured RAID-1 for everything but I still have something wrong in
> wd0's disklabel as a kernel crash dump will corrupt /home (raid0e).
>
> With the configuration below, I went to DDB by pressing Ctrl+Alt+Esc and
> typed sync. After reboot the raid0e had a corrupted super-block. So I
> assume the crash dump overwrites raid0e's beginning.
>
> I used the old method to calculate the real offset of raid0b
>
> # dc
> 241254657 # wd0a
> 241254528 # raid0d
> -p
> 129 # size of internal RAID structures
>
> 63 # offset of wd1a
> 129 # size of internal RAID structures
> +
> 16777216 # size of raid1a
> +p
> 16777408 # offset of swap within wd0
>
> But this is wrong somehow. What am I doing wrong?
This looks good, and I find the same value using another way to compute it.
If you create on wd0 a partition starting at 192, can you mount
it and find the same value as raid0a ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--