Subject: Re: Renumbering a RAID device with raidframe autoconfig
To: Alan Barrett <firstname.lastname@example.org>
From: Greg Oster <email@example.com>
Date: 01/19/2002 10:06:25
Alan Barrett writes:
> I have a RAID set that autoconfigures as raid4, and my root partition
> is raid4a. I want to renumber it to raid0 insetad of raid4. I could
> use a hex editor on the raw disk, but I would prefer a less dangerous
> I tried the obvious, like:
> # boot to a non-raid root partition.
> # autoconfig finds and confuigures raid4.
> # mark raid4 as not autoconfigurable, and unconfigure it now
> raidctl -A no raid4
> raidctl -u raid4
> # configure a raid0 device, using a config file that
> # refers to the same underlying devices that were used
> # for the unwanted raid4 device.
> raidctl -c /etc/raid0.conf raid0
> # mark raid0 as autoconfigurable and a root candidate
> raidctl -A root raid0
> # see if it worked
> raidctl -s raid0 | grep "Last"
> but after all that "raidctl -s raid0" still reports "Last configured as:
> raid4", and on the next boot the device is again configured as raid4.
This *almost* looks like a bug, since it looks like the "Last configured as"
field in the component labels is being updated properly.
However: what's really happening is that the 'raidctl -s' is reading the
component labels from the old RAID set, and those component labels need to be
updated to reflect the newly configured RAID set. (Had you changed,
for example, the size of the components, you'd still see the numBlocks
field the same as before!)
What you want/need to do is just a:
raidctl -I 12345 raid0
(replace "12345" with your own serial number) and then the component labels
will have the correct values, including the "Last configured as" field.