Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Intel fake RAID1 headache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
leo.the_zoo
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Thu Jul 31, 2014 9:30 pm    Post subject: Intel fake RAID1 headache Reply with quote

Dear all,

I've been struggling with Gentoo installation on a new workstation that has a fake Intel raid1 pre-configured. There are several RAID how-tos out there but they 1) are quite old, 2) concern normal software RAID, 3) use Grub legacy. I managed to reach the end of installation but apparently it was not done well. First of all, I try to load inexistent grub2 module 'raid'. Then initramfs starts and shows quite a few errors that might be an effect of the previous error. I managed to catch something concerning gpt label and correcting it with parted.

Right now the machine is offline so I cannot give you much information on it. I could only outline that I configured kernel manually but built initramfs with genkernel, added "domdadm" to kernel command line and 'insmod raid' and 'insmod mdraid1x' to every grub.cfg entry.
/etc/fstab is rather short:
Code:

/dev/md126p2            /boot           ext4            noauto,noatime  0 2
/dev/md126p3            /               ext4            noatime         0 1
/dev/md126p4            /home           ext4            noatime         0 2

# NOTE: The next line is critical for boot!
proc                    /proc           proc            defaults        0 0

/dev/md126p1 is the small 2MB partition for Grub2 core.img.

Could someone please outline the key steps (using current software versions, i.e. Grub2) I should follow in order to successfully install Gentoo on my fake Intel Raid1?
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Fri Aug 01, 2014 3:01 am    Post subject: Don't do it Reply with quote

Seriously,

Fakeraids are more trouble than they are worth because:

    They are not portable
    They rely on the CPU anyway
    They make things opaque to disk management


If your mobo dies, your raid array is effectively back to being a collection of drives that need reformatting. Even switching to a mobo with a replacement fakeraid of the same flavor will be a crapshoot. They really don't do much for increased performance because they rely on the cpu for a lot of stuff still. Also you probably won't be able to get smart info on the underlying drives and will be at the mercy of the bios for detecting bad drives and replacing/rebuilding the raid.

Either go with a serious dedicated raid controller if you need performance and more than 4-6 ports or go full software raid so that you can take that drive set out and run it somewhere else with little to no headache. I used to use mdadm based software raids, but now I'm pretty much set on letting btrfs do everything. In either case, I still have access to the individual /dev/sd.... devices so that smartctl can keep an eye on things.
Back to top
View user's profile Send private message
leo.the_zoo
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Fri Aug 01, 2014 2:54 pm    Post subject: Reply with quote

I read a bit more about this kind of raid and it looks like you're right.
I'll go for the usual software raid then. And have a talk with our technician here once he's back from holidays.

Thank you!
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Fri Aug 01, 2014 5:32 pm    Post subject: Is your tech Windows oriented? Reply with quote

I suspect the only reason why pseudoraids/fakeraids/scaryraids existed in the first place was because Windows had no suitable way of doing software raid. I'm not even sure if the current server versions now even have such support. The mobo manufacturers thus looked for a way to compete by undercutting hardware raid prices.

Also in earlier days (before Pentium IV), the x86 instruction set lacked the SSE family of instructions that are used extensively in the checksum calculations. Those older CPUs only had a core or two to work with so it didn't make sense to dedicate even one to raid calcs. Nowadays you have at least 4 cores that can do at least SSE2, so you won't even notice one core doing much handling raid i/o. The only real advantage of a dedicated raid controller now is the larger number of SAS and SATA ports that they give you.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Fri Aug 01, 2014 6:04 pm    Post subject: Reply with quote

