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

Re: Software RAID problems (bad filesystem type)



On Thursday 12 February 2004 07:05, you wrote:
[snip]
> >
> > You're going to have problems with that setup.  You can't have a raid
> > using
> > part of a disk (hdc2) and the entire disk (hdc).  You should be using
> > two
> > partitions, like this:
> > # cat /etc/raid/raidtab
> > raiddev /dev/md0
> > raid-level 1...
>
> Starting from the scratch with different approach (this time
> instructions from http://karaolides.com/computing/HOWTO/lvmraid). Now I
> have raid disk that comes nicely up on boot and I've managed to copy my
> data there. However, I can't get it to boot from raid. Here is my
> raidtab:
>
> # cat /etc/raid/raidtab
> raiddev /dev/md0
> raid-level 1
> nr-raid-disks 2
> nr-spare-disks 0
> chunk-size 32
> persistent-superblock 1
>          device /dev/hda1
>          failed-disk 0
>          device /dev/hdc1
>          raid-disk 1
>
OK, this is fine, since you're following the instructions from the link you 
posted.

> And here is lilo.conf
>
> lba32
> boot=/dev/hdc1

This line is the source of your problems.  You're telling the bootloader to 
look on /dev/hdc1 for your boot sector.  You should be telling it to look 
on /dev/md0.  After all, isn't that the device that you want /boot on?

> root=/dev/md0
> install=/boot/boot-menu.b
> map=/boot/map
> vga=normal
> default=Linux
>
> image=/vmlinuz
>          label=Linux
>          read-only
> image=/vmlinuz.old
>          label=LinuxOLD
>          read-only
>          optional
>
> When I do chroot /mnt/md0 /sbin/lilo, I get the following warnings:
>
I can't explain all the warnings you're getting from Lilo, because I can't 
see your current /etc/fstab, but I have some guesses.

> Warning: '/proc/partitions' does not exist, disk scan bypassed
When you chroot to /mnt/md0, you can no longer access any directory not 
under /mnt/md0.  If you want to access proc, make a /mnt/md0/proc 
directory, and mount proc there before you chroot.

> Warning: BIOS drive 0x81 may not be accessible
> Warning: /dev/hdc1 is not on the first disk
> Warning: BIOS drive 0x81 may not be accessible
> Warning: Partition 1 on /dev/hdc is not marked Active.

When you partitioned this drive, did you mark the raid partition as 
bootable?  Both raid partitions (/dev/hdc1 and /dev/hda1) should be marked 
as bootable.

> Warning: partition type 0xFD on device 0x1601 is a dangerous place for
>      a boot sector.
>
> Then it says (after saying yes)
>
> Warning: BIOS drive 0x81 may not be accessible
> Warning: BIOS drive 0x81 may not be accessible
> Added Linux *
> Skipping /vmlinuz.old
>
The rest of these errors are likely due to your trying to access /dev/hdc1 
directly, instead of using the raid drivers and going through /dev/md0.

> After reboot, systems comes up, but booting to hda1 instead of md0.
>
> Any pointers as to how to get it boot properly appreciated.
>
First, change your /etc/lilo.conf to boot from /dev/md0.  Mount /proc onto a 
directory you can view from a chrooted /dev/md0.  Then chroot and run lilo.

Note that if you're using the raid drivers as modules, you've got to put 
them in the initial ram disk for them to be loaded, and start the raid 
array with the proper userspace utilities.  I do not know how to do this.  
Instead, I ended up compiling my own kernel with raid drivers built in, and 
booting without an initial ram disk.  Are you booting your own kernel?

Let us know if these changes don't solve your problems.  Remember to finish 
the install by properly partitioning /dev/hdc, adding it to the array, and 
waiting for it to update properly.

> > Also note that you'll get much better performance if you can separate
> > your
> > disks onto individual IDE busses.  For my machine, I moved one disk
> > from
> > the slave on the first bus (hdb) to the master on the second bus
> > (hdc), and
> > now I've got a quicker setup.  But you can still make RAID work on one
> > disk / IDE bus, if you need to / have to.
>
> They are actually on two different busses. What worries me a bit, is
> that they have a different cable setup at this moment (the other one
> with standard IDE cable, the other one with "yellow" ide cable).
>
Someone else may have to help you out here.  My gut feeling is that there's 
no difference, but I have no data to back that up.

> >>> Also, provide the output of "cat /proc/mdstat".  You should see
> >>> something
> >>> like this:
> >>> Personalities : [raid1]
> >>> read_ahead 1024 sectors
> >>> md0 : active raid1 hdc1[1] hda2[0]
> >>>       15936 blocks [2/2] [UU]
> >>
> >> Personalities : [raid1]
> >> read_ahead not set
> >> unused devices: <none>
> >
> > This means that you're drives aren't properly recognized.  You'll have
> > to
> > fix your raidtab and then start the raid.  I didn't use mdadm, so I'm
> > not
> > sure of the syntax.  But since you've actually got a /proc/mdstat, that
> > means your drivers are loaded.
>
> Now this is ok as well:
>
> Personalities : [raid1]
> read_ahead 1024 sectors
> md0 : active raid1 hdc1[0]
>        34179648 blocks [2/1] [U_]
>
> unused devices: <none>
>
This is better.  You should see both drives listed once you successfully 
boot from /dev/md0 and then unmark /dev/hda1 as failed.
>
> Thanks for any help,
>
> Timo
I'm copying this to the list, so others can fill in the blanks I left.

Justin Guerin



Reply to: