LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-07-2005, 08:34 AM   #1
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Rep: Reputation: 15
RAID 1 and mkraid


hi,

i have slackware 10.1 (kernel 2.6.11) and see my raidtab.

Code:
raiddev /dev/md0
 raid-level 1
 nr-raid-disks 2
 nr-spare-disks 0
 persistent-superblock 1
 chunk-size 16
 device /dev/hda
  raid-disk 0
 device /dev/hdc
  raid-disk 1
when i do 'mkraid /dev/md0'

Code:
handling MD device /dev/md0
analyzing super-block
disk 0: /dev/hda, 156290904kB, raid superblock at 156290816kB
disk 1: /dev/hdc, 156290904kB, raid superblock at 156290816kB
mkraid: aborted.
(In addition to the above messages, see the syslog and /proc/mdstat as well
 for potential clues.)

can you help me ?

i want to mirorring the hda -> hdb

When i boot on my 2.4.29's kernel , the raid0 works fine...... and 2.6.11's kernel false :X

thank's

Last edited by GaMeS; 03-07-2005 at 09:27 AM.
 
Old 03-07-2005, 09:34 AM   #2
jiawj
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Slackware,Redhat
Posts: 121

Rep: Reputation: 15
hello

/dev/hda is specified the whole disk,you should make partitions by fdisk

example:


And, I think mdadm-tools package are better than raid-tools package

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda1 /dev/hdc1

then you can run:

lsraid -p -R > raidtab

to build raidtab config-file without edit it by manual

Last edited by jiawj; 03-07-2005 at 09:54 AM.
 
Old 03-07-2005, 09:46 AM   #3
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Original Poster
Rep: Reputation: 15
Code:
root@servcd:~# mdadm --create /dev/md0 --level=1 --raid-devices /dev/hda1 /dev/hdc1
mdadm: invalid number of raid devices: /dev/hda1
humpf ? :X

lsraid return this :

Code:
# This raidtab was generated by lsraid version 0.7.0.
# It was created from a query on the following devices:
#       /dev/hdc
#       /dev/hdc1
#       /dev/hdc2
#       /dev/hdc3
#       /dev/hdc4
#       /dev/hda
#       /dev/hda1
#       /dev/hda2
#       /dev/hda3
#       /dev/hda4

# md device [dev 9, 0] /dev/md0 queried offline
# Authoritative device is [dev 22, 0] /dev/hdc
raiddev /dev/md0
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        persistent-superblock   1
        chunk-size              16

        device          /dev/hda
        raid-disk               0
        device          /dev/hdc
        raid-disk               1

Last edited by GaMeS; 03-07-2005 at 09:47 AM.
 
Old 03-07-2005, 09:54 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hd[ac]1

see the examples at the end of mdadm man page

Last edited by keefaz; 03-07-2005 at 09:56 AM.
 
Old 03-07-2005, 10:01 AM   #5
jiawj
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Slackware,Redhat
Posts: 121

Rep: Reputation: 15
Quote:
mdadm --create /dev/md0 --level=1 --raid-devices /dev/hda1 /dev/hdc1
so sorry!
that my mistake,

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda1 /dev/hdc1
 
Old 03-07-2005, 11:00 AM   #6
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Original Poster
Rep: Reputation: 15
Code:
root@servcd:~# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hd[ac]1
mdadm: /dev/hda1 appears to be part of a raid array:
    level=1 devices=2 ctime=Mon Mar  7 17:57:07 2005
Continue creating array? y
VERS = 9001
mdadm: ADD_NEW_DISK for /dev/hda1 failed: Device or resource busy
excuse for the man page but ... the problem continu....
 
Old 03-07-2005, 11:07 AM   #7
jiawj
Member
 
Registered: Jul 2004
Location: Beijing, China
Distribution: Slackware,Redhat
Posts: 121

Rep: Reputation: 15
please run : fdisk -l and paste result here.
I guess your partition /dev/hda1 is not correct.

if you make partitions by fdisk, you must reboot and take activity the new partition, to avoid reboot, you can run partprobe after fdisk.

Last edited by jiawj; 03-07-2005 at 11:10 AM.
 
Old 03-07-2005, 11:07 AM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
what is the output for:
mdadm --query /dev/hda1
mdadm --query /dev/hdc1
 
Old 03-08-2005, 02:10 AM   #9
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Original Poster
Rep: Reputation: 15
'fdisk -l'

Code:
root@servcd:~# fdisk -l

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         124      995998+  82  Linux swap
/dev/hda2   *         125        6203    48829567+  83  Linux
/dev/hda3            6204        9850    29294527+  83  Linux
/dev/hda4            9851       19457    77168227+  83  Linux

Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1         124      995998+  82  Linux swap
/dev/hdc2   *         125        6203    48829567+  83  Linux
/dev/hdc3            6204        9850    29294527+  83  Linux
/dev/hdc4            9851       19457    77168227+  83  Linux
root@servcd:~#

