Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Raid problem: cannot determine md version

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
meekrob
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Sat Apr 13, 2002 12:44 am
Location: Tempe, AZ USA

Raid problem: cannot determine md version

  • Quote

Post by meekrob » Tue Apr 16, 2002 1:21 am

I'm trying to set up gentoo with a kernel raid. I'd like to set up a raid0 swap and root partition and a raid1 boot and backup partition. I noticed the gentoo install cd has raidtools installed so I partition out the drives using fdisk. I then create /etc/raidtab:

Code: Select all

#swap
raiddev /dev/md0
raid-level 0
nr-raid-disks 2
persistant-superblock 1
chunk-size 32
device /dev/hde1
raid-disk 0
device /dev/hdg1
raid-disk 1

#root
raiddev /dev/md1
raid-level 0
nr-raid-disks 2
persistant-superblock 1
chunk-size 32
device /dev/hde2
raid-disk 0
device /dev/hdg2
raid-disk 1

#boot
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
persistant-superblock 1
chunk-size 32
device /dev/hde3
raid-disk 0
device /dev/hdg3
raid-disk 1

#backup
raiddev /dev/md3
raid-level 1
nr-raid-disks 2
persistant-superblock 1
chunk-size 32
device /dev/hde4
raid-disk 0
device /dev/hdg4
raid-disk 1
I then type:

Code: Select all

# mkraid /dev/md0
cannot determine md version: No such file or directory
#
Ack! So I check for /proc/mdstat. Nothing there.

How do I create the devices:

/dev/md0
/dev/md1
/dev/md2
/dev/md3

??
Top
fghellar
Bodhisattva
Bodhisattva
User avatar
Posts: 856
Joined: Wed Apr 10, 2002 1:04 am
Location: Porto Alegre, BR

  • Quote

Post by fghellar » Tue Apr 16, 2002 1:51 am

Try this:

Code: Select all

# cd /dev
# MAKEDEV md*
| www.gentoo.org | www.tldp.org | www.google.com |
Top
Guest

modprobe md

  • Quote

Post by Guest » Tue Apr 16, 2002 2:00 am

Ahh. I have to start with a modprobe md... are there any other modules I need to load?
Top
meekrob
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 81
Joined: Sat Apr 13, 2002 12:44 am
Location: Tempe, AZ USA

modprobe md seemed to do the trick

  • Quote

Post by meekrob » Tue Apr 16, 2002 2:03 am

modprobe md seemed to do the trick!

thanks!
Top
TNX
n00b
n00b
Posts: 8
Joined: Wed Oct 08, 2003 6:57 pm
Location: Finland

Raid problem: cannot determine md version

  • Quote

Post by TNX » Fri Jan 16, 2004 12:49 am

Hello,

I have run into a problem with /dev/md0.
Something must have broken in /dev, because at first my /dev/md0 worked just fine, raiddisk became active during boot and was exported over nfs. Currently, I've had to disable raidstart during boot, because it would hang the boot into an error message. The error "cannot determine md version: 25." comes up when trying to use any raidtool. The odd thing is, that if I go and rm /dev/md0 and create it again, the device works properly. (Or most probably I'm creating the file in the wrong way)

Here is how I do it currently:

Code: Select all

server root # mount /dev/md0/
mount: can't find /dev/md0 in /etc/fstab or /etc/mtab
server root # raidstart
cannot determine md version: 25.
server root # cd /dev/
server dev # rm -dr md0
server dev # ln -s md/0 md0
server dev # raidstart /dev/md0 
server dev # mount /dev/md0 /data/
Top
RaaR
Tux's lil' helper
Tux's lil' helper
Posts: 125
Joined: Thu Jul 24, 2003 7:15 am

  • Quote

Post by RaaR » Fri Jan 16, 2004 4:33 am

I read somewhere that kernel 2.5.x and above used /dev/md/? instead of /dev/md?.

Try replacing /dev/md0 with /dev/md/0 in fstab. Either I'm just not understanding your problem or this should solve it.
Top
TNX
n00b
n00b
Posts: 8
Joined: Wed Oct 08, 2003 6:57 pm
Location: Finland

  • Quote

Post by TNX » Sat Jan 17, 2004 11:36 pm

Yes the /dev/md/0 is the device and making /dev/md0 a symbolic link pointing to it solves the problem for as long as the computer is running. But if the system reboots, /dev/md0 is botched and I have to manually recreate the link.

I'm searching a solution which would make /dev/md0 to work correctly at boottime. (All other /dev/md? devices work properly at boot.)
Top
TNX
n00b
n00b
Posts: 8
Joined: Wed Oct 08, 2003 6:57 pm
Location: Finland

  • Quote

