Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Broken 6.0.1 RAIDframe



Thanks for the replies.

 >> # disklabel wd0 | tail -10
 >> disklabel: partitions a and b overlap
 >
 >I would worry about that warning message:
 >
 >> #        size    offset     fstype [fsize bsize cpg/sgs]
>> a: 39100288 2048 RAID # (Cyl. 2*- 387
91)
 >>  b:    395095  38707177       swap                     # (Cyl.
 >> 38399*-  38791*)
 >
 >39100288+2048=39102336 would be a suitable offset for the swap partition.

The overlaping partitions warning can be ignored Patrick--I think so anyway. I followed Martti Kuparinen's "Root Filesystem on RAID-1 with NetBSD's RAIDframe" article when configuring the array. The URL I originally got it from (http://users.piuha.net/martti/comp/raid/raid.html) is invalid now but there's a copy here:

http://lsi.vc.ehu.es/pablogn/docencia/manuales/configuraciones/raid/raid.html

and section  6. Setting up kernel dumps  says:

"The normal swap area in our case is on raid0b but this can not be used for crash dumps as process scheduling is stopped when dumps happen. Therefore we must use a real disk device. However, nothing stops us from defining a dump area which overlaps with raid0b. The trick here is to calculate the correct start offset for our crash dump area."

So the wd0b and wd1b swap partitions for dump space need to overlap the wd0a and wd1a RAID partitions. For the sake of completeness, I should have also provided the disklabel for raid0:

# disklabel raid0 | tail -10
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
a: 38705065 0 4.2BSD 0 0 0 # (Cyl. 0 - 37797*) b: 395095 38705065 swap # (Cyl. 37797*- 38183*) d: 39100160 0 unused 0 0 # (Cyl. 0 - 38183*)
#
#

However, I see there's no mention of creating this extra real disk device in Chapter 16 of the NetBSD Guide. So does that mean the requirement for it has been superceded?

I realized after reading your reply that I actually omitted to add a separate line for the dump space in /etc/fstab when setting up the array, so when I tested a crash dump by typing Ctl-Alt-Esc, then sync at the db{0}> prompt this line would have told it to dump to raidb:

/dev/raid0b             none    swap    sw,dp            0 0

If I'd followed Martii's instructions properly it would have been:

/dev/raid0b             none    swap    sw            0 0
/dev/wd0b               none    swap    dp            0 0

Causing a kernel crash dump without the correct (as I thought) entries in fstab caused no obvious problems though, so I guess that indicates creating wd0b and wd1b is unnecessary?


 >> I've set up a NetBSD/i386 6.0.1 system with its root partition on a
 >> RAID-1 RAIDframe volume and somehow managed to get it into a broken
 >> state.  This is only a test system containing no important data, so
 >> it doesn't matter if it can't be fixed, but I'd be interested to
 >> know if it can be for reference, please.
 >>
 >> The RAID-1 array is composed of wd0a and wd1a.
 >>
 >> # uname -mrs
 >> NetBSD 6.0.1 i386
 >> #
 >> # raidctl -s raid0
 >> Components:
 >>            /dev/wd0a: optimal
 >>           component1: failed
 >> [...]
 >>
 >> Is it possible to remove wd1 from the array somehow, add it as a hot
 >> spare, then use -F to reconstruct onto it?
 >
 >wd1 is already removed from the array, otherwise raidctl would print
 >wd1 instead of component1. So you can already add it as a hot spare
 >and reconstruct.

It won't allow me to add wd1a as a spare Manuel:

# raidctl -a /dev/wd1a raid0
raidctl: ioctl (RAIDFRAME_ADD_HOT_SPARE) failed: Device busy
# tail -1 /var/log/messages
Apr 25 20:17:15 bs5t /netbsd: dk_lookup on device: /dev/wd1a failed!
#
# raidctl -f component1 raid0
# tail -1 /var/log/messages
Apr 25 20:17:15 bs5t /netbsd: dk_lookup on device: /dev/wd1a failed!
#

and yet wd1 seems to be configured properly and responds to `fdisk' and `disklabel -r':

# fdisk wd1
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 39813, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 40132503

BIOS disk geometry:
cylinders: 1023, heads: 34, sectors/track: 54 (1836 sectors/cylinder)
total sectors: 40132503

Partitions aligned to 1836 sector boundaries, offset 54

Partition table:
0: NetBSD (sysid 169)
    start 2048, size 40130455 (19595 MB, Cyls 1/3/51-21858/22/27), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
#
# disklabel -r wd1 | tail
disklabel: partitions a and b overlap
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  39100288      2048       RAID                     # (Cyl.      2*-  38791)
b: 395095 38707177 swap # (Cyl. 38399*- 38791*) c: 40130455 2048 unused 0 0 # (Cyl. 2*- 39813*) d: 40132503 0 unused 0 0 # (Cyl. 0 - 39813*)
#


I wonder if the next step might be to try to unconfigure the array and configure it again like this:

# raidctl -u raid0
# raidctl -c raid0.conf raid0

Would that cause the filesystems in the array to be erased?


Ray


Home | Main Index | Thread Index | Old Index