Raid 5 - Setup

This is a discussion on Raid 5 - Setup ; I am completely new to linux and wish to make a raid5 array out of 4
harddisks. I used mdadm to create the the array which resulted in a
new device md0. However, I am not sure what to do ...

Raid 5

I am completely new to linux and wish to make a raid5 array out of 4
harddisks. I used mdadm to create the the array which resulted in a
new device md0. However, I am not sure what to do to mount this new
device.

Any help?

Re: Raid 5

On Tue, 07 Oct 2008 22:03:28 -0400, Carl wrote:
>I am completely new to linux and wish to make a raid5 array out of 4
>harddisks. I used mdadm to create the the array which resulted in a
>new device md0. However, I am not sure what to do to mount this new
>device.

Now you put a filesystem on /dev/md0, just as if it was another
partition. And add an /etc/fstab entry for the thing.

Re: Raid 5

On Tue, 07 Oct 2008 22:17:46 -0400, Grant wrote:
> Now you put a filesystem on /dev/md0, just as if it was another
> partition. And add an /etc/fstab entry for the thing.
> man mkfs
> man fstab

Would you not first have to partition the raid device with something
like "cfdisk /dev/md0" ?

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)

Re: Raid 5

On Tue, 07 Oct 2008 22:33:47 -0400, "David W. Hodgins" wrote:
>On Tue, 07 Oct 2008 22:17:46 -0400, Grant wrote:
>
>> Now you put a filesystem on /dev/md0, just as if it was another
>> partition. And add an /etc/fstab entry for the thing.
>> man mkfs
>> man fstab
>
>Would you not first have to partition the raid device with something
>like "cfdisk /dev/md0" ?

No, it already *is* a partition, sort of like how /dev/sda3 is a
partition, if you want to break it up you're talking LVM territory
-- do you want really to go there?

Re: Raid 5

Grant wrote:
> On Tue, 07 Oct 2008 22:33:47 -0400, "David W. Hodgins" wrote:
>
>> On Tue, 07 Oct 2008 22:17:46 -0400, Grant wrote:
>>
>>> Now you put a filesystem on /dev/md0, just as if it was another
>>> partition. And add an /etc/fstab entry for the thing.
>>> man mkfs
>>> man fstab
>> Would you not first have to partition the raid device with something
>> like "cfdisk /dev/md0" ?
>
> No, it already *is* a partition, sort of like how /dev/sda3 is a
> partition, if you want to break it up you're talking LVM territory
> -- do you want really to go there?
>
> Grant.

No, it's a device, like /dev/sda is a device. Take a look at the node numbers
with 'ls -l' and review the use of MAKEDEV to see what I mean. You can use it
directly as something like a partition, but this confuses some system tools.
You can also set up LVM on it, and do all sorts of other fun.

But 4 disks is barely enough to get any benefit out of RAID5. Why use that
instead of RAID 0 with good backup, or with RAID 10?

Re: Raid 5

Carl wrote:
> I am completely new to linux and wish to make a raid5 array out of 4
> harddisks. I used mdadm to create the the array which resulted in a
> new device md0. However, I am not sure what to do to mount this new
> device.

You format it as if it was a normal partition and then..

well, mount it in the normal way.
--
| spike1@freenet.co,uk | "Are you pondering what I'm pondering Pinky?" |
| Andrew Halliwell BSc | |
| in | "I think so brain, but this time, you control |
| Computer Science | the Encounter suit, and I'll do the voice..." |

Re: Raid 5

David W. Hodgins wrote:
> On Tue, 07 Oct 2008 22:17:46 -0400, Grant wrote:
>
>> Now you put a filesystem on /dev/md0, just as if it was another
>> partition. And add an /etc/fstab entry for the thing.
>> man mkfs
>> man fstab
>
> Would you not first have to partition the raid device with something
> like "cfdisk /dev/md0" ?

No, md0 is the equivalent of a partition.
If you'd wanted multiple partitions you'd have to raidify them seperately.
so you'd need to partition the drives first and turn each partition set into
an md(X) device.

So for simplcity's sake say you made two 100gig partitions into a raid1.
/dev/sda1
/dev/sda2
/dev/sdb1
/dev/sdb2

md0 would be comprised of /dev/sda1 and /dev/sdb1
md1 would be /dev/sda2 and /dev/sdb2...

Re: Raid 5

Nico Kadel-Garcia wrote:
> No, it's a device, like /dev/sda is a device. Take a look at the node numbers
> with 'ls -l' and review the use of MAKEDEV to see what I mean. You can use it
> directly as something like a partition, but this confuses some system tools.
> You can also set up LVM on it, and do all sorts of other fun.
>
> But 4 disks is barely enough to get any benefit out of RAID5. Why use that
> instead of RAID 0 with good backup, or with RAID 10?

Well, with raid10, he's losing two disks, while raid5 he's only losing 1.
OK, he might be sacrificing speed a little to gain redundancy but...

Re: Raid 5

Andrew Halliwell wrote:
> Nico Kadel-Garcia wrote:
>> No, it's a device, like /dev/sda is a device. Take a look at the node numbers
>> with 'ls -l' and review the use of MAKEDEV to see what I mean. You can use it
>> directly as something like a partition, but this confuses some system tools.
>> You can also set up LVM on it, and do all sorts of other fun.
>>
>> But 4 disks is barely enough to get any benefit out of RAID5. Why use that
>> instead of RAID 0 with good backup, or with RAID 10?
>
> Well, with raid10, he's losing two disks, while raid5 he's only losing 1.
> OK, he might be sacrificing speed a little to gain redundancy but...
>
> Maybe he just wanted to experiment and get a little benefit out of it too?

RAID5 only saves a disk if you don't have a hotswap disk. I've had unfortunate
experience with RAID, where disks begin to fail at the same time due to
overall identical usage, similar to what Google described in their whitepaper
on disk failures.