collapse collapse

* Who's Online

  • Dot Guests: 57
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Board Stats

  • stats Total Members: 88
  • stats Total Posts: 11163
  • stats Total Topics: 1699
  • stats Total Categories: 4
  • stats Total Boards: 76
  • stats Most Online: 248

Author Topic: Linux RAID Intro  (Read 9729 times)

0 Members and 1 Guest are viewing this topic.

Offline Nathan

  • Administrator
  • Hero Member
  • *
  • Posts: 1437
  • Reputation 1768
  • Gender: Male
  • woof woof
    • View Profile
Linux RAID Intro
« on: December 19, 2009, 10:58:14 PM »
(Don't know where this should go)

First off -
You should wipe the file system info on the drive(s) you want to use in the RAID. This is becuase you are going to format the RAID not the drive.
Please do consider you can RAID partitions or whole disks. It is advised to RAID the whole disk.

Code: Bash
  1. # dd if=/dev/zero bs=1M count=1 of=/dev/sdL#
Where L = letter and # = number

Now lets create the array
Code: Bash
  1. # mdadm --create --verbose /dev/md0 --level=# --raid-devices=# /dev/sdL#
This tells mdadm what drives you want to be in the array, and what RAID level you are going to use.

Once the RAID is created -

To get some detail on the RAID
Code: Bash
  1. # mdadm --detail /dev/md0
Or
Code: Bash
  1. # cat /proc/mdstat

Now you need to actually format the RAID.
Code: Bash
  1. # mkfs.ext3 /dev/md0

To remove a drive from an array (because it failed)
Code: Bash
  1. # mdadm --manage --set-fault /dev/md0 /dev/sdL#
  2. # mdadm /dev/md0 -r /dev/sdL#
You must set it faulty before you can remove it!

To stop the array
Code: Bash
  1. # mdadm --stop /dev/md0

I orignally used to to RAID 2 network block devices, which didn't pan out too well...but it did work!

Some Links:
How to remove an MDADM Raid Array, Once and For All! - http://ubuntuforums.org/showthread.php?t=884556
Managing RAID and LVM with Linux (v0.5) - http://www.gagme.com/greg/linux/raid-lvm.php
Growing a RAID5 array MDADM - http://scotgate.org/2006/07/03/growing-a-raid5-array-mdadm/
The Software-RAID HOWTO - http://tldp.org/HOWTO/Software-RAID-HOWTO.html
Projects:
[ Axios Engine ] [ sourcehub ]
Compilers: Microsoft Visual Studio 2008, GNU C++, FASM, MASM, VB 6/.Net.
Languages: C++, PHP, ASM, JS, VB6/.Net, BASIC, HTML, MySQL
Please buy me some books: Amazon Wishlist

Offline Celestialkey

  • Administrator
  • Hero Member
  • *
  • Posts: 3962
  • Reputation 4874
  • Gender: Male
  • Its Alive!!
    • View Profile
    • www.CelestialCoding.com
Re: Linux RAID Intro
« Reply #1 on: December 19, 2009, 11:15:24 PM »
Hardware/Software support. You can decide.
Created By: Eczuo
Quote
I have noticed that people who claim that everything is predestined, and we can do nothing to change it, look both ways before they cross the road.
Quote
I'd prefer to die standing, than to live on my knees - Che Guevara
Quote
If you change the way you look at something, does that something change in any way?
- Quantum Theory

Hacking
Quote
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill


Quote from: Revelations 12:4
And his tail drew the third part of the stars of heaven, and did cast them into the earth; and the dragon stood before the woman which was ready to be delivered, for to devour her child as soon as it was born.

Quote
It takes skill to build an empire. It takes an idiot to maintain it.

Offline Nathan

  • Administrator
  • Hero Member
  • *
  • Posts: 1437
  • Reputation 1768
  • Gender: Male
  • woof woof
    • View Profile
Re: Linux RAID Intro
« Reply #2 on: December 20, 2009, 11:11:18 AM »
Hardware/Software support. You can decide.
Perhaps we need a Linux section?
Projects:
[ Axios Engine ] [ sourcehub ]
Compilers: Microsoft Visual Studio 2008, GNU C++, FASM, MASM, VB 6/.Net.
Languages: C++, PHP, ASM, JS, VB6/.Net, BASIC, HTML, MySQL
Please buy me some books: Amazon Wishlist

Offline Celestialkey

  • Administrator
  • Hero Member
  • *
  • Posts: 3962
  • Reputation 4874
  • Gender: Male
  • Its Alive!!
    • View Profile
    • www.CelestialCoding.com
Re: Linux RAID Intro
« Reply #3 on: December 20, 2009, 11:27:49 AM »
Lol, go ahead and make it. I don't have the time atm.
Created By: Eczuo
Quote
I have noticed that people who claim that everything is predestined, and we can do nothing to change it, look both ways before they cross the road.
Quote
I'd prefer to die standing, than to live on my knees - Che Guevara
Quote
If you change the way you look at something, does that something change in any way?
- Quantum Theory

Hacking
Quote
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill


Quote from: Revelations 12:4
And his tail drew the third part of the stars of heaven, and did cast them into the earth; and the dragon stood before the woman which was ready to be delivered, for to devour her child as soon as it was born.

Quote
It takes skill to build an empire. It takes an idiot to maintain it.

 

Donate


* Search


* Recent Posts

Image Comparison by Shishka
[May 15, 2017, 01:18:02 PM]


Re: srchub - free source code hosting by Nathan
[December 14, 2015, 11:37:02 PM]


Re: srchub - free source code hosting by Celestialkey
[November 27, 2015, 08:51:42 AM]


Updates by Nathan
[October 30, 2015, 08:27:36 PM]


Re: Client-Server Messaging by Nathan
[October 25, 2015, 05:48:57 PM]