Skip to contentSkip to conversation

re mdadm raid1 creation problems

DISCUSSION rrk 3 participants 4 messages Jun 12, 2004 – Jun 13, 2004 MD RAID

lore
Share & tools
lore

rrk

author
#0 lore raw

sorry my reply's are not making it to the list

the error msg i get is

/dev/md1 file system size ( according to the superblock) is 2560351 the pyhical size of the device is 2560320 either the superblock or the partion table is corrupt

/dev/md1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

i get this msg on the first boot with md1 as the primary boot partion

i thought i was being pretty careful about rebooting after all partion changes

the build order/process is

build and test hda debian 2.4.26 with raid compiled in
sfdisk to transfer partions sfdisk -d /dev/hda | sfdisk /dev/hdc
set hdc partion type to fd
reboot
mk file system on hdc and copy hda to hdc reboot
test hdc as primary boot
reboot
create md1 mdadm --create /dev/md1 --level=1 --raid-devices=2 missing /dev/hdc1
there are 3 md devices / home & var
reboot
mount md device for test
change hda partion type to fd
reboot
edit fstab and grub on md devices
shutdown
boot from mepis rescue disk
mdadm --add /dev/md1 /dev/hda1
wait for resync
shutdown
reboot from md1

thanks
rob

#1 lore raw

rrk,

You say make filesystem on hda, do you really mean you created filesystems hda[123]?

After you edited /etc/boot/grub/menu.lst did you run grub?

You don't need to reboot so often

take a look at:
http://marc.theaimsgroup.com/?l=linux-raid&m=108571782912454&w=2

Jay
----- Original Message -----
From: "rrk" <[email protected]>
To: <[email protected]>
Sent: Saturday, June 12, 2004 5:13 AM
Subject: re mdadm raid1 creation problems

Quoted 50 lines

sorry my reply's are not making it to the list

the error msg i get is

/dev/md1 file system size ( according to the superblock) is 2560351 the pyhical size of the device is 2560320 either the superblock or the partion table is corrupt

/dev/md1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

i get this msg on the first boot with md1 as the primary boot partion

i thought i was being pretty careful about rebooting after all partion changes

the build order/process is

build and test hda debian 2.4.26 with raid compiled in
sfdisk to transfer partions sfdisk -d /dev/hda | sfdisk /dev/hdc
set hdc partion type to fd
reboot
mk file system on hdc and copy hda to hdc reboot
test hdc as primary boot
reboot
create md1 mdadm --create /dev/md1 --level=1 --raid-devices=2 missing
/dev/hdc1
there are 3 md devices / home & var
reboot
mount md device for test
change hda partion type to fd
reboot
edit fstab and grub on md devices
shutdown
boot from mepis rescue disk
mdadm --add /dev/md1 /dev/hda1
wait for resync
shutdown
reboot from md1

thanks
rob

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#2 lore raw
Quoted 6 lines · Jay Strauss

rrk,

You say make filesystem on hda, do you really mean you created filesystems hda[123]?

yes

Quoted 3 lines

After you edited /etc/boot/grub/menu.lst did you run grub?

no i'm wondering if that is somehow part of the problem the error message does not match the data

/dev/md1 file system size (according to the superblock) is 2560351 the pyhical size of the device is 2560320 either the superblock or the partion

is corrupt

note the device size 2560320 ---where did that come from ?

superblock

Quoted 11 lines

dev/hda1:

        Magic : a92b4efc
      Version : 00.90.00
         UUID : cdbefbc6:eae47c90:4bc54343:35b9dfcc

Creation Time : Fri Jun 11 06:29:17 2004
Raid Level : raid1
Device Size : 10241280 (9.77 GiB 10.49 GB)
Raid Devices : 2
Total Devices : 3
You don't need to reboot so often

Quoted 4 lines

take a look at:
http://marc.theaimsgroup.com/?l=linux-raid&m=108571782912454&w=2

mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 hdc1[1] hda1[0]

    10241280 blocks [2/2] [UU]

mdstat and superblock both match as they should be one in the same and when you look at the fdisk partion dump

Disk /dev/hda: 120.0 GB, 120000000000 bytes
255 heads, 63 sectors/track, 14589 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/hda1   *         1      1275  10241406   fd  Linux raid autodetect
/dev/hda2          1276     14589 106944705    5  Extended
/dev/hda5          1276      1676   3221001   fd  Linux raid autodetect
/dev/hda6          1677      2377   5630751   fd  Linux raid autodetect
/dev/hda7          2378      2414    297171   82  Linux swap
/dev/hda8          2415     14589  97795656   fd  Linux raid autodetect