Code:
root@servcd:~# mdadm --examine /dev/hda1
/dev/hda1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 310b0c11:592d0950:3d02bd4c:2550acdf
  Creation Time : Mon Mar  7 18:02:02 2005
     Raid Level : raid1
    Device Size : 995904 (972.56 MiB 1019.81 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Mon Mar  7 18:02:02 2005
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 1a1f1375 - correct
         Events : 0.1


      Number   Major   Minor   RaidDevice State
this     0       3        1        0      active sync   /dev/hda1

   0     0       3        1        0      active sync   /dev/hda1
   1     1      22        1        1      active sync   /dev/hdc1
root@servcd:~#
and hdc
Code:
root@servcd:~# mdadm --examine /dev/hdc
/dev/hdc:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 9922d56e:56e2d303:c5fee9e9:e675ad7f
  Creation Time : Mon Mar  7 16:44:51 2005
     Raid Level : raid1
    Device Size : 156290816 (149.05 GiB 160.04 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Mon Mar  7 16:45:15 2005
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : d34f8ce4 - correct
         Events : 0.2


      Number   Major   Minor   RaidDevice State
this     1      22        0        1      active sync   /dev/hdc

   0     0       3        0        0      active sync   /dev/hda
   1     1      22        0        1      active sync   /dev/hdc
root@servcd:~#
i'm use argument --examine because it say
Code:
root@servcd:~# mdadm --query /dev/hda1
/dev/hda1: is not an md array
/dev/hda1: device -1073744460 in 2 device undetected raid1 md0.  Use mdadm --examine for more detail.
root@servcd:~#
when i use --query argument.

do you have solution ?
 
Old 03-08-2005, 07:52 AM   #10
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Original Poster
Rep: Reputation: 15
another solution...?
 
Old 03-08-2005, 08:35 AM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
From what I see, I would think your raid array is already set.
Any error at boot or in dmesg ?
 
Old 03-08-2005, 08:39 AM   #12
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Original Poster
Rep: Reputation: 15
'dmesg'

Code:
md: could not bd_claim hda.
md: error, md_import_device() returned -16
md: array md0 already initialised!
md: array md0 already initialised!
EXT3-fs: unable to read superblock
isofs_fill_super: bread failed, dev=md0, iso_blknum=16, block=32
md: array md0 already initialised!
md: array md0 already initialised!
md: md0 stopped.
 
Old 03-08-2005, 09:06 AM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
What does ' cat /proc/mdstat ' say ?
 
Old 03-08-2005, 09:09 AM   #14
GaMeS
Member
 
Registered: Jan 2005
Location: France / Bretagne
Distribution: Debian / Gentoo
Posts: 71

Original Poster
Rep: Reputation: 15
'mdstat'

Code:
root@servcd:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [raid6] [raid10] [faulty]
unused devices: <none>
if in my raidtab config file , i change
Code:
raiddev /dev/md0
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        chunk-size              32
        device          /dev/hda
        raid-disk               0
        device          /dev/hdc
        raid-disk               1
in
Code:
raiddev /dev/md0
        raid-level              1
        nr-raid-disks           2
        nr-spare-disks          0
        chunk-size              32
        device          /dev/hda1
        raid-disk               0
        device          /dev/hdc1
        raid-disk               1
and start mkraid....

Code:
root@servcd:~# mkraid /dev/md0
handling MD device /dev/md0
analyzing super-block
disk 0: /dev/hda1, 29294527kB, raid superblock at 29294400kB
/dev/hda1 is mounted
mkraid: aborted.
(In addition to the above messages, see the syslog and /proc/mdstat as well
 for potential clues.)
.............

Last edited by GaMeS; 03-08-2005 at 09:14 AM.
 
Old 03-08-2005, 09:16 AM   #15
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Got a question...Why are you trying to raid your swap partitions?
 
  


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
mkraid -- command not found raptorman Debian 2 09-27-2005 06:56 AM
Trying to Locate MKRAID louisb Linux - Software 3 06-18-2005 09:32 AM
Perc3Di SCSI RAID + Adaptec 2810SA RAID = Fatal Grub Error? LinuxOnTheEdge Linux - General 2 03-19-2005 02:35 PM
does linux support the sata raid and ide raid in k7n2 delta ilsr? spyghost Linux - Hardware 10 04-16-2004 05:27 AM
mkraid output "[uèEäUàÁÁùEØMÜMno MD device file in /dev" bruce1271 Linux - Software 6 03-21-2004 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:02 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