Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fdisk & raid, potential for murder
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
h_w_s_b
n00b
n00b


Joined: 21 Sep 2005
Posts: 5

PostPosted: Thu Sep 29, 2005 7:18 pm    Post subject: fdisk & raid, potential for murder Reply with quote

Please forgive me if this has been addresssed somewhere, my eyes have gone crooked from scouring through this forum. Upon (finally) getting lilo to run on my raid array, i was looking at fdisk and the nodes i created to manage the raid partitions.

my question is this: when partitioning disks that will be in a raid array, do you create the partitions on each physical disk and then put them into their respective raid arrays,

or do you create the raid arrays FIRST, then use fdisk to create partitions on the separate arrays?

EXAMPLE:

is it:

fdisk /dev/sda etc....
then mdadm?

or:

mdadm --create etc....
then fdisk /dev/md0?

does it make a difference? i'm not even sure if you can do it the second way, but if i run 'fdisk /dev/md0' it opens md0, but nothing is displayed(as it should be, since i created the partitions and raid'ed them afterwords)

and if this is just plain retarded, i won't be surprised.. so feel free to tell me. and thanks for the help! :lol:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Thu Sep 29, 2005 8:15 pm    Post subject: Reply with quote

h_w_s_b,

If you are using dmraid (BIOS Raid) you put the drives into the raid array in the BIOS then partition the resulting raid drive.
With kernel raid, you partition the drives, put them into the raid sets then make the filesystems om the /dev/mdX
In both cases the order is important.

With BIOS raid, all partitions are the same raid level, since its the disks that are raided.
With kernel raid you put the partitons into raid sets, which allows different filesystems to have different raid levels.
This means you can make /boot raid1 so grub works and others raid0 for speed and space, all on the same drives.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
h_w_s_b
n00b
n00b


Joined: 21 Sep 2005
Posts: 5

PostPosted: Thu Sep 29, 2005 9:19 pm    Post subject: Reply with quote

NeddySeagoon wrote:
If you are using dmraid (BIOS Raid) you put the drives into the raid array in the BIOS then partition the resulting raid drive.
With kernel raid, you partition the drives, put them into the raid sets then make the filesystems om the /dev/mdX
In both cases the order is important.


ok. here's what i have:

tyan thunder k8sr(s2881) /w an opteron 246
(2) WD raptors, raid0
(2) Maxtor 300g 7200rpm, raid1

my disks are laid out like:

md0- raid1 - sda1+sdb1 - /boot
md1- raid1 - sda2+sdb2 - free space
md2- raid0 - sdc1+sdd1 - old /boot, before i discovered bootloaders hate raid0
md3- raid0 - sdc2+sdd2 - swap
md4- raid0 - sdc3+sdd3 - /

originally, the raid0 drives + raid1 drives were in each other's physical locations. ie., the old /boot was 0,0. thankfully, i just swapped them, and nothing bad happened.

these are set up through the silicon image controller..... now, how should they have appeared in /dev? as it was, they were sda, sdb, sdc, & sdd. i then partitioned them, creating sda1 + sdb1(etc..), and made the partitions into raid arrays with mdadm. 1st question: does this mean i fucked up? was there a different location for these drives already in /dev, and i didn't need to use mknod?
2nd question: if i have duplicated what the bios may have already done, does that mean that i could change the SI controller back to 'ultra' (in bios) and use my existing mdadm configuration? i have scoured this forum for what to make sure is compiled into the kernel, and have compiled it and copied the image successfully.

Quote:
With BIOS raid, all partitions are the same raid level, since its the disks that are raided.
With kernel raid you put the partitons into raid sets, which allows different filesystems to have different raid levels.
This means you can make /boot raid1 so grub works and others raid0 for speed and space, all on the same drives.


i think i see what is happening. when i attempt to load my kernel, i get a panic that says:

Kernel panic-not syncing:VFS:Unable to mount root fs on unknown-block(9,4)

when md runs at boot, it works correctly for the first set of partitions, but then assigns different md's to the arrays then what i had originally set up in the chrooted environment. the (9,4) must be from my mknod config, the / partition was on the md that used 9 4.

so have i royally screwed myself, or can this be salvaged? it seems like it wants to go...


EDIT: indeed, that is what i did... set it for bios raid, but configured it for kernel raid... upon switching raid off in bios, i do still get the same kernel panic... :oops:
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Thu Sep 29, 2005 10:13 pm    Post subject: Reply with quote

h_w_s_b,

unknown-block(9,4) is /dev/md4 see /usr/src/linux/Documentation/devices.txt

It suggests that your kernel does not include the filesystem to read the root partition - it must not be a module.
Your /dev entries should include /dev/sda, /dev/sdb (and the indivisual partions) and /dev/mdX. You only use /dev/mdX of course.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
h_w_s_b
n00b
n00b


Joined: 21 Sep 2005
Posts: 5

PostPosted: Thu Sep 29, 2005 10:30 pm    Post subject: Reply with quote

Quote:
unknown-block(9,4) is /dev/md4 see /usr/src/linux/Documentation/devices.txt

It suggests that your kernel does not include the filesystem to read the root partition - it must not be a module.
Your /dev entries should include /dev/sda, /dev/sdb (and the indivisual partions) and /dev/mdX. You only use /dev/mdX of course.


yeah, (9,4) is supposed to be md4. that's where i put / when installing. the filesystem is only ext2, and as far as i saw everything that said ext2 in the kernel was *.

what seems to be the problem is that during kernel load md attempts to put a different raid array on md4 than what it should be. specifically, it is assigning what should be md1(sda2+sdb2) to md4.

so, should i just let it re-arrange my md #s, and alter fstab accordingly?


thanks for all your help neddy!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Fri Sep 30, 2005 2:14 pm    Post subject: Reply with quote

h_w_s_b,

Altering /etc/fstab is only a part of the potential solution. It won't help you boot.
The root filesystem is located from the kernel line.

You need to fix the kernel line in grub.conf, /etc/fstab and /etc/raidtab

You can upgrade your ext2 root to ext3 if you wish. See
Code:
man tune2fs
You will need ext3fs support in the kernel you use it as ext3.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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