Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RAID Preparation - Questions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Fri May 20, 2011 8:22 pm    Post subject: RAID Preparation - Questions Reply with quote

Hi everyone

I'm writing to discuss some questions that i have in order to proceed to the configuration that i have in my mind

The above was my initial configuration when i bought a new hardware. The hdd is a 7540GB Seagate Barracuda, I have about 400GB(/boot 30MB, 400GB for / ) for Gentoo, 300GB about windows 7, and 50 GB about WinXp-not a good table but i can't even start to explain it. So i'm thinking of buying one more similar 750Gb hdd in order to create a raid0, maybe shrink windows 7-used for games- with xp that i don't use at all. So i'll have these two operating systems. I'm planning to create an image of the hdd when i'm finished with the changes that i mentioned and then after buying the second create a hardware raid0.
Question:Should i configure kernel raid0 or doing this from BIOS will be ok?Because i guess i would have to configure kernel if i had to use software raid. Will gentoo boot or i must do something more

I would really need some help to understand it before i give it a try, so i have more questions and i hope someone can helpl me

Thanks in advance
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri May 20, 2011 8:57 pm    Post subject: Reply with quote

zoe,

Linux understands four types of raid, they all have their advantages and disadvantages.

    Hardware raid
    Kernel Raid
    Fake Raid
    Windows Dynamic Disks


Hardware raid is provided by a plug in card unless you have a top end server motherboard. The raid card hides the physical structure of the raid from the operating system. They may provide battery backup for data in the cache waiting to be comitted to the array. It works in any operating system you can get a driver for, like any other plug in card. You donate whole drives to the raid set.

Kernel raid is software raid implemented in the kernel. Raid levels above raid 1 need some CPU power to generate the redundant data on writes and to 'decode' the data on reads. For raid 0 and 1, this is minimal as there is nothing to calculate or 'decode'. Its not compatible with windows but when you have a motherboard failure, you can move the drives to any system with the right kernel support and read your data. You can donate partitions or drives to the raid set. Partitions are more usual as you can only boot from raid1 or an unraided /boot.

Fake Raid so named because it looks like hardware raid but isn't, is partly BIOS and partly kernel provided. It needs a third party kernel module called dm-raid. It works in Linux and Windows. The BIOS determines that data layout on the drives, so you need another system with an identical BIOS if you need to move your raid set after a hardware failure.

Windows Dynamic Disks is software raid for windows. Linux can read and write these volumes but booting may be a problem as grub does not understand them.

If you really want raid0 and Windows and Linux on the same raid set, you are stuck with fakeraid. Grub can boot from fakeraid raid0 as the BIOS hides the striping. Root on fakeraid demands the use of an initrd to house dm-raid as you must start the raid set before root can be mounted.

You cannot migrate a single drive install to a raid0 install. You must backup your data, form the raid set, write a filesystem to the raid volume(s) then restore your data.
_________________
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
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Fri May 20, 2011 10:53 pm    Post subject: Reply with quote

I will try to analyze this in the morning cause it's late and i'll post back. I understand that Fakeraid is all i have, i don't quite understand the last sentence. I will have to backup my image as it is right now.Then create the raid from Bios using raid and by ctrl+I using the intel storage to create the array. Then i'll fdisk and configure the partiotions as they where before the format and restore my whole image?
Maybe i'll have to take a look at this http://en.gentoo-wiki.com/wiki/RAID/NVRAID_with_dmraid

Thanks again for the help, i'll study some manuals and i'll post again
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri May 20, 2011 11:06 pm    Post subject: Reply with quote

zoe,

Raid0 has no degraded mode of operation because there is no redundant data.
Raid 1 has 2 or more copies of the data, so you can make a degraded raid1 with only a single drive, the add the last drive later.
You can do the same with the higher raid levels. They are all supposed to work with one missing drive.

With raid0 you cannot do this. If you want to buy one drive to add to your existing drive to make a raid0 set, the data on your existing drive will be lost in the process.

The wiki link is very close to what you need to do. Thee are some differences because you have an intel chipset but they are minor.
_________________
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
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Sat May 21, 2011 9:28 am    Post subject: Reply with quote

NeddySeagoon,

