Guidance on how to best assemble new root drive?
am 01.01.2011 20:47:05 von Mark Knecht
Hi,
First off - everything is working. I'm just looking for guidance on
the best way to assemble a RAID that was created in a previous
installation. Note that this is a home server, not a commercial
machine, so my needs are likely very simple compared to others.
My home server is named 'c2stable'. It currently uses a RAID1 that
is SuperBlock Ver. 0.9. I wanted to convert the machine to a 5-drive
SuperBlock Ver. 1.2 RAID6 which I have already created while running
c2stable. mdadm --detailssays the name is c2stable:3 . This drive
mounts as /dev/md3 and uses /dev/sd{a,b,c,d,e}3 .
I installed Gentoo on /dev/md3 inside of a chroot, set that
machine's name to 'c2RAID6', created a kernel to boot and made an
initramfs file following the Gentoo docs. (Such as they were. Quite
sketchy for RAID and my also first initramfs.) I set the thing up to
boot and promptly got stuck because mdadm wouldn't assemble /dev/md3
for me.
Using busybox and a bit of playing around I found I could assemble
md3 by hand using:
mdadm --assemble --name=c2stable:3 /dev/md3
I put that in my init file and the machine booted first time. Hooray!
I'm now wondering if this is really the best way to do this
assembly. It would seem that my c2RAID6 file system will then always
carry the old c2stable name which is a bit strange. (To me...)
Is there a way to rename the array in the SuperBlock? Should I
bother? I may go back and forth between these two Gentoo installations
for a while and want the RAID to be available in both, at least until
I delete the old RAID1 system to recapture the disk space.
Any and all guidance welcomed.
Cheers,
Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Guidance on how to best assemble new root drive?
am 01.01.2011 21:27:40 von John Robinson
On 01/01/2011 19:47, Mark Knecht wrote:
[...]
> Is there a way to rename the array in the SuperBlock?
mdadm --update=homehost
mdadm --update=name
> Should I bother? I may go back and forth between these two Gentoo
> installations for a while and want the RAID to be available in both,
> at least until I delete the old RAID1 system to recapture the disk
> space.
I wouldn't have changed hostname, but if your new root is on the RAID-6
yes I'd change its homehost to suit its hostname. You will then have to
tell the old RAID-1 to start the array using the new homehost.
Cheers,
John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Guidance on how to best assemble new root drive?
am 02.01.2011 02:24:01 von Mark Knecht
On Sat, Jan 1, 2011 at 12:27 PM, John Robinson
wrote:
> On 01/01/2011 19:47, Mark Knecht wrote:
> [...]
>>
>> Is there a way to rename the array in the SuperBlock?
>
> mdadm --update=homehost
> mdadm --update=name
>
>> Should I bother? I may go back and forth between these two Gentoo
>> installations for a while and want the RAID to be available in both,
>> at least until I delete the old RAID1 system to recapture the disk
>> space.
>
> I wouldn't have changed hostname, but if your new root is on the RAID-6 yes
> I'd change its homehost to suit its hostname. You will then have to tell the
> old RAID-1 to start the array using the new homehost.
>
> Cheers,
>
> John.
Hey John,
Thanks for the response and the commands above. Makes sense.
There really isn't any reason I had to change the name. I just did
it so I'd be clear which environment I was working in if one was in a
chroot. I could easily change it to c2stable.
However that name is a Gentoo machine name that doesn't get set (I
think) until much later in a real boot. At the point where the kernel
is trying to find the devices and assembling the RAID6 I don't think
it knows anything about the machine name does it? This is really early
on in the boot process. It has to read the RAID6 to figure out what
the machine name will eventually be...
I suspect that the other way I could tell mdadm to assemble is
based on the explicit disk name and partition number. However I
thought mdadm was going to search all the Super Blocks and figure that
out as these are bright & shiny 1.2 Super Blocks. Guess I was wrong
about that. Rereading the man page I suspect this feature is to
protect from assembling partitions that below to some other machine or
something. I don't understand how they get used in a PC at boot time,
but PCs are a small part of what mdadm supports.
I do appreciate the response.
Cheers,
Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html