Software RAID Configuration problem

Mathew Snyder theillien at yahoo.com
Sat Oct 28 09:22:49 UTC 2006


I found an article online that gave the answer I was looking for.  From
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch26_:_Linux_Software_RAID:

Do not use labels in the /etc/fstab file for RAID devices; just use the
real device name, such as /dev/md0. On startup, the /etc/rc.d/rc.sysinit
script checks the /etc/fstab file for device entries that match RAID set
names in the /etc/raidtab file. The script will not automatically start
the RAID set driver for the RAID set if it doesn't find a match. Device
mounting then occurs later on in the boot process. Mounting a RAID
device that doesn't have a loaded driver can corrupt your data and
produce this error.

Thanks for the help.

Mathew



Ron McKeever wrote:
> I don't think your problem is labels, I think it is that your RAID array
> isn't starting when mounting occurs. When you created /dev/sdb4 is it the
> same size as /dev/sda3? What does /proc/mdstat show?
> These might help:
> http://kbase.redhat.com/faq/FAQ_43_2812.shtm
> 
> 
> -----Original Message-----
> From: redhat-sysadmin-list-bounces at redhat.com
> [mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Mathew Snyder
> Sent: Friday, October 27, 2006 9:04 PM
> To: redhat-sysadmin-list at redhat.com
> Subject: Re: Software RAID Configuration problem
> 
> I logged in and ran `mount /home` and got mount: no such partition
> found.  I then checked the label on /dev/md0 but is came back with:
> e2label: invalid argument while trying to open /dev/md0
> Couldn't find valid filesystem superblock.
> 
> Mathew Snyder
> 
> Ron McKeever wrote:
>> Rename /dev/sda3 and /dev/sdb4 with something other that /home, then label
>> /dev/md0 as /home... 
>>
>> You could also try the full syntax in /etc/fstab instead of the
> LABEL=/home,
>> like:
>> /dev/md0 /home ext3 defaults 1 2
>>
>> Ron
>>
>> -----Original Message-----
>> From: redhat-sysadmin-list-bounces at redhat.com
>> [mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Mathew
> Snyder
>> Sent: Friday, October 27, 2006 7:28 PM
>> To: redhat-sysadmin-list at redhat.com
>> Subject: Software RAID Configuration problem
>>
>> I posted this to rhn-users before realizing there is an actual sysadmin
>> list so I'm posting it here now.
>>
>> I have an RHEL 4 AS virtual machine running under VMWare with the
>> following configuration:
>>
>> /dev/sda1 /     650M
>> /dev/sda2 /var  500M
>> /dev/sda3 /home 500M (Linux raid autodetect for software raid)
>> /dev/sda4 Extended partition
>> /dev/sda5 swap  128M
>>
>> /dev/sdb1 /usr  1.65G
>> /dev/sdb2 /tmp  100M
>> /dev/sdb3 Linux raid autodetect for software raid with /dev/sda3)
>>
>> Here's the run down:  I started with a single /home partition on
>> /dev/sda and plenty of unallocated space on /dev/sdb.  I followed
>> directions in Michael Jang's RHCE book for mirroring the /home
>> partition.  They are as follows:
>>
>> Copy the /home data to /tmp then
>>
>> # unmount /home
>> # fdisk /dev/sda
>> Command (m for help) : t
>> Partition number (1-4)
>> 3
>> Partition ID (L to list options): FD
>> Command (m for help) : w
>>
>> # fdisk /dev/sdb
>> Command (m for help) : t
>> Partition number (1-4)
>> 4
>> Partition ID (L to list options): FD
>> Command (m for help) : w
>>
>> I then edit /etc/raidtab and add the following information:
>> raiddev /dev/md0
>> raid-level 1
>>
>> nr-raid-disks 2
>> nr-spare-disk 0
>> persistent-superblock 1
>> chunck-size 4
>> device /dev/sda3
>> raid-disk 0
>> device /dev/sdb4
>> raid-disk 1
>>
>>
>> I then create the raid and format it:
>> # mkraid -R /dev/md0 (this runs to completion with no errors)
>> # mkfs -j /dev/md0
>>
>> I then run e2label so I can apply a label to /dev/md0 and use the
>> LABEL=/home entry in /etc/fstab.  However, when I reboot it says it
>> can't mount the special device: LABEL=/home no such device, etc.
>>
>> When I log in, I run e2label on /dev/md0 and it isn't found.  If I run
>> e2label on either /dev/sda3 or /dev/sdb4 it comes back with /home.
>>
>> If I mount /dev/md0 it mounts fine.
>>
>> I've changed the format command to `mke2fs -j -L /home /dev/md0`
>> thinking it would give me better results but they end up the same.  It
>> won't mound /dev/md0 based on the label alone.
>>
>> What might I be doing wrong?
>>
>> Thanks,
>> Mathew Snyder
>>
>> --
>> redhat-sysadmin-list mailing list
>> redhat-sysadmin-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>>
>> --
>> redhat-sysadmin-list mailing list
>> redhat-sysadmin-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
>>
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
> 




More information about the redhat-sysadmin-list mailing list