# Question about RAID technology

## Fulgurance

Hello, I have a small question because in few days, I will buy a new laptop with RAID technology. Because it's hardware RAID, when I will install Gentoo, need I to enable specific options in the kernel, or the laptop do the work ? Is it a bit different when I will install my system or the 2 disks will be recognize like one only disk ?

One other question, I will buy this laptop:

https://www.dell.com/fr-fr/shop/gaming-and-games/alienware-area-51m-r2-gaming-laptop/spd/alienware-area51m-r2-laptop/n00aw51mr206?configurationid=1de18284-3e46-4563-98f6-ae2b6501754b

I think I will don't have any problem with the hardware, because this laptop is already selling from a moment. And the thing good, I know this laptop don't have Optimus   :Cool:  .But I just want to be sure about one thing: the Linux kernel work with this wifi : Killer™ Wi-Fi6 AX1650W 802.11ax 2x2 ?

----------

## Zucca

Please see this topic. ;)

I doubt that laptop really has real hardware raid.

If you have enabled the raid from UEFI/BIOS setup your OS probably sees only one disk.

I'd let Linux mdraid (or lvm, or btrfs, zfs or what have you...) handle the raid. It's best that your OS knows the existence of each disk. But that's just me. :)

There is quite a lot of information in that topic.

----------

## Fulgurance

Thanks you for your reply ! And about the wifi adaptator ?

I think it's this driver: https://wiki.gentoo.org/wiki/Iwlwifi

----------

## Zucca

A quick search told me that your WiFi adapter should work on Linux. Some sources suggest that at least Linux 5.2.2 is needed, so you should be safe. ;) Just make sure you have installed the firmware for it and compiled support for it in to the kernel or as a module.

You may want to glance trough this too: https://linustechtips.com/topic/1084144-alienware-area-51m-linux-experience-removeswitch-off-nvidia-gpu/

----------

## Fulgurance

Thanks you so much  :Smile: 

----------

## Fulgurance

I asked the alienware support, and yes, it's software RAID.

I ask again to be sure, but if I install like normal installation, the RAID isn't enable, I need to enable in the kernel no ? Even the website specify the laptop have RAID? It's just a mention of capability. I need to setup that ?

----------

## NeddySeagoon

Fulgurance,

There are two broad types of software raid. One is 'fakeraid' where the BIOS make it look like you have real hardware raid but its software raid in the BIOS.

The data layout on the drives varies from imlementation to implementation and sometimes, even between BIOS versions.

Do no expect to move the devices to another laptop and recover your data. 

There is kernel raid, as used by lvm and mdadm. That's well understood, maintained, open and portable.

Moving a raid set from one place to another just works.

For raid0 or raid1 or raid 10, there is no parity information to calculate, so hardware raid is pretty much wasted unless you have battery backed buffering,

Redundency, if any, is provided by storing multiple copies of the same data.

For raid 4,5 or 6. which all require three or more drives, there is some CPU work in calculating parity. In the case of raid6, two lots of parity.

The only excuse for using 'fakeraid' is that Linux and Windows must share the raid set.

----------

## Fulgurance

Okay, I see.

But I don't need to move a raid set from one place, and I don't need to be sure about my files integrities. The only thing I worry is the performance. I want to optimize for performance (I save every thing in 2 USB). I think as minimum, it's better to use RAID1 than RAID 0 no ? If I use RAID 0 and one disk is dead, I loose every thing

What is the fastest RAID, with the BIOS or linux kernel ? It's my final true question.

But I think definitely it's better, because I just seen now the RAID with BIOS is horrible to use with Linux

I read as well with RAID, you lost 50% of your total initial disk space

----------

## Fulgurance

Pff finally I think it’s better to don’t use RAID 0. I don’t want to install again gentoo every time because one data is corrupted .

Do you think it’s interesting to have 4 hard disks ? Because now I will work with this laptop, even I will save one USB, it’s possible sometimes I will keep a little time my data in this laptop. And probably it’s better to have RAID, to keep my data and increase as well the speed. What do you think ?

----------

## Zucca

You could use lvm and make logical volumes. RAID0 for temp space RAID1 for almost everything else.

If you have NVMe drives on that laptop, then I think RAID0 is useless. It'll most probably saturate the PCI lane. I might be wrong. Anyway NVMe will be fast enough for almost every task on a laptop.

If you really need speed then the safest bet is to use RAID0 only on directories where it's neccesary.

----------

## NeddySeagoon

Fulgurance,

I use raid5 for long term storage. I have had a few drives fail over the years so I'm glad I did.

Except once when two drives in the raid set failed 15 minutes apart. I needed raid6 then.

Raid0 is the fastest, in theory. Its true with conventional HDD where the bottleneck is the head/platter data rate.

With nvme, the bottleneck has moved but I don't know where to.

Writes have taken almost zero time sine DMA became a thing. Its set up the DMA transfer and the CPU is done.

The data is pushed to the HDD cache (on the HDD) and as far as to operating system is concerned, the write is complete.

Reads have to wait for the data. By eliminating seek times and the head/platter limitation, everything has got a lot faster.

I'm not sure if raid0 will make it faster still. It depends where the bottleneck has moved to. 

My nvme is claimed to provide read speeds up to 7,000 MB/s. That's about 70x faster than a conventional 7200RPM HDD sustained transfer rate. 

5,400 RPM laptop drives are slower still.

The question becomes, is the nvme speed fast enough to not matter?

That's fast enough. :)

----------

## Fulgurance

Hey I'm just thinking about one question ! 

If I use LVM and LUKS (because I always encryt my system), is it possible at boot to have only one password for all of my installation with quad drive ? (four disks)

Normally I make first an encrypted volume and after I use LVM. But with 4 disks, maybe I need to make LVM volume first ?

Normally with use only RAID or LVM, or we can use RAID and LVM together ?

Is it possible to use all of full drive as RAID partition (ex: not use sda1 or sda2, but full sda device ) ?

Can I use 4 disks, and use a small part of one for the boot ? Or all disks have the same boot and efi partition ?

Normally I need to do normally one installation on disk, and after the RAID copy everything ?

Is it long to synchronize every disk ? (for RAID 10 for example)Last edited by Fulgurance on Wed Sep 15, 2021 4:27 pm; edited 1 time in total

----------

## NeddySeagoon

Fulgurance,

There is no simple answer. Lets describe how the logical layers build up.

The lowest level is the simple block device. The whole drive if you like.

The next layer up are the partitions on the simple block device.

The way Linux works is that they are also block devices.

You ran donate your block devices, whole drives or partitions or any random to raid sets.

A raid set is also a block device, so far with have devices like /dev/sda, /dev/sda1 and /dev/md127.

Further, all of the above devices can be described as physical volumes to LVM and donated to a Volume Group.

Now it gets complicated.

Logical Volume manager can use the kernel raid code to implement raid inside logical volumes, without the use of mdadm.

So far the shore answer to most of your questions is yes.

EFI BIOS's expect to find the VFAT filesystem as the start of the VFAT partition, so your boot volume must be partitioned.

If you make the boot  VFAT filesystem inside a raid set, by default, the raid metadata will be at the start of the VFAT partition, so the BIOS will not find the filesystem

It can work if the raid set is made with version 0.90 metadata as that puts the metadata at the end.

The BIOS will just ignore the raid, so only raid1 can work that way.

LUKS is normally added at the Volume Group level, so the underlying structure of the volume group is invisible to LUKS.

That is, you unlock a whole volume group, not individual block devices.

----------

## Fulgurance

Finally i'm not sure I will use RAID, I feel it's not sure I will have performance, and I will lost a lot of time to setup and synchronise as well

----------

## NeddySeagoon

Fulgurance,

RAID syncing is a background task. You can use the RAID while it syncs.

----------

## Fulgurance

Oh okay. And do you think it's enough with 2 disks, or maybe it's more interesting with 4 ? Because with RAID 10, I can use optimisation and safe data as well

Honestly I really want to try a new technology   :Smile: 

----------

## wjb

My thoughts:

No one needs RAID. Everyone needs backups.

----------

## Zucca

 *wjb wrote:*   

> My thoughts:
> 
> No one needs RAID. Everyone needs backups.

 RAID can make life easier because hardware doesn't last forever. Just replace a broken drive and sync. Done. All that can be done while the system still runs.

Backups in the other hand save you from human mistakes and can also save from data corruption.

It's not that back and white. ;) But you're definitely right on your second point. People may say that they don't have anything important on their computer, but when the disaster strikes, there suddenly is something worth backupping... Even if it's a small thing like bookmarks, it's still something.

----------

## NeddySeagoon

Fulgurance,

RAID is not a backup. There are other ways to lose data without a hardware failure. See my signature.

----------

## pietinger

 *wjb wrote:*   