I know that the data will be erased with raid0 process. My question is if the image that i'll have in another physical backup disk (for example /dev/sdb1) will be useful. I guess with raid0 the system has for example two disks, in my case one 750gb and one more that i want to buy for the raid0 creation, and with stripping mode it just strips data to both of them. So the image that i will restore after raid0 will have a chance to work?
And also as you said at you first post Software Raid and Fake Raid are different cases. Will this link help me to what i want to do http://www.geisterstunde.org/wordpress/?p=87 ? Probably not cause it's software Raid i guess.
Found this post https://forums.gentoo.org/viewtopic-t-716503-start-0.html which is exactly the same thing with what i want to do but i didn't see earlier, the fellow gentooer didn't find a solution i think
Thanks for the patience.

EDIT:Also this guide http://en.gentoo-wiki.com/wiki/RAID/Onboard is labeled as RAID/ONBOARD and was made for Windows XP and Gentoo dual boot and it's also quite helpful for what i want to do if i bypass the section about installing Windows and Gentoo as i will already have an image to a safe storage media :-). I'm quite confused
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 21, 2011 12:09 pm    Post subject: Reply with quote

zoe,

It depends what you mean by "image". If you mean a dd image, that will not work as ddm make a bit for bit copy of the underlying drive.
If you mean a tarball of the filesystem on your single drive, that will work as you will restore it to the filesystem on your raid0.
The kernel will hide the underlying physical structure of the raid0.

It will be like installing a custom stage3, when you first installed gentoo. Indeed, you use the same command but point it to the tarball you bade earlier.
This backup and restore of a whole system is known as a stage4 and is well documented. You willhave to edit /etc/fstab to point to your raid, install grub to the MBR on the raid, fix grub.conf to point to your initrd and raid and make an initrd containing dm-raid as a part of the migration process.

Avoid the use of genkernel to build your initrd. It might work *but* genkernel builds the initrd from a script which includes package versions, so from a boot CD, it may all work but from your own initrd, it may not because the initrd will contain different versions of packages to your main system.
There are several articles on gentoo-wiki.com about creating a suitable initrd. Most use genkernel and the one I found that does not is well out of date.

This initrd description is good and easy to follow. You will need to adapt it to drop things you don't need and add in dm-raid. Be aware that dm-raid builds against the kernel, so you will have to make a new initrd for every kernel update.

A few hints: dm-raid uses device-mapper, just as LVM does. LVM is all userspace. dm-raid provides a kernel module, so that module needs to go into the initrd. As you have a kernel module, you need a method to load it. You can use either modprobe or insmod. Insmod simple and stupid. It does what its told. modprobe is much more complex as it expects to find a table of module interdependences, so it can load all the modules that your selected one depends on.
I would choose insmod for an initrd as its provided by busybox. There are no libraries nor dynamic linker in the initrd, so all the software must be build statically linked.
_________________
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
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Sun May 22, 2011 8:04 am    Post subject: Reply with quote

Hi again

By image i meant a cloneimage so according to your previous post it's not gonna work . Thanks for the info about stage4 backup, i'm already running the script for some testing
Thanks for all the help and information, i'll keep the post as a reference and use it when i start the raid configuration

If i have more questions i'll post back

Thanks again
Back to top
View user's profile Send private message
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Mon May 23, 2011 7:14 am    Post subject: Reply with quote

Hello again

Back with some questions

As wondering around and reading in order to be 100% sure, i'm quite convinced that raid isn't a good idea. And what i mean by that,

raid0=twice the chance of losing if one of the 2 disks fails
raid1=half the capacity

It seems that the best is raid5 or raid10 but i can't afford that so i'm not sure what to do. I already have a 750GB(dual boot with Gentoo/Windows 7) and 1TB hard disk for data and don't know what could i do to correctly use the space.
I was thinking to forget raid for now, create a stage4 backup as you suggested, also get an image from the windows partition and just re-partition my table with a better scheme. Maybe create an LVM storage management with reiserfs for /home in order to solve the problem of storage. I don'w really know i still trying to see what's the best route
I could really need some suggestions and opinions

Thanks in advance
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Mon May 23, 2011 9:10 am    Post subject: Reply with quote

