Problems with mkraid

Problems with mkraid

Post by Oliver Goet » Sun, 08 Jul 2001 21:05:21



I'm migrating from one server to another and wanted to set up
the new one with two mirrored disks. I installed the system
a few weeks ago and set up 4 mirror devices for various
partitions (/dev/md0 to /dev/md3).

Now I wanted to add another spare partition for the furure
file server service. So I set the file system type with
fdisk to "Linux raid autodetect" on both devices (the
partition data of both disks is identical), did a reboot
and added an entry for it in /etc/raidtab.

When I try to `mkraid -f /dev/md4` (well, sort of, but I can't
tell you the real switch here, or I'll be killed ;-), I get the
error message "/dev/md4: file doesn't exist!" (which it indeed
does not).

Isn't mkraid supposed to create this? What am I missing here?
I don't recall having this problem with the other mirror
devices.

Anyone please help!

        Oliver

Oh, yes, here's my raidtab:

# Larsaf Raid-Konfiguration, 12.05.2001 Oliver
#
# Alle Partitionen mit Raid-Level 1 (Mirror)

# root-Partition
raiddev                 /dev/md0
raid-level              1
nr-raid-disks           2
chunk-size              4
persistent-superblock   1

device                  /dev/hda5
raid-disk               0

device                  /dev/hdc5
raid-disk               1

# /boot-Partition
raiddev                 /dev/md1
raid-level              1
nr-raid-disks           2
chunk-size              4
persistent-superblock   1

device                  /dev/hda1
raid-disk               0

device                  /dev/hdc1
raid-disk               1

# /var-Partition
raiddev                 /dev/md2
raid-level              1
nr-raid-disks           2
chunk-size              4
persistent-superblock   1

device                  /dev/hda6
raid-disk               0

device                  /dev/hdc6
raid-disk               1

# swap-Partition
raiddev                 /dev/md3
raid-level              1
nr-raid-disks           2
chunk-size              4
persistent-superblock   1

device                  /dev/hda7
raid-disk               0

device                  /dev/hdc7
raid-disk               1

# /daten-Partition
raiddev                 /dev/md4
raid-level              1
nr-raid-disks           2
chunk-size              4
persistent-superblock   1

device                  /dev/hda8
raid-disk               0

device                  /dev/hdc8
raid-disk               1

--

   "I'd rather laugh with the sinners than cry with the saints
    Sinners are much more fun...   And only the good die young"
                                                     -- Billy Joel

 
 
 

Problems with mkraid

Post by Oliver Goet » Sun, 08 Jul 2001 21:07:24


Oops, I forgot: I'm using Suse Linux 7.1 with a 2.4.0 kernel and
mkraid version 0.90.0

        Oliver

--

   "I'd rather laugh with the sinners than cry with the saints
    Sinners are much more fun...   And only the good die young"
                                                     -- Billy Joel

 
 
 

Problems with mkraid

Post by Oliver Goet » Mon, 09 Jul 2001 08:53:18


Oliver Goetz schrieb:
Quote:

> Isn't mkraid supposed to create this? What am I missing here?
> I don't recall having this problem with the other mirror
> devices.

Ok, problem solved: it turns out that by default only
/dev/md0 to /dev/md3 are present in the system. I had
to create /dev/md4 myself with `mknod -m 660 /dev/md4 b 9 4`

After that it worked fine.

        Oliver

--

   "I'd rather laugh with the sinners than cry with the saints
    Sinners are much more fun...   And only the good die young"
                                                     -- Billy Joel

 
 
 

1. raid1-setup; problem with mkraid

Perhaps anyone out there can help me:

I am trying to setup a raid1 diskset with the mdutils.

The kernel supports md and raid1(now builtin but I also tried this as
module) is loaded look at a part of dmesg:
md driver 0.36.3 MAX_MD_DEV=4, MAX_REAL=8
raid1 personality registered
.....
REGISTER_DEV hda2 to md0 done
REGISTER_DEV hdb2 to md0 done
md:03:02: invalid raid superblock magic (2710b9) on block 205056

What I did so far:

I tried to edit the mdtab file from scratch (according the online help from
mdtab) with vi:

The entries look like this:

more /etc/mdtab.conf
/dev/md0        RAID1,4k,1      /dev/hda2       /dev/hdb2

I also tried to create the mdtab with mdcreate. The file created looks like
this:
/dev/md0        raid1,8k,1,dada193c     /dev/hda2 /dev/hdb2

Whey I try to run mkraid like: /sbin/mkraid /etc/mdtab I get the following
error-message:


mkraid version 0.36.4
parsing configuration file
detected error on line 2:
        /dev/md0        raid1,8k,1,dada193c     /dev/hda2 /dev/hdb2
mkraid: aborted

or with the self-made file:


mkraid version 0.36.4
parsing configuration file
detected error on line 1:
        /dev/md0        RAID1,4k,1      /dev/hda2       /dev/hdb2
mkraid: aborted

Then I tried to run /sbin/mdadd -a which worked fine. After this the
REGISTER_DEV appeared in the boot-msg.

I also looked on the mstat-file which looks like this:

Personalities : [1 linear] [2 raid0] [3 raid1]
read_ahead not set
md0 : inactive hda2 hdb2 410728 blocks
md1 : inactive
md2 : inactive
md3 : inactive

So please can you tell me what is going wrong with mkraid?

Thanks for your help in advance.

Best regards,

Fritz Spitzer

2. Sendmail in Linux

3. Raid Problems "mkraid: aborted, see the syslog and /proc/mdstat for potential clues. " in 2.2.14 kernel rh6.1

4. script ipchains ok but ...

5. Raid (mkraid) problems, and patching problems

6. Newbie Question

7. sol 2.5 PPP and IPX

8. mkraid problems

9. mkraid does not work

10. mkpv and mkraid give Segmentation fault... HELP!

11. Persistent Superblock, mkraid (SoftRAID)

12. RAID under kernel 2.2.18: mkraid aborted