NetBSD-Users archive

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

Re: RAID and GPT



gdt%ir.bbn.com@localhost (Greg Troxel) writes:

>I am wondering about:
>  - a pair of identical 4T disks
>  - GPT, with each having a single partition starting at 64, type 'raid'
>  - a RAID1 of what will be configured as /dev/dk0 and /dev/dk1, marked
>    as -A root
>  - within raid0, gpt label, and partitions
>       index 1   start=64 size=8G root
>       index 2   size=64G /usr
>       index 3   size=rest /home
>    or something like that.

>Specifically, I wonder if the raid autoconf will find a ffs root only at
>0 offset, because it doesn't parse the label, or if it recurses.


RAID autoconf will tell the kernel to use partition 'a' of
the RAID device as root, assuming you configured with -A forceroot
(-A softroot won't work if you didn't boot from the raid).

If that partition 'a' corresponds to a wedge (same device, offset, size),
that wedge will be automatically used instead, the underlying
device would fail with EBUSY.

But you don't have a disklabel on the raid device, so the default
(faked) disklabel will be checked which puts partition 'a' at
offset 0 and spans the whole disk (clamped to 2TB with netbsd-7).
There won't be any corresponding wedge, and the attempt to use
partition 'a' will fail.


One option is to put multiple RAID sets on the disks and use one
small enough for a disklabel for the root partition. Using
multiple RAID sets has the advantage that recovering can be
faster, but you need to be careful to avoid parallel fsck runs.



>Will the inner GPT partitions just show up (as dk2/3/4?)?  Can I
>configure a kernel with root on /dev/dk2 (but that seems non-robust if
>half of my raidset is missing)?

You can build a kernel to boot from a wedge by name with some
hacking since config(8) doesn't parse such a configuration yet.

You could also try to use multiboot and tell the kernel to use a named
wedge as root device. My last experience with multiboot (with our
bootloader) wasn't successful, but grub could work.



>And I wonder how much of this works on netbsd5 or netbsd6, vs 7/current.

netbsd-5/-6 have further issues with disks > 2TB.


>Alternatively, if I have 2 x 4T disks, and wants to run NetBSD in
>something functionally similar to the above, what should I do?

Here are some of my experiences with using large disks:

http://wiki.netbsd.org/users/mlelstv/using-large-disks/

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index