It turned out Manuel was right - I've installed the bootxx_ffsv2 boot block, thinking that this was the newfs default; the systems were actually ffsv1. I was able to disconnect the two disks from the SATA controller, boot from live USB stick, attach them one by one and write bootxx_ffsv1. Now the system boots fine straight from the mirror.
Thanks, and apologies for the noise in current-users. Chavdar On 30 August 2013 21:02, Chavdar Ivanov <[email protected]> wrote: > The system is an old dual opteron m/b with si3114 SATA ports and > another pci two port sata and one pata. On the four mb sata ports are four > 36gb raptors, old but 10k rpm, fast enough, will use later for raid5. They > are wd0 to 3. Boot is from two 120gb seagates in question. The fs should be > v2 by the current default. > > Chavdar > > On 30 Aug 2013 20:52, "Chavdar Ivanov" <[email protected]> wrote: >> >> I think I got it from your point 5 - the example in the manual is >> >> /usr/sbin/installboot -o timeout=30 -v /dev/rwd1a /usr/mdec/bootxx_ffsv2 >> >> with no destination parameter _ /mnt/boot, so it was going to whatever the >> defailt is. I will test Monday. I have vpn access to the system but there is >> a usb stick as a boot device. >> >> I should have read a few man pages in advance. >> >> Chavdar >> >> On 30 Aug 2013 17:09, "Paul Goyette" <[email protected]> wrote: >>> >>> I never read the guide you referred to, but I did have some fun to get my >>> server running with RAIDframe. >>> >>> I documented the process that I followed here >>> >>> http://wiki.netbsd.org/set-up_raidframe/ >>> >>> so others could benefit from my efforts. >>> >>> Hope this helps. >>> >>> >>> On Fri, 30 Aug 2013, Chavdar Ivanov wrote: >>> >>>> Hi, >>>> >>>> I am new to RAIDframe on NetBSD (I usually use ZFS RAIDZx or hardware >>>> RAID if required). A machine turned up lately, previously running >>>> FreeBSD with hardware HPT1520-based mirror. As this didn't look >>>> supported by NetBSD (which was the original reason many years ago to >>>> provision FreeBSD on that box anyway), I decided to try RAIDframe, >>>> following Ch. 16 of the manual. >>>> >>>> The guide states that after creating the fake mirror on the second >>>> disk, populating it with a copy of the system from the first one and >>>> writing the boot block, one should switch the boot from the second >>>> disk and then proceed with the further preparation of the first as a >>>> spare. This boot did not work for me under -current - I got a message >>>> from the bootloader that /boot cannot be found. However, when I booted >>>> again from the first disk, I found that my root was actually the >>>> desired single-disk RAID set - and not the primary NetBSD >>>> installation. >>>> >>>> During the first resilver, the system froze with a message about an >>>> interrupt from the HPT controller (this may be completely different >>>> matter, I suspect my P/S wasn't very well secured to the m/b, the box >>>> was unstable); I replaced the HPT controller with a Promise PDC20375 >>>> and reinstalled off USB installation disk the system on the first disk >>>> - I could not boot from either at this stage - in order to repeat the >>>> setup to create the RAID. I was surprised to find out that the second >>>> this still contained a previous copy of the system - even after a 'dd >>>> if=/dev/zero of=/dev/rwd5d bs=8k count=1' as per the manual - so I >>>> completed the process at this stage, did an fsck of /dev/rraid0a, >>>> rewrote the boot blocks etc. and tried to boot from that disk again. >>>> This did not work with the same reason - /boot cannot be opened. So I >>>> rebooted again from the first disk - only to find myself with root on >>>> /dev/raid0a using the original pax-ed contents of the first >>>> installation... I then proceeded to clean the first disk, adding it to >>>> the set as a spare and resilvering the set, which completed; I then >>>> rewrote the bootblocks following the manual. After that I was not able >>>> to boot from either of the disks with the same message - /boot not >>>> found, Error (2) - so I decided to do a clean install of everything, >>>> thinking that I've made some mistake. I was pretty surprized to faind >>>> again, that when I booted the installation image from the USB stick, I >>>> found myself on a perfect RAID1 mirrored disk... >>>> >>>> It seems to me that it doesn't matter where GENERIC comes from - when >>>> there is a RAID with Autoconfigure and Root set - it will switch the >>>> root to that. This is fine, but I can't figure out how to avoid using >>>> a USB stick to boot - where and how to install the bootblocks on the >>>> two RAID members - the manual says 'installboot ... /dev/rwd?a >>>> /usr/mdec/bootxx_ffsv2' - on condition that 'file -s /dev/rwd?a' finds >>>> FFS v2, or dumpfs -s /dev/rwd?a finds the same - in my case I get: >>>> >>>> uksup1# disklabel wd4 >>>> # /dev/rwd4d: >>>> type: ESDI >>>> disk: ST3120827AS >>>> label: fictitious >>>> flags: >>>> bytes/sector: 512 >>>> sectors/track: 63 >>>> tracks/cylinder: 16 >>>> sectors/cylinder: 1008 >>>> cylinders: 232581 >>>> total sectors: 234441648 >>>> rpm: 3600 >>>> interleave: 1 >>>> trackskew: 0 >>>> cylinderskew: 0 >>>> headswitch: 0 # microseconds >>>> track-to-track seek: 0 # microseconds >>>> drivedata: 0 >>>> >>>> 5 partitions: >>>> # size offset fstype [fsize bsize cpg/sgs] >>>> a: 234441585 63 RAID # (Cyl. 0*- >>>> 232580) >>>> c: 234441585 63 unused 0 0 # (Cyl. 0*- >>>> 232580) >>>> d: 234441648 0 unused 0 0 # (Cyl. 0 - >>>> 232580) >>>> >>>> uksup1# file -s /dev/rwd4a >>>> /dev/rwd4a: x86 boot sector >>>> >>>> (dumpfs skips). >>>> >>>> On the raid disk I get: >>>> >>>> uksup1# disklabel raid0 >>>> # /dev/rraid0d: >>>> type: RAID >>>> disk: raid >>>> label: fictitious >>>> flags: >>>> bytes/sector: 512 >>>> sectors/track: 128 >>>> tracks/cylinder: 8 >>>> sectors/cylinder: 1024 >>>> cylinders: 228946 >>>> total sectors: 234441472 >>>> rpm: 3600 >>>> interleave: 1 >>>> trackskew: 0 >>>> cylinderskew: 0 >>>> headswitch: 0 # microseconds >>>> track-to-track seek: 0 # microseconds >>>> drivedata: 0 >>>> >>>> 4 partitions: >>>> # size offset fstype [fsize bsize cpg/sgs] >>>> a: 213961472 0 4.2BSD 0 0 0 # (Cyl. 0 - >>>> 208946*) >>>> b: 20480000 213961472 swap # (Cyl. 208946*- >>>> 228946*) >>>> d: 234441472 0 unused 0 0 # (Cyl. 0 - >>>> 228946*) >>>> >>>> --- >>>> >>>> The question to -current users is - are there any recent changes in >>>> the RAIDframe and the system in general which lead to a different >>>> setup for a mirrored root? Or perhaps there is some other means of >>>> doing it altogether... Otherwise this query should have been directed >>>> at netbsd-users. >>>> >>>> Cheers, >>>> >>>> Chavdar Ivanov >>>> >>>> -- >>>> ---- >>>> >>>> !DSPAM:5220c29851291048618482! >>>> >>>> >>> >>> ------------------------------------------------------------------------- >>> | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | >>> | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | >>> | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net | >>> | Kernel Developer | | pgoyette at netbsd.org | >>> ------------------------------------------------------------------------- -- ----
