# 3ware Raid 5 setup [Solved]

## KWhat

There seems to be a serious lack of documentation dealing with raids or maybe i am not looking in the correct location.  Either way I have a 3ware ATA raid 5 setup.  I have loaded up the drivers in the kernel and i have a /dev/md0 raid group and tw_cli seems to be reporting the correct information.

Now to the issue... I can figure out how to partition the disks.  I really just need this for file storage and backup.  Some have suggested that i need to setup lvm + dev mapper so i emerge both of them and added them to boot but i am not sure what todo at this point.  

I started to read through the http://tldp.org/HOWTO/LVM-HOWTO/lvm2_boot.html and got completely lost.  What is a boot time script?  Wasnt this for drivers not in the kernel and isnt my driver in the kernel?

Help

-ThanksLast edited by KWhat on Tue Feb 26, 2008 7:03 am; edited 1 time in total

----------

## gundelgauk

The 3ware controllers I've used (95xx, 96xx) worked pretty much transparently to the operating system. Meaning I would set up my RAID array(s) in the controller's user interface before even installing an operating system. After doing this, the array would show up as a simple, single SCSI disc (sda). The drivers and tools were only there to be able to monitor the controller and send email in case of errors and such.

If yours works the same way, you don't really have anything more to do, after you set up your RAID in the controller's interface. But I suggest you install their tools so that you get warnings. You don't even have to use LVM, you can just partition the virtual drive as you would a normal one.

----------

## gentoo-dev

If you let your controller handle the RAID, load its driver and use /dev/sd*

Note that if your controller goes belly up, you'll need another identical one before you can access your data

As you seem to want software RAID, which means you could move your disks to another system and access your data,

http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

should provide some help.

If all you want is a big chunk of storage space, just ignore the LVM2 part.

----------

## KWhat

 *gundelgauk wrote:*   

> You don't even have to use LVM, you can just partition the virtual drive as you would a normal one.

 

Well i tried to use cfdisk /dev/md0 to partition the drive however it comes up with the error: "FATAL ERROR: Cannot read disk drive".

I noticed that i now have 3 scsi devices on system which look like each of the individual dives in my raid.  Should i be running fdisk/mkfs them?

Sorry i have never setup a raid before and this is all a bit new for me.

Thanks

----------

## neysx

http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

Read it (again).

If you already have a /dev/md0, just format it and use it.

You already did the partitioning before you assembled the partitions into a raid-5 unit that you named md0.

BTW, 3 disks is the minimum for a raid-5 setup. Don't expect great performances out of that.

hth

----------

## Cyker

Wait, so you have the hardware RAID set up already?

Or not?

Figure that out first.

Since you have a 3ware, it's probably a pretty good hardware RAID card - If that's the case, setup the RAID on the card first (Reboot, watch for the key-combo that tells you howto enter the RAID BIOS, then assemble the disks into a RAID5 array)

Once you're done there, you should have a single device (Maybe /dev/sda, maybe something else?).

If not, you may need to compile the right 3ware controller driver into your kernel; Ask if you don't know how.

Once you get your /dev/ device, you should just be able to cfdisk and format it.

You will not need LVM.

However....

If you want to waste your money and reduce your 3ware to an excessively expensive SATA controller card, you'll need to fix the /dev/md0.

If you're getting "FATAL ERROR: Cannot read disk drive", it may be because the software RAID was set up incorrectly, or the /dev/md0 is pointing to an incorrect node.

You'll need to play around with mdadm and may need to run MAKEDEV ('tho if you're using mdadm you really shouldn't need to touch MAKEDEV).

You probably don't need LVM - If you just want one huge RAID area, then once you have /dev/md0 you just need to format it (DON'T TRY TO CFDISK IT! It shouldn't let you anyway...) and you're done.

If you do want to partition it, then you will need LVM, but be warned - There were problem reports popping up with mixing LVM and software RAID around 2.6.20 (That's where I heard it anyway), and I don't know if it's been fixed.

I don't know how to set up LVM, having only done software RAID, so I'll have to leave that to someone else...  :Wink: 

----------

## KWhat

Ok the software raid thing kept throwing me off because i have a hardware raid and /dev/md0 had already been created.

The following seemed to get what i was expecting:

mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc

mke2fs -j /dev/md0

Anyway this is just a simple storage solution for my house.  I really just need the space and reliability not performance.

Are there any file systems recommended for mostly read only data or should ext3 be sufficient?

----------