> My thoughts:
> 
> No one needs RAID. Everyone needs backups.

 

This is wrong. RAID is an (very) old technology for high availability systems, like servers or a mainframe. Yes, big companies need it and use it. Maybe private people having a server want it also. But it is NOT an alternative for backups, you MUST backup your data also.

Usually a desktop or a notebook doesnt need it really, but if people want to loose their data, just take a look into a neighbour thread ... When People thinking: I am a so clever guy and found an alternative for doing backups ... sometimes comes a bad wakeup call.

----------

## Zucca

Meanwhile a disaster has happened.

This is exactly why I have two backups in addition to my RAID6 setup for my photos.

----------

## Fulgurance

Omg   :Surprised: 

NeddySeagoon, it's the reason year ago when I read your banner I bought 2 USB to save every time my data. Your advice is very important definitly.

I agree, RAID isn't a backup, true, but this can avoid some lost data I think. It's not a solution sure. (tell me if i'm wrong)

The only thing know I need to understand properly, is how I will install that on my new computer when I will order and receive it.

For exemple, guess I have this four disks:

nvme0n1

nvme0n2

nvme0n3

nvme0n4

I think I need first to make all of my partition like this ?

nvme0n1:

p1: /boot

p2: /boot/efi

p3: swap

p4: /

nvme0n2:

p1: same partition as /boot

p2: same partition as /boot/efi

p3: same partition as swap

p4: same partition as /

nvme0n1p3:

p1: same partition as /boot

p2: same partition as /boot/efi

p3: same partition as swap

p4: same partition as /

nvme0n1p4:

p1: same partition as /boot

p2: same partition as /boot/efi

p3: same partition as swap

p4: same partition as /

nvme0n1p1+nvme0n1p2 = RAID1

nvme0n1p3+nvme0n1p4 = RAID0

I guess I'm correct like this ? I think just for the root, I need to make as raid partition no ?

----------

## Zucca

The site seems to state that there's two NVMe drives.

If you want to put your ESP on a raid you must use RAID1 and metadata version less than 1.00.

This is because newer metadata format places metadata before the filesystem, while the metadata of earlier versions places it after.

When you boot your computer UEFI then sees two ESPs (RAID1 with two disks). It then reads and runs your boot manager from one of them. So it doesn't actually even know it's a RAID1. Later in the boot process your kernel will assemble your raid stacks.

Any other raid level then RAID1 for ESP is impossible. (Unless the UEFI implementation manufacturer or your computer is really linux friendly and can recognize Linux raid stacks. I've never heard of such.)

----------

## Fulgurance

How you mean you have physically 4 disks, but they are recognized as 2 disks ?  :Shocked: 

Finally with what you said, it's useless for me to have more than 2 disks ...

And one question. I don't know if somebody know. I know the area51m don't have optimus because you have the same components as normal computer. But the 17m R3, do you think there is optimus ? Because I prefer to avoid that. But as well, I would like a 4K screen :C

----------

## Zucca

 *Fulgurance wrote:*   

> How you mean you have physically 4 disks, but they are recognized as 2 disks ? 

 I meant that the site you linked in your first post seem to indicate, that the laptop has slots for two NVMe drives. Not four.

 *Fulgurance wrote:*   

> And one question. I don't know if somebody know. I know the area51m don't have optimus because you have the same components as normal computer. But the 17m R3, do you think there is optimus ? Because I prefer to avoid that. But as well, I would like a 4K screen :C

 I think Optimus is deprecated technology. No longer used on modern laptops.

Optimus really was a digital switch. It switched which GPU was connected to the display... As far as I know, that is.

Nowdays the more powerful GPU sends the display signal to the lower-end GPU, which then simply forwards it to the actual display.

----------

## Fulgurance

Okay for optimus. You think now I can just install the nvidia drivers, and that it ? No more tricks ?

I'm talking about this laptop: https://www.dell.com/fr-fr/shop/gaming-and-games/alienware-area-51m-r2-gaming-laptop/spd/alienware-area51m-r2-laptop/n00aw51mr206?configurationid=339bba44-20bf-4eb6-b3af-424bb2146cc6

----------

## Zucca

I read the optimus article from wikipedia, and there wasn't any notes of it being deprecated.

And since I haven't used any nVidia GPUs since my last 32-bit laptop purchase, I cannot give you a definitive answer. That said, I do work with new laptops from time to time at my work. All Windows ones. Most of them (dual GPU ones) seem to work without optimus.

Your best bet is to ask Dell.

----------

