LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-22-2010, 09:52 PM   #1
tightlikethat
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Rep: Reputation: 0
Issue with creating a Software RAID on CentOs


Hello all. I have been experiencing an issue with creating a sofware RAID on a CentOS VM in Virtual Box. I went through the following steps when attempting to create a Software RAID:

1. I created 2 primary partions /dev/hda3 and dev/hda4 using the fdisk command.
2. I set the partition id to fd (Linux raid) autodetect.

3. I wrote each partition to the disk followed by the partprobe command.

4. I created an ext3 file system for each partition by using the following command for /dev/hda3(ex: mkfs -t ext3 /dev/hda3) and /dev/hda4 (ex: mkfs -t ext3 /dev/hda4)

5. I created entries in /etc/fstab for /dev/hda3 and /dev/hda4

6. I ran the command mount -a

7. I created a raid device with the following command:
mdadm -C /dev/md0 -a yes -l 1 -n 2 /dev/hda3 /dev/hda4

8. I formatted the RAID device with the following command:
mkfs -t ext3 /dev/md0

9. I added an entry to /etc/fstab. The /etc/fstab file contents is shown below:


LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/hda3 /testmount ext3 defaults 1 2
/dev/hda4 /tesmount2 ext3 defaults 1 2
/dev/md0 /testraid ext3 defaults 1 2


However, when I reboot, I get the following errors during bootup:

WARNING: badformat in line 11 of /etc/fstab
WARNING: badformat in line 12 of /etc/fstab
WARNING: badformat in line 13 of /etc/fstab

fsck.ext3: Device or resource busy while trying to open /dev/hda3
fsck.ext3: Device or resource busy while trying to open /dev/hda4

Does anyone know what would cause this error? Also, when I try to fix /etc/fstab via single user mode, it says that the file is read only. Is there any way to fix the file with out using a rescue disk? Thanks for any help you can provide.
 
Old 03-22-2010, 10:14 PM   #2
nonamenobody
Member
 
Registered: Oct 2002
Posts: 138

Rep: Reputation: 22
It's a while since I have done it, but steps 4, 5 and 6 look out of place. You shouldn't format the devices which make up the array and you certainly shouldn't mount them (or add them to the fstab).

With regard to single user mode; your root partition is probably mounted readonly, so you would need to remount it as read/write before you could edit the fstab.
 
Old 03-23-2010, 12:24 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,344

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
Concur with above poster.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS install onto software RAID 10 batfastad Linux - Server 4 02-04-2010 07:28 PM
Installing CentOS 5.1 onto a software raid 1+0 configW alfista Linux - Server 3 03-10-2008 10:03 PM
Creating software mirror raid during installation hq4ever Fedora 1 02-21-2006 09:09 AM
Creating RAID (software) dominant Linux - Software 2 01-23-2005 01:22 PM
Creating multiple partitions in a software RAID heiseltc Linux - Hardware 1 05-31-2003 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration