LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Initializing drive array command for class lab on fedora 12 (https://www.linuxquestions.org/questions/linux-newbie-8/initializing-drive-array-command-for-class-lab-on-fedora-12-a-788355/)

stefnthebox 02-10-2010 08:48 PM

Initializing drive array command for class lab on fedora 12
 
Hello,

I was wondering if somebody could tell me what command initializes a drive array on Fedora12? I'm trying to initialize the drive command for linear RAID and the command given in the textbook is for Fedora Core 2 (which I had problems with in Virtualbox). Thanks bunches!

ongte 02-10-2010 09:49 PM

I assume you are talking about Linux Software RAID. First thing I suggest is get a newer book. FC2 is so old, so much of what you read will be irrelevant. If u don't mind me asking, what kind class are you taking?
Linear RAID is a rather bad idea. It offers no advantages & reduces reliability. If you wish to combine the space of several drives on a modern Linux distro, you should be using LVM instead.

stefnthebox 02-11-2010 07:55 AM

Well it's a Linux + Guide to Linux Certification class. Unfortunately this is the required textbook for the class.

Can you tell me a way that I can look up the command to initialize an array in Fedora 12? I realized how old Fedora Core 2 was when it wouldn't work in Virtualbox which is the reason I installed Fedora12. It doesn't matter which Linux we use for the class except for that it makes it a little (more) difficult when the commands don't match :newbie:

chrism01 02-11-2010 05:22 PM

Try mdadm http://linux.die.net/man/8/mdadm. You'll also need fdisk to set the correct partition type http://linux.die.net/man/8/fdisk

ongte 02-12-2010 06:36 AM

If by initialize you mean create a RAID array from scratch. Then here's a quick & dirty guide I wrote years ago. (It's for RAID 1)

Configure 2 partitions
Quote:

# fdisk /dev/hda
Press “m” to get the help menu
Press “p” to print existing partition table
Press “n” to create new partition
Press “t” to change partition type (press “l” to list the types. Choose “fd” for Linux RAID Auto)
Make another partition with the above 2 steps
Press “w” to save the partitions created

Quote:

# partprobe
To re-probe the partitions that you created. If you don’t run this command, the kernel won’t be able to see the partition.

Create the mount point for the software RAID to be used later on. Create a directory under /mnt called “raid”

Create software RAID device
Quote:

# mdadm --create /dev/md0 --level 1 –n 2 /dev/hda6 /dev/hda7
In this command, we assume that the partition that you have created is /dev/hda6 and /dev/hda7. It may be defer from yours. To check the partition that you have created you can use “fdisk –l” command

View the config file for the software raid after creation
Quote:

# cat /proc/mdstat
Format the software raid space
Quote:

# mkfs.ext3 /dev/md0
Mount the software RAID disk space to the mount point that we created earlier.
Quote:

# mount /dev/md0 /mnt/raid
View the size of the software RAID that was mounted.
Quote:

# df –h
View the details of the software RAID
Quote:

# mdadm --detail /dev/md0


All times are GMT -5. The time now is 09:30 AM.