View previous topic :: View next topic |
Author |
Message |
meekrob Tux's lil' helper
Joined: 13 Apr 2002 Posts: 81 Location: Tempe, AZ USA
|
Posted: Tue Apr 16, 2002 1:21 am Post subject: Raid problem: cannot determine md version |
|
|
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: | #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: |
# 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
?? |
|
Back to top |
|
|
fghellar Bodhisattva
Joined: 10 Apr 2002 Posts: 856 Location: Porto Alegre, BR
|
|
Back to top |
|
|
Guest
|
Posted: Tue Apr 16, 2002 2:00 am Post subject: modprobe md |
|
|
Ahh. I have to start with a modprobe md... are there any other modules I need to load? |
|
Back to top |
|
|
meekrob Tux's lil' helper
Joined: 13 Apr 2002 Posts: 81 Location: Tempe, AZ USA
|
Posted: Tue Apr 16, 2002 2:03 am Post subject: modprobe md seemed to do the trick |
|
|
modprobe md seemed to do the trick!
thanks! |
|
Back to top |
|
|
TNX n00b
Joined: 08 Oct 2003 Posts: 8 Location: Finland
|
Posted: Fri Jan 16, 2004 12:49 am Post subject: Raid problem: cannot determine md version |
|
|
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: |
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/
|
|
|
Back to top |
|
|
RaaR Tux's lil' helper
Joined: 24 Jul 2003 Posts: 125
|
Posted: Fri Jan 16, 2004 4:33 am Post subject: |
|
|
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. |
|
Back to top |
|
|
TNX n00b
Joined: 08 Oct 2003 Posts: 8 Location: Finland
|
Posted: Sat Jan 17, 2004 11:36 pm Post subject: |
|
|
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.) |
|
Back to top |
|
|
TNX n00b
Joined: 08 Oct 2003 Posts: 8 Location: Finland
|
Posted: Sun Jan 18, 2004 1:08 am Post subject: |
|
|
Ok, found a solution:
Scrapped devfs and emerged udev, now /dev/md0 works properly. |
|
Back to top |
|
|
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7729 Location: Underworld
|
Posted: Wed Jul 20, 2005 2:09 pm Post subject: |
|
|
Merged threads to put together two possible solutions and made stick. _________________ "I'm just very selective about the reality I choose to accept." -- Calvin |
|
Back to top |
|
|
yottabit Guru
Joined: 11 Nov 2002 Posts: 313 Location: Columbus, Ohio, US
|
Posted: Sat Oct 08, 2005 5:19 pm Post subject: |
|
|
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-tipsntricks.xml#software-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 _________________ Play The Hitchhiker's Guide to the Galaxy! |
|
Back to top |
|
|
epinefryna n00b
Joined: 27 Jan 2005 Posts: 16
|
Posted: Sat Oct 15, 2005 8:50 pm Post subject: |
|
|
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: | 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: | 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
and got
Code: | 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: | 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. |
|
Back to top |
|
|
yottabit Guru
Joined: 11 Nov 2002 Posts: 313 Location: Columbus, Ohio, US
|
|
Back to top |
|
|
Woolong n00b
Joined: 03 Feb 2004 Posts: 62 Location: Hong Kong
|
|
Back to top |
|
|
Chazmati n00b
Joined: 03 Jan 2004 Posts: 6 Location: Neenah, WI
|
Posted: Sun Nov 20, 2005 8:53 pm Post subject: |
|
|
Help! After converting to UDEV, raidstart fails but mdadm still works.
Code: | 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? |
|
Back to top |
|
|
neysx Retired Dev
Joined: 27 Jan 2003 Posts: 795
|
|
Back to top |
|
|
ali3nx l33t
Joined: 21 Sep 2003 Posts: 722 Location: Winnipeg, Canada
|
Posted: Wed Aug 11, 2010 2:59 pm Post subject: |
|
|
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-tipsntricks.xml#software-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! |
|
Back to top |
|
|
umka69 Tux's lil' helper
Joined: 31 Mar 2013 Posts: 124
|
Posted: Thu Aug 29, 2013 3:15 pm Post subject: |
|
|
show here your.
Code: |
# cat /proc/mdadm
# ls -l /dev/md*
|
|
|
Back to top |
|
|
|