[SOLVED] How can I create raid 1 - Centos 5.7 64 minimal installation
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Its usually more flexible to build a RAID out of partitions than whole drives. So make sdb1 and sdc1 partitions using gparted, then use mdadm to make them a RAID 1. gparted is graphical and easy to use, but not included by default in most Redhat installations (I wonder why?) mdadm is command line and should be installed.
When I did this recently I did not use the whole disk. I created empty boot and OS partitions at the beginning of the drives in case I wanted to boot from the RAID in the future. So in my case the large RAID partitions were sdb3 and sdc3. I also didn't use all of the space. When you have to replace a drive, you will find out that the new drive will not have the exact same number of blocks as the old drive. If a partition is even 1 block smaller, it won't work as a replacement. Also, you may have a need for some free space, such as for swap. Also, unless something has changed, the max partition size is 2TB. You need to use larger block sizes than 512 bytes to go above that. Probably simpler to just make a couple of 2TB partitions.
If you want - you can leave off the "yes |" then you can answer any questions that mdadm may ask.
you will then be left with a the raid1 device /dev/md0 which you now create a filesystem on with
Code:
mke2fs -j /dev/md0
mkdir /mnt/data
mount /dev/md0 /mnt/data
First of all, really appreciate the help, and the work you put into this. Thank you a lot.
I assume creating array for md2 is a typo, just to indicate for later usage of info.
So far everything went like charm, i dont know if i need to creat a mdadm.conf file with
"ext2" is also a typo right?
"Yes" to the /etd/mdadm.conf.
My only remaining thought... (Hmmmmmm) is the "physical/logical" sector sizes.
Some newer large capacity drives are using larger physical sector sizes. The ST33000651AS uses 512byte sectors - so, in this case it is not an issue. But, something to think about - should you ever re-use this knowledge.
Dave
Last edited by davemguru; 11-20-2011 at 04:04 AM.
Reason: spelling correction
Direct logic: mk3fs makes ext3, mk2fs should do ext2
I should have checked the output at least
So far everything works like charm, i marked the thread as solved, thanks^2 for help
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.