Post by TNX » Sun Jan 18, 2004 1:08 am

Ok, found a solution:

Scrapped devfs and emerged udev, now /dev/md0 works properly.
Top
pilla
Bodhisattva
Bodhisattva
User avatar
Posts: 7732
Joined: Wed Aug 07, 2002 8:19 pm
Location: Underworld

  • Quote

Post by pilla » Wed Jul 20, 2005 2:09 pm

Merged threads to put together two possible solutions and made stick.
"I'm just very selective about the reality I choose to accept." -- Calvin
Top
yottabit
Guru
Guru
User avatar
Posts: 313
Joined: Mon Nov 11, 2002 10:46 pm
Location: Columbus, Ohio, US
Contact:
Contact yottabit
Website

  • Quote

Post by yottabit » Sat Oct 08, 2005 5:19 pm

Just some helpful hints:
  • Use the new mdadm (multi-disk administrator) package and its mdadm.conf instead of the old raidtools and raidtab. Your life will be much easier. You can Google mdadm to read how it works and its advantages over raidtools. For setting up your system with mdadm you can see the software RAID howto supplement to Gentoo installation here: http://www.gentoo.org/doc/en/gentoo-x86 ... tware-raid. Lastly on this subject, you can interchange between mdadm and raidtools since they're just the userland utilities and both use the kernel's md driver! So no need to redefine your arrays and reformat! Just emerge mdadm, create your mdadm.conf (can be done automatically; read the previous link), unmerge raidtools, reboot! (Maybe there's more, but that's all I think I did...)
  • This has been covered before, but since this thread is sticky for the moment, I may as well say again: there really is no point in striping (RAID0) your swap! The kernel swap daemon automagically stripes/balances multiple swaps if you specify all of them in your /etc/fstab! Neato, right? Occam's Razor and all that jazz. (Finally, realize that if you were doing a mirrored array [RAID1] for the root filesystem there would be a good reason to mirror your swap... if one of the disks were to fail, you'd likely still keep serving up that database or whatever... with striping swap, if you lose a disk it's like pulling a RAM chip out of the system while running, hehe.)
