Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
creating MD devices in /mnt/gentoo/dev for RAID
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
dougco
n00b
n00b


Joined: 06 Jul 2004
Posts: 47
Location: San Francisco

PostPosted: Tue Jul 06, 2004 8:46 pm    Post subject: creating MD devices in /mnt/gentoo/dev for RAID Reply with quote

I'm doing a 2.6 install on an AMD64 w/ 2 SATA drives and I've got to the point where I am ready to reboot the system, but grub doesn't seem to find /dev/md0

So I went back to liveCD and found that in my /mnt/gentoo environment, there is no md directory in my /dev and I have no idea how to create these device links!

When I boot into liveCD, I run the mkraid on everything, and it all looks good, and I mount /mnt/gentoo on my new md drives, and everything is fine. But when I now chroot into this new framework and do all my installs, I am unsure how to get this raid setup going again so it works on a system reboot. Here are my various errors:

livecd dev # mkraid /dev/md0
cannot determine md version: no MD device file in /dev.

livecd dev # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: error opening /dev/md0: No such file or directory

livecd 2.6.7-gentoo-r8 # modprobe md
FATAL: Module md not found.

Then I tried to TAR up and copy the md files in /dev/md/ to see if that would work, and then got this:

livecd dev # mkraid --really-force /dev/md0
/dev/md4: array is active -- run raidstop first.
mkraid: aborted.

livecd dev # raidstop /dev/md4
no MD device file in /dev.

So is it valid to simply tar up all the md stuff from the original /dev into the new framework? Or should I be creating the md devices somehow?

thanks
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Jul 06, 2004 8:51 pm    Post subject: Reply with quote

You may wanna check this out https://forums.gentoo.org/viewtopic.php?t=190726&highlight=software+raid+install
_________________
Come and play in my land
Back to top
View user's profile Send private message
dougco
n00b
n00b


Joined: 06 Jul 2004
Posts: 47
Location: San Francisco

PostPosted: Tue Jul 06, 2004 9:40 pm    Post subject: thanks, but need more info Reply with quote

I checked out that thread and the upshot seems to be "Its not a kernel issue, which from Lovechilds post I thought it was, its a devfs issue."

Which is what I'm thinking, but the question is, how do you get the devfs configured properly?

I'm by no means a strong sysadmin, but isn't there some command that tells the system to create all the /dev entries, and if so, is that enough to create the 'md' entries or is something special required?

I've read all these RAID HOWTOs, but the problem is they all talk about building a RAID once you are in the up and running system, not at the liveCD level (for example, they almost all talk about using mdadm which you can't even download until you get to a later stage)

I want to get RAID going in the early stage anyway (and I have) because then I install all my system files I want it going into my existing RAID setup.
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Tue Jul 06, 2004 9:49 pm    Post subject: Reply with quote

Ok here ya go I went looking for this. This is the post I followed when I setup my raid and it was at install time. However I thinkit is based on a 2.4 kernel not sure if it will make a difference though.

https://forums.gentoo.org/viewtopic.php?t=8813&highlight=software+raid+install+mirror
_________________
Come and play in my land
Back to top
View user's profile Send private message
dougco
n00b
n00b


Joined: 06 Jul 2004
Posts: 47
Location: San Francisco

PostPosted: Wed Jul 07, 2004 4:13 pm    Post subject: Reply with quote

Argh, I've tried a number of things and what I'm doing seems to match what people are saying, but it doesn't work.

First, I don't know why grub doesn't just go and do the boot up, instead it sits at it's prompt.

Then I have to type in root, kernel, initrd, etc to get it to boot up but it always fails at trying to mount root and it doesn't seem to see /dev/md1. I copied all the livecd /dev/md* to my drives and that doesn't seem to do the trick. And 'md' I believe is in the kernel since the ram0 does boot to a certain point and I see messages about how it is autoloading md or something like that.

My latest attempt will be to use my 3rd drive and copy all my stage{1,2,3} stuff over to it and try to make it my boot disk. If this works then I will try to RAID my other two drives from there and hopefully move everything over to the new configuration and see if it boots then.

By the way, the various RAID HOWTOs out there have conflicting statements -- some say you can't boot from a RAID, and don't make swap on the RAID, and others say both of these things work fine.
Back to top
View user's profile Send private message
Lajasha
Veteran
Veteran


Joined: 17 Mar 2004
Posts: 1040
Location: Vibe Central

PostPosted: Wed Jul 07, 2004 6:53 pm    Post subject: Reply with quote

Quote:
By the way, the various RAID HOWTOs out there have conflicting statements -- some say you can't boot from a RAID, and don't make swap on the RAID, and others say both of these things work fine.


Yea i have seen this too. I can tell you that do to the nature of grub, (the way it accesses hard drives) You really cant boot from a software array, however you can make the boot partition a mirror which will just write the same to both partitions. For the swap you can also use a mirror setup on them not sure about strip though but I would think it would work however if you loose a hd you will prolly get all kinds of errors in a striped swap.

The mirror ways work and I know this since I have them setup on my home server box.

The one that I posted I know worked for me if you simply take in mind the 2 things above you should be fine.
_________________
Come and play in my land
Back to top
View user's profile Send private message
dougco
n00b
n00b


Joined: 06 Jul 2004
Posts: 47
Location: San Francisco

PostPosted: Sun Jul 18, 2004 12:35 am    Post subject: Reply with quote

OK, I got it working, here are the details for those who stumble across this.

My bootup was having problems identifying the drives, I have SCSI and SATA, and it was a kernel issue. I had to configure my own kernel, not use the genkernel, and make sure to leave out the silicon image SATA since that has a conflict with my Tyan board's Promise (so selecte promise in the kernel config) and of course make sure all these drivers are in the kernel not modules.

Then things came up OK, and you can indeed boot on a RAID array, at least in 2.6.7, just have grub.conf have a fallback of the other drive, like so (my 2 SATA raids are drives 1 & 2):

# Boot automatically after 30 secs.
timeout 10

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

# For booting GNU/Linux
title Gentoo Linux HD1
root (hd1,0)
kernel /gentoo3 root=/dev/md1

# For booting GNU/Linux
title Gentoo Linux HD2
root (hd2,0)
kernel /gentoo3 root=/dev/md1
_________________
--
If you're reading this, then you've gone too far.
Back to top
View user's profile Send private message
dougco
n00b
n00b


Joined: 06 Jul 2004
Posts: 47
Location: San Francisco

PostPosted: Sun Jul 18, 2004 12:36 am    Post subject: Reply with quote

Oh, also note that I am using RAID1, mirroring, so that is why I can boot.

Also, thanks maletek for your help!
_________________
--
If you're reading this, then you've gone too far.
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7730
Location: Underworld

PostPosted: Wed Jul 20, 2005 2:11 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-p-2587699.html
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum