linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re mdadm  raid1 creation problems
@ 2004-06-12 10:13 rrk
  2004-06-12 12:58 ` Jay Strauss
  2004-06-13 10:15 ` Neil Brown
  0 siblings, 2 replies; 4+ messages in thread
From: rrk @ 2004-06-12 10:13 UTC (permalink / raw)
  To: linux-raid

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: re mdadm  raid1 creation problems
  2004-06-12 10:13 re mdadm raid1 creation problems rrk
@ 2004-06-12 12:58 ` Jay Strauss
  2004-06-13  9:26   ` rrk
  2004-06-13 10:15 ` Neil Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Jay Strauss @ 2004-06-12 12:58 UTC (permalink / raw)
  To: rrk, linux-raid

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" <rrk@prairie.lakes.com>
To: <linux-raid@vger.kernel.org>
Sent: Saturday, June 12, 2004 5:13 AM
Subject: re mdadm raid1 creation problems


> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: re mdadm  raid1 creation problems
  2004-06-12 12:58 ` Jay Strauss
@ 2004-06-13  9:26   ` rrk
  0 siblings, 0 replies; 4+ messages in thread
From: rrk @ 2004-06-13  9:26 UTC (permalink / raw)
  To: linux-raid

Jay Strauss wrote:

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

>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

>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
>
>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



>Jay
>----- Original Message ----- 
>From: "rrk" <rrk@prairie.lakes.com>
>To: <linux-raid@vger.kernel.org>
>Sent: Saturday, June 12, 2004 5:13 AM
>Subject: re mdadm raid1 creation problems
>
>
>  
>
>>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 majordomo@vger.kernel.org
>>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 majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>  
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: re mdadm  raid1 creation problems
  2004-06-12 10:13 re mdadm raid1 creation problems rrk
  2004-06-12 12:58 ` Jay Strauss
@ 2004-06-13 10:15 ` Neil Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Neil Brown @ 2004-06-13 10:15 UTC (permalink / raw)
  To: rrk; +Cc: linux-raid

On Saturday June 12, rrk@prairie.lakes.com wrote:
> 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

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

> 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).

> 
> 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


> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-06-13 10:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-12 10:13 re mdadm raid1 creation problems rrk
2004-06-12 12:58 ` Jay Strauss
2004-06-13  9:26   ` rrk
2004-06-13 10:15 ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).