J
[url=telnet://JacobMcDonald.net]Play The Hitchhiker's Guide to the Galaxy![/url]
Top
epinefryna
n00b
n00b
Posts: 16
Joined: Thu Jan 27, 2005 4:57 pm

  • Quote

Post by epinefryna » Sat Oct 15, 2005 8:50 pm

Hi
Need help
I found great howto about installing gentoo on raided hdds, I tried all of it and I'm stuck

I created partitions on my two identical hdds

Code: Select all

Disk /dev/sda: 36.7 GB, 36703934464 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          17      136521   fd  Linux raid autodetect   <-----boot
/dev/sda2              18         142     1004062+  82  Linux swap / Solaris
/dev/sda3             143        2575    19543072+  fd  Linux raid autodetect    <----- /
/dev/sda4            2576        4462    15157327+  fd  Linux raid autodetect   <---- /home
and

Code: Select all

Disk /dev/sdb: 36.7 GB, 36703934464 bytes
64 heads, 32 sectors/track, 35003 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         123      125936   fd  Linux raid autodetect
/dev/sdb2             124        1101     1001472   82  Linux swap / Solaris
/dev/sdb3            1102       20175    19531776   fd  Linux raid autodetect
/dev/sdb4           20176       35003    15183872   fd  Linux raid autodetect
I did

Code: Select all

modprobe md
and got

Code: Select all

md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
in dmesg

Created /etc/raidtab - almost the same as I found on this forum

PROBLEM:
I cannot see any /dev/md* devices. So I cannot run mkraid

Code: Select all

livecd ~ # mkraid
cannot determine md version: no MD device file in /dev.
I'm running 2005.1 LiveCD.

Will you help me, please. And if you are so kind please explain me how is it possible that my two identical hhds have different geometries ????
64 heads, 32 sectors/track, 35003 cylinders
255 heads, 63 sectors/track, 4462 cylinders

Thank you in advance
There is no spoon.
Top
yottabit
Guru
Guru
User avatar
Posts: 313
Joined: Mon Nov 11, 2002 10:46 pm
Location: Columbus, Ohio, US
Contact:
Contact yottabit
Website

  • Quote

Post by yottabit » Sat Oct 15, 2005 9:16 pm

You need to create the md device nodes. Easy!

See this: http://www.gentoo.org/doc/en/gentoo-x86 ... tware-raid

Cheers,

J
[url=telnet://JacobMcDonald.net]Play The Hitchhiker's Guide to the Galaxy![/url]
Top
Woolong
n00b
n00b
User avatar
Posts: 62
Joined: Tue Feb 03, 2004 9:54 am
Location: Hong Kong
Contact:
Contact Woolong
Website

  • Quote

Post by Woolong » Thu Oct 27, 2005 2:54 am

Hi,

I followed the guide to create raid1, the system boots and runs okay. But the second disk is somehow out of sync with my first hd.

I described the problem here:
http://forums.gentoo.org/viewtopic-t-39 ... ight-.html
Top
Chazmati
n00b
n00b
Posts: 6
Joined: Sat Jan 03, 2004 10:31 pm
Location: Neenah, WI

  • Quote

Post by Chazmati » Sun Nov 20, 2005 8:53 pm

Help! After converting to UDEV, raidstart fails but mdadm still works.

Code: Select all

metal ~ # raidstart /dev/md1
cannot determine md version: no MD device file in /dev.

metal ~ # raidstart /dev/md/1
cannot determine md version: no MD device file in /dev.

metal ~ # cat /etc/fstab | grep /dev/md
/dev/md/1               /home/share     ext3            defaults                0 0

metal ~ # cat /etc/raidtab
raiddev /dev/md/1
raid-level              1
nr-raid-disks           2
chunk-size              32
persistent-superblock   1
nr-spare-disks          0

        device          /dev/hdc2
        raid-disk       0
        device          /dev/hda2
        raid-disk       1

metal ~ # mdadm --assemble /dev/md1 /dev/hdc2 /dev/hda2
mdadm: /dev/md1 has been started with 2 drives.
Spaces added for clarity. What's up with this?
Top
neysx
Retired Dev
Retired Dev
User avatar
Posts: 795
Joined: Mon Jan 27, 2003 10:16 am
Contact:
Contact neysx
Website

  • Quote

Post by neysx » Wed Oct 04, 2006 2:31 pm

yottabit wrote:You need to create the md device nodes. Easy!

See this: http://www.gentoo.org/doc/en/gentoo-x86 ... tware-raid

Cheers,

J
http://www.gentoo.org/doc/en/gentoo-x86 ... nstall.xml would be a better place to look. I'll add a link to it in gentoo-x86-tipsntricks.xml

Hth
Top
ali3nx
l33t
l33t
User avatar
Posts: 732
Joined: Sun Sep 21, 2003 4:28 am
Location: Winnipeg, Canada
Contact:
Contact ali3nx
Website

  • Quote

Post by ali3nx » Wed Aug 11, 2010 2:59 pm

yottabit wrote:Just some helpful hints:
  • Use the new mdadm (multi-disk administrator) package and its mdadm.conf instead of the old raidtools and raidtab. Your life will be much easier. You can Google mdadm to read how it works and its advantages over raidtools. For setting up your system with mdadm you can see the software RAID howto supplement to Gentoo installation here: http://www.gentoo.org/doc/en/gentoo-x86 ... tware-raid. Lastly on this subject, you can interchange between mdadm and raidtools since they're just the userland utilities and both use the kernel's md driver! So no need to redefine your arrays and reformat! Just emerge mdadm, create your mdadm.conf (can be done automatically; read the previous link), unmerge raidtools, reboot! (Maybe there's more, but that's all I think I did...)
  • This has been covered before, but since this thread is sticky for the moment, I may as well say again: there really is no point in striping (RAID0) your swap! The kernel swap daemon automagically stripes/balances multiple swaps if you specify all of them in your /etc/fstab! Neato, right? Occam's Razor and all that jazz. (Finally, realize that if you were doing a mirrored array [RAID1] for the root filesystem there would be a good reason to mirror your swap... if one of the disks were to fail, you'd likely still keep serving up that database or whatever... with striping swap, if you lose a disk it's like pulling a RAM chip out of the system while running, hehe.)
J
Must agree with yottabit on using mdadm. The best i can recall raidtools and friends have been depreciated in 2.6 linux kernels for some time favoring mdadm. raidtools may work but it's more than liklely only usable for long term support and compatibility to allow systems admins time to rebuild software raid arrays.
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Top
umka69
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 124
Joined: Sun Mar 31, 2013 4:20 pm

  • Quote

Post by umka69 » Thu Aug 29, 2013 3:15 pm

show here your.

Code: Select all

# cat /proc/mdadm

# ls -l /dev/md*
Top
Post Reply

17 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic