Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#329892 - 07/02/2010 20:55 Need some help with Linux softwart RAID
StigOE
addict

Registered: 27/10/2002
Posts: 568
Hi, all.

I have a problem with my firewall running Linux with software RAID and figured someone here would probably know how I can fix the problem.

I have 2 RAID partitions, md0 (consisting of sda5 and sdb5) and md1 (consisting of sda3 and sdb2).

I upgraded the BIOS on the motherboard and the SATA settings were set to the wrong value, causing the bootup to not pass the raid assembly. I connected the drives to another system to make sure that the raid was ok, but then it was assembled as md2 and md3. I've later found the problem with the BIOS setting and set the raid partition back to md0 and md1, but something is wrong and it can't mount / and I'm not able to find out how to fix it.

During boot, I get:

md: Autodetecting RAID arrays.
md: autorun ...
md: considering sdb5 ...
md: adding sdb5 ...
md: sdb2 has different UUID to sdb5
md: adding sda5 ...
md: sda3 has different UUID to sdb5
md: created md0
md: bind<sda5>
md: bind<sdb5>
md: running: <sdb5><sdb5>
raid1: raid set md0 active with 2 out of 2 mrrors
md: considering sdb2 ...
md: considering sda3 ...
md: md0 already running, cannot run sdb2
md: export_rdev(sda3)
md: export_rdev(sdb2)
md: ... autorun DONE
md: Autodetecting RAID arrays.
md: autorun ...
md: considering sdb2 ...
md: adding sdb2 ...
md: adding sda3 ...
md: md0 already running, cannot run sdb2
md: export_rdev(sda3)
md: export_rdev(sdb2)
md: ... autorun DoNE
Creating block devices
Creating root device
Mounting root filesystem
EXT3-fs: unable to rewad superblock
mount: error 22 mounting ext3
Switching to new root
switchroot: mount failed: 22
Kernel panic - not syncing: Attempted to kill init!

So it looks like it tries to create 2 instances of md0. How can I get it to create md0 and md1?

TIA, Stig

Top
#329893 - 07/02/2010 21:10 Re: Need some help with Linux softwart RAID [Re: StigOE]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Quote:
md0 (consisting of sda5 and sdb5) and md1 (consisting of sda3 and sdb2).


Boot with these kernel options:

md=0,1,,0,/dev/sda5,/dev/sdb5 md=1,1,,0,/dev/sda3,/dev/sdb2

You *may* need to also fill in the missing parameter between the two adjacent commas, with the RAID "chunk size". But try without first.

I'm assuming RAID1 for both arrays (second parameter).

-ml

Top
#329894 - 07/02/2010 22:44 Re: Need some help with Linux softwart RAID [Re: mlord]
StigOE
addict

Registered: 27/10/2002
Posts: 568
Thanks, Mark.

Tried this, same problem. No change at all... frown

Edit: I think I might have found the problem with it trying to create both as md0. I booted from a USB stick and ran 'mdadm --examine --scan --verbose' and it came up with two arrays, which is correct, but they both showed up as /dev/md0. The rest was correct. How can I rename one of them to /dev/md1?

Edit2: I tried 'mdadm --assemble /dev/md1 /dev/sdb2 /dev/sda3', stopped it and it was still showing as md0.

Stig


Edited by StigOE (07/02/2010 23:13)

Top
#329902 - 08/02/2010 06:32 Re: Need some help with Linux softwart RAID [Re: StigOE]
StigOE
addict

Registered: 27/10/2002
Posts: 568
Managed to fix the problem.

I did 'mdadm --assemble /dev/md1 --super-minor=1 --update=super-minor /dev/sdb2 /dev/sda3' and this time it worked. Yay!

Stig

Top