note that the partion size is larger than the superblock size by 126 blocks so where did the 2560320 number come from in the boot error msg the boot process is getting bad data -- how and why -- grub is the boot loader so it must be involved both hardrives appear to be the same.

i read the link you sent -- it was different in some respects however the grub cfg was the same as well as the fstab -- the last raid1 i built was with the 2.4.23 kernel maybe that could be part of the problem

line 16 of the link

16. Reboot and check /proc/mdstat see if you are mirroring

what is the definitive answer for checking the mirroring - - i maybe wrong i thought if you booted off of mdx and mdstat looked good you were mirroring

thanks
rob

Quoted 71 lines

Jay
----- Original Message -----
From: "rrk" <[email protected]>
To: <[email protected]>
Sent: Saturday, June 12, 2004 5:13 AM
Subject: re mdadm raid1 creation problems

Quoted 40 lines

sorry my reply's are not making it to the list

the error msg i get is

/dev/md1 file system size ( according to the superblock) is 2560351 the pyhical size of the device is 2560320 either the superblock or the partion table is corrupt

/dev/md1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

i get this msg on the first boot with md1 as the primary boot partion

i thought i was being pretty careful about rebooting after all partion changes

the build order/process is

build and test hda debian 2.4.26 with raid compiled in
sfdisk to transfer partions sfdisk -d /dev/hda | sfdisk /dev/hdc
set hdc partion type to fd
reboot
mk file system on hdc and copy hda to hdc reboot
test hdc as primary boot
reboot
create md1 mdadm --create /dev/md1 --level=1 --raid-devices=2 missing
/dev/hdc1
there are 3 md devices / home & var
reboot
mount md device for test
change hda partion type to fd
reboot
edit fstab and grub on md devices
shutdown
boot from mepis rescue disk
mdadm --add /dev/md1 /dev/hda1
wait for resync
shutdown
reboot from md1

Quoted 12 lines

thanks
rob

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to rrk
Quoted 4 lines · On Saturday June 12, [email protected] wrote:

sorry my reply's are not making it to the list

the error msg i get is

Quoted 8 lines

/dev/md1 file system size ( according to the superblock) is 2560351 the pyhical size of the device is 2560320 either the superblock or the partion table is corrupt

/dev/md1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

i get this msg on the first boot with md1 as the primary boot partion

2560351 is the size of /dev/hda1 - in separate my to me you included:

Quoted 7 lines

fdisk info
255 heads 63 sectors 14589 cyl
units = cyl of 16065 * 512 = 8225280
dev bootable start end blocks type
/dev/hda1 * 1 1275 10241406 fd

the partion tables are an exact match between hda and hdc

fsck reports 4k blocks, fdisk reports 1k blocks, and
2560351 * 4 == 10241406

So it would appear that you did a "mkfs" on /dev/hda1 (or /dev/hdc1) rather than on /dev/md1. This is the source of your problem. If /dev/md0 is created from /dev/hda1 and /dev/hdc1, then /dev/md1 will be slightly smaller that either /dev/hda1 or /dev/hdc1 (between 64 and 128 K smaller. 124K in your case).

Quoted 11 lines

i thought i was being pretty careful about rebooting after all partion changes

the build order/process is

build and test hda debian 2.4.26 with raid compiled in
sfdisk to transfer partions sfdisk -d /dev/hda | sfdisk /dev/hdc
set hdc partion type to fd
reboot
mk file system on hdc and copy hda to hdc

This was the wrong thing to do.
You should:
create /dev/md1 at this point using exactly the command that you
mention below,
mkfs /dev/md1
mount /dev/md1 /mnt/somewhere
cp -ax / /mnt/somewhere

as md1 will be slightly smaller than hd1, you need to copy the filesystem with 'cp' or similar, you cannot just 'dd' the whole partition.

The rest should then work.

NeilBrown

Quoted 26 lines

reboot
test hdc as primary boot
reboot
create md1 mdadm --create /dev/md1 --level=1 --raid-devices=2 missing
/dev/hdc1
there are 3 md devices / home & var
reboot
mount md device for test
change hda partion type to fd
reboot
edit fstab and grub on md devices
shutdown
boot from mepis rescue disk
mdadm --add /dev/md1 /dev/hda1
wait for resync
shutdown
reboot from md1

thanks
rob

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html