zoe wrote:
raid0=twice the chance of losing if one of the 2 disks fails
raid1=half the capacity

It seems that the best is raid5 or raid10 but i can't afford that so i'm not sure what to do.


Well, raid10 also means half the capacity. raid5 is also more costly and thus sometimes slower than raid1 (parity calculations).

You could argue that the best raid is raid6 because it allows you to lose any 2, and not just 1 disk. Downside is even more parity calcs. :)

Quote:
I could really need some suggestions and opinions


Backups first, RAID later. If your data is important, anyway. If it's not, you need neither.

I have an internal backup disk (fully automated, daily incremental backups), an external backup disk (mirrors data from the internal backup), and a NAS (yet another mirror).

The NAS has 4 disks, running in RAID 5. Sure you lose capacity when using RAID, but on the other hand, you gain redundancy. So if one disk fails you have a good chance that you can just pop another disk in without actually losing anything. Not a replacement for backups, but a huge gain in comfort.

I also use RAID 1 in a server, because I want it to keep running when a disk fails. The server also has 100GB of external backup storage on site, which I also rsync to my machine at home (backups you don't have at home, you might not be able to access them when you need them).

I also started using RAID 1 in my desktop recently. For no reason in particular, really; it's just that my Windows disk died (used for games only), it was over 5 years old and as such out of warranty; I don't need much space for Windows but I didn't have any room for it on my other disks, so I had to get a replacement. And getting a replacement meant 2TB, because there's no point spending 30€ on a 250GB disk, when for 60€ you already get 2TB. And because I don't actually need 2TB for Windows, I use the remaining capacity for RAID 1 with my Linux disk now. So this wasn't something I planned, it just happened. ;)
Back to top
View user's profile Send private message
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Mon May 23, 2011 10:41 am    Post subject: Reply with quote

Thanks for the time

Quote:

Well, raid10 also means half the capacity

Correct, i forgot to say that you also get half the capacity, raid5 is better cause it's 2:1 ratio.Anyway all arrays have the plus and minus let's say, so i'm not gonna argue which is the best. After all is what you need it to do and then you decide.

Quote:

If your data is important, anyway. If it's not, you need neither.


It's important and even if it wasn't i would never stop keeping backups. I'm a safety person :D . But i have this idea that the raid hype it's kind of overestimated when it comes to desktop machines so i started the post to read some opinions .I use rsnapshot(daily, weekly, monthly) and i'm totally satisfied, i aslo rsync the backups and learned from here the stage4 backup. So i'm quite convinced that for my machine raid is a lot of work for nothing. Cause i have to use fakeraid as stated by NeddySeagoon if i want to keep my dual boot(also Windows 7 for game only). Probably i'll go with stage4 and then format my 750GB and re-partition it again with a better scheme.

Quote:

And getting a replacement meant 2TB, because there's no point spending 30€ on a 250GB disk, when for 60€ you already get 2TB. And because I don't actually need 2TB for Windows, I use the remaining capacity for RAID 1 with my Linux disk now. So this wasn't something I planned, it just happened. ;)


I hear you and i'm totally on board, after all when it comes to storage, nothing is enough. But explain to me what you mean i use it for Windows and the remaining for RAID1. You mean you gave for example a 200GB parition to Windows from and the remaining partition used with another logical drive partition to RAID1? Is it possible to RAID partition sda1 with sdb1 for example .Sorry for all the questions but never got into raid in depth
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon May 23, 2011 6:28 pm    Post subject: Reply with quote

zoe,

With fake raid, you donate whole hard drives to the raid set.

With kernel raid, you can donate partitions or whole drives to raid sets. Thus if you have two unequal sized drives, you can still use raid0 and raid1 and have a bit left over for windows. Because you normally use partitions for kernel raid, you can mix raid levels on the same set of of drives.

The down side is that Windows cannot access your raid.

The long dead raid-tools utility, (now replaced by mdadm) would even let you donate three partitions on the same drive to a raid5 set. That was of no practical value of course.
_________________
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
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Thu May 26, 2011 7:54 pm    Post subject: Reply with quote

Now i understand it. So i have to choose what is the best way to go.

Thanks everyone for all the info and time
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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