Linux should be able to handle fakeraid disks anywhere (it's just another metadata format on disk that needs to be understood by mdadm/dmraid).

But for a Linux box you should still go with regular mdadm. It's just that much easier to handle.

It's also possible to get most hardware raid formats working using software RAID - if you know the structure. If you don't fancy buying a backup HWraid controller, it's worth doing some research about the on disk format beforehand.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Fri Aug 01, 2014 7:37 pm    Post subject: Reply with quote

leo.the_zoo,

Intel fakeraid can be used in two ways. The older dmraid or it can be set to use containers, which mdadm understands.
To help you we need to know which fakeraid you used. Your /dev/md126p2 entries, suggest you used containers and mdadm or your raid would be /dev/mapper/....

It matters that you don't mix tools and methods but both ways work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
leo.the_zoo
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Fri Aug 01, 2014 8:50 pm    Post subject: Reply with quote

Dear NeddySeagoon,

Just as you noticed, I'm using mdadm.
In general, I followed this 3-yo document but tried to use grub2 instead. The result is that grub2 could not find UUID that it picked during installation.

Now I arrived at the crossroads: fake raid or software raid. In any case, I'll need some help.

For the time being, I deleted the fake raid, repartitioned and formatted both disks to find out mdadm finds that /dev/sda1, the 2MB grub boot partition, is smaller that /dev/sdb1 while creating the first array. Could not confirm that with neither cgdisk nor parted. There everything is exactly the same size, MB-wise and cylinder-wise. No idea what's wrong. Tomorrow I'll be back in the lab to try to set it all up again...
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Fri Aug 01, 2014 10:19 pm    Post subject: Reply with quote

You don't mdadm a 2MB grub partition. Rather you'd just install grub on both disks.
Back to top
View user's profile Send private message
leo.the_zoo
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Sat Aug 02, 2014 12:00 am    Post subject: Reply with quote

I'll try it out tomorrow. Thank you.

Question: do I need to build initramfs if my bootloader is grub2 in case of 1) fake raid, 2) software raid?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3136

PostPosted: Sat Aug 02, 2014 9:30 am    Post subject: Reply with quote

You know, "fakeraid" sounds similar to "do not use" for a reason :lol:

Initramfs has nothing to do with where you stuff your bootloader.
Boot sequence goes like this:

BIOS (or some other hw stuff) -> bootloader -> kernel + initramfs(optional) -> real root

So, if you need initramfs to access bootloader, you will never boot, since neither bios nor uefi knows how to handle initramfs.
The purpose of initramfs is to handle weird root devices that are are not supported by kernel directly or need some extra configuration. You can assemble RAID inside it. You can start LVM. You can AUFS-mount readonly root with writable ramdisk/persistent changes device. You can setup crypto-loop. You can also make it order a coffee for you if it's nessesery to get you started. But you can't make it launch bootloader, as it had already been launched and long forgotten by the time we come to initramfs.

Anyway, you can make /boot on DM mirror with metadata 0.9 (not sure about 1.2, but it's not likely to work, even with grub2) and install grub on this. Since metadata 0.9 is located after filesystem and mirror means every enslaved device contains full copy of data, BIOS will not even know it's reading bootloader from software RAID. IT will simply read it and launch it. Grub will not know that either. It will recognize filesystem though, and launch kernel and initramfs. And initramfs is where hardware is being detected, RAID is finaly assembled and pointed to as root, and system init is triggered.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sat Aug 02, 2014 11:44 am    Post subject: Reply with quote

szatox,

device mapper raid is not in use here. Its Intel Storage Matrix or whatever. I have no idea if UEFI can find a bootloader inside a Intel Storage Matrix volume or not.

BIOS certainly cannot. It just ignores any raid, hence the need for a raid1 /boot made with raid metadata version 0.90.
However, with device mapper raid it just works, even with raid0, as the BIOS hides the on disk data structure.
device mapper raid has other drawbacks.

Once the boot loader is loaded there are other challenges. It may or may not understand the raid. BIOS with lilo or grub legacy do not as they make BIOS calls to load the kernel and initrd. I don't use grub2 but it has a raid module. I'm told that it works with kernel software raid. I've not looked into its compatibility with Intel Storage Matrix,
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
leo.the_zoo
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 160
Location: Poland

PostPosted: Sat Aug 02, 2014 12:00 pm    Post subject: Reply with quote

For some reason I don't have raid.mod in my system. I only have:
Code:

$ ls -1 /boot/grub/i386-pc/ | grep raid
mdraid09.mod
mdraid09_be.mod
mdraid1x.mod
raid5rec.mod
raid6rec.mod

Does anybody know why?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum