Re: Help with ES v3 Raid1 (Mirror)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-02-01 at 11:58, Marc Leveille wrote:

> I have tried this all morning without success. I also tried making the
> raid device using sdb1 and sdc1 as oppesed to sdb and sdc. Here is what
> I am doing in exact steps because sometimes one little thing can mess
> things up.
> 
> 1- Fdisk sdb and create a primary partition with full size of drive and
> set type to FD (Linux Raid). write and exit
> 2- same as step 1 but for sdc.
> 3- run the command to make raid device. "mdadm --create /dev/md0
> --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
> 4- mkfs.ext3 /dev/md0 (completes with noe errors)
> 5- e2fsck -f /dev/md0 (works with no errors)
> 6- add line in fstab
> /dev/md0   /home/apps  ext3    defaults  1 2
> 
> reboot and get
>    FSCK.ext3 /dev/mdo the superblock could not be read or does not
> describe a correct EXT2 Filesystem.......bla bla and asks to run E2FSCK
> -B 8193 

Back to my earlier question: are you running a 2.4.x or 2.6.x kernel? 
AFAIK, the 2.4.x kernels do *NOT* include a startup script using the
mdadm method, only the raidtools method.  If you are running a 2.4.x
series kernel you'll have start the RAID array and mount the filesystem
later in the boot.  Something like the following added to rc.local
should work:

#
# Start the software RAID array and mount the filesystem
#
mdadm --assemble --scan /dev/md0
mount -t ext3 /dev/md0 /home/apps

I think the --scan option requires a valid /etc/mdadm.conf file, which
should look something like this:
DEVICE /dev/sda1 /dev/sdb1
 
ARRAY /dev/md0 level=raid1 num-devices=2
      UUID=d2105e8e:6e0520b4:40e78ca7:365146a6
      devices=/dev/sda1,/dev/sdb1

You'll need to change the devices & UUID as appropirate.  You can get
the UUID via "mdadm --detail /dev/md0".  The drawback to this method is
you can't use the /etc/fstab entry because the RAID device hasn't been
started yet.

If you're running a 2.4.x kernel you can use the raidtools method to
automatically start the RAID device during boot, which means you can
leave the /etc/fstab entry.  An /etc/raidtab entry for the same device
would look something like:

raiddev                /dev/md0
raid-level             1
nr-raid-disks         2
nr-spare-disks        0
 
device                 /dev/sda1
raid-disk              0
 
device                 /dev/sdb1
raid-disk              1

During boot, /etc/raidtab will be read and the RAID device started and
the entry in /etc/fstab should work.

Both raidtools & mdadm manipulate the same RAID devices, raidtools is
the standard for 2.4.x kernels, mdadm the standard for 2.6.x kernels.

-Eric

-- 

Eric Sisler <esisler@xxxxxxxxxxxxxxxxxxxxx>
Library Applications Specialist
Westminster Public Library
Westminster, CO USA

Linux - Don't fear the Penguin.
Want to know what we use Linux for?
Visit http://wallace.westminster.lib.co.us/linux

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux