LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do you do software RAID? (did i do it right?) (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-do-software-raid-did-i-do-it-right-746326/)

mono-factor 08-09-2009 10:37 PM

How do you do software RAID? (did i do it right?)
 
Hi all,

I can do centos install with software RAID fine; apparently I messed up two ubuntu server install with raid.
I’m not sure what i did wrong but, I think I have a clue.

Normally cento doesn’t really give an option for setting your partions as primary or logical. But ubuntu does.

So if you’re doing a debian (or any linux) install do you have to make all partitions logical?

Because when I remember I think i set the / as the only primary partition on disk 0. Whereas the rest were all logical.
Disk 2 had a swap file with the same size of the root partition on disk 0.
I know i did the sizes of the other partition correct.

Basically the request was that he wanted /home and some other random partition to be raid one on both disk.

If anyone have a clue I would very grateful.


(if this doesnt make sense just read the bold letters)

SteveThePirate 08-09-2009 10:43 PM

I am a noob and cannot really offer dynamic advice. I have a sort of basic knowledge on linux as I have just downloaded and installed my first Linux os(ubuntu). I know that you need to create two ore more partitions of the same size( i think they have to be exactly the same size, but not sure). Usually, these have to be on different hard disks. You create the Raid Partition by following the steps and declaring each to be a raid volume. Once you have two or more RAID volumes, the partitioner allows you to combine these volumes into a RAID array that looks and acts like a single partition That is all I can offer.

mono-factor 08-09-2009 10:47 PM

Thanx SteveThePirate,

Yeah that what 1 did that, i was trying to find stuff on the net if all the partition needed to be logical or can a mixture work. Can’t find nothing or it may be too complex for me [T_T]

SteveThePirate 08-09-2009 10:48 PM

same here. I have a long way to go to make this work. But I am getting there. Can you take a look at my post and see if you can fix my problem? I will continue to think about yours.

vishesh 08-09-2009 10:50 PM

I don't think it is about primary or secondary. What you have to do is that create equal partition on both disk, mention it as RAID

mono-factor 08-09-2009 11:10 PM

I did create equal partition on both disks. In total there were four raid partitions.

Let me explain a bit more what I did.

Disk0 Disk1
/ 18GB_________________________ Swap 18GB
Raid (A) 25 GB________________ Raid (B) 25GB_________________
Raid (c) 450 GB_______________ Raid (d) 450 GB
Note, i added the brackets with letter to make it clear.

Raid 1 was set with A and B, both logical.
Raid 1 was set with C and D, both logical.
The root partition was the only primary.

chrism01 08-10-2009 12:39 AM

You might find these useful:
http://en.wikipedia.org/wiki/Disk_partitioning
http://tldp.org/HOWTO/Partition/index.html

If you run

fdisk -l


you'll be able to see exactly what you've got (assuming this is SW raid, which it sounds like).
Superficially that layout sounds ok, but we'll have to see.

Also try

mdadm --detail

http://linux.die.net/man/8/mdadm

SteveThePirate 08-10-2009 12:50 AM

This may seem funny but I want to run fdisk -l for the heck of it and I can't seem to get the window to stay open, I tried putting read in there such as fdisk -l ; read and opening using run in terminal. How do I get it to stay open?

mono-factor 08-10-2009 04:59 PM

I can’t try fdisk anymore since they were reinstalled by someone else.
Steve the Pirate try "| more" without the quotation marks.

Hmmm... I might try to install it again on another server just to check.

On another note, if they were all logical partitions that shouldn’t affect booting up will it, since i presume GRUB will be in like the first sectors of the HDD (or sumin, im pretty stupid i know T_T).

mono-factor 08-16-2009 02:03 AM

Hi,
Apparently the guy who said i messed up the RAID, stated "it was because i ddint set RAID up for the SWAP", I stated "are you an idiot".
But now im wondering is there even a point in setting RAID 1 for the swap?

SteveThePirate 08-17-2009 06:57 AM

There is really no such thing as stupid, we are all learning something new anyways. I am learning about the utilities right now, cp rm mv cat and so on. I have not even gotten to raid yet nor have I ever set raid up.

zhjim 08-17-2009 07:18 AM

Quote:

Originally Posted by mono-factor
On another note, if they were all logical partitions that shouldn’t affect booting up will it, since i presume GRUB will be in like the first sectors of the HDD (or sumin, im pretty stupid i know T_T).

The main diffrence between logical and primary partitions is the numbers you can have. You can only have four primary partitions and up to 64 (of my head) logical partitions on one single disk.
As soon as you want to have logical partitions you have to sacrifice one of the primary partitions. This one will get an new partitiontable stating where all the logical ones reside.
(sounds a bit like a trading card game. To play logical partition you have to sacrifice one primary in place. As soon as logical partition gets into the game you gain 100GB of work space ;) )



Anyways.
Quote:

Originally Posted by mono-factor
since i presume GRUB will be in like the first sectors of the HDD (or sumin, im pretty stupid i know T_T).

It depends but in normal scenarios grub is installed into the master boot record. Just the start of the disk. So nope sorry to disappoint you, you are not stupid :).


I'm not so much into software raids but it sure does not do anything bad if swap is not on the raid. What for and its just another partition isn't it. So as long as you can boot of your / partition you'd be set. Especially with the instruction to have /home on the raid as /home is not really a essential partition.

mono-factor 08-17-2009 10:34 AM

Quote:

Originally Posted by SteveThePirate (Post 3646349)
There is really no such thing as stupid, we are all learning something new anyways. I am learning about the utilities right now, cp rm mv cat and so on. I have not even gotten to raid yet nor have I ever set raid up.

This guy is meant to be a linux god. This is the reason why. configuring RAID for SWAP was not even mentinoed in the request.

chrism01 08-17-2009 06:18 PM

Now that's typical of users, and even tech guys sometimes expect you to read their minds.
Personally, I wouldn't bother raiding swap.
Data disk space is far more valuable usually.
Swap is just a temp space for the kernel to use if it runs out of RAM. I've not come across a raided swap. I suppose if you've got a system that's supposed to be 24 x 7 & 5 '9's (99.999%) uptime requirement you might go that path...


All times are GMT -5. The time now is 07:30 PM.