Re: invalid (zero) superblock magic upon creation of a new RAID-1 array

2006-11-06 Thread Nix
On 6 Nov 2006, Thomas Andrews uttered the following:
 Thanks Neil, I fixed my problem by creating the raid set using the -e
 option:

 mdadm -C /dev/md0 -e 0.90 --level=raid1 --raid-devices=2  /dev/sda1 
 /dev/sdb1

 You're suggestion to use mdadm to assemble the array is not an option
 for me because it is the root partition that is raided, but thanks for
 putting me in the right direction.

You can still use mdadm to assemble root filesystems: you just need
an initramfs or initrd to do the work before / is mounted. (As a
bonus you can fsck it before it's mounted, as well.)

Most distros have tools that can do this for you, or you can do it by
hand (see e.g. http://linux-raid.osdl.org/index.php/RAID_Boot).

-- 
`When we are born we have plenty of Hydrogen but as we age our
 Hydrogen pool becomes depleted.'
-
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


Re: invalid (zero) superblock magic upon creation of a new RAID-1 array

2006-11-06 Thread Neil Brown
On Monday November 6, [EMAIL PROTECTED] wrote:
 On Mon, Nov 06, 2006 at 09:17:26AM +1100, Neil Brown wrote:
  You mdadm to assemble the array, it is more flexible than auto-detect.
 
 Thanks Neil, I fixed my problem by creating the raid set using the -e
 option:
 
 mdadm -C /dev/md0 -e 0.90 --level=raid1 --raid-devices=2  /dev/sda1 
 /dev/sdb1
 
 You're suggestion to use mdadm to assemble the array is not an option
 for me because it is the root partition that is raided, but thanks for
 putting me in the right direction.

You can use mdadm to assemble the root partition with suitable
initramfs magic, and I gather most distributions use initramfs (or
initrd) by default now.  But getting the magic to work isn't always as
straight forward as you would like.

You solution is should work fine so stick with it.

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


invalid (zero) superblock magic upon creation of a new RAID-1 array

2006-11-05 Thread Thomas Andrews
Hi

Why would the superblock magic be zero on a newly created RAID-1 set?

I get this error when the kernel (2.6.17.7) boots:

md: Autodetecting RAID arrays.
md: invalid raid superblock magic on sda1, found 0x0 not 0xa92b4efc
md: sda1 has invalid sb, not importing!
md: invalid raid superblock magic on sda2, found 0x0 not 0xa92b4efc
md: sda2 has invalid sb, not importing!
md: invalid raid superblock magic on sdb1, found 0x0 not 0xa92b4efc
md: sdb1 has invalid sb, not importing!
md: invalid raid superblock magic on sdb2, found 0x0 not 0xa92b4efc
md: sdb2 has invalid sb, not importing!
md: autorun ...
md: ... autorun DONE.

(I modified md.c so that it prints out found  not 0xa92b4efc)

I have a monolithic kernel, compiled for RAID-1.

Once the system is up and running, mdadm brings up the RAID arrays fine:

# cat /proc/mdstat
Personalities : [raid1] 
md1 : active raid1 sda2[0] sdb2[1]
  506036 blocks super 1.0 [2/2] [UU]
  
md0 : active raid1 sda1[0]
  312062456 blocks super 1.0 [2/1] [U_]
  
unused devices: none

It is deliberately degraded, so that I can boot until I fix this problem.

# dpkg -l mdadm | grep mdadm
ii  mdadm  2.5.3.git200608202239-7 tool to administer Linux MD arrays 
(software RAID)

I've re-created the RAID set a couple of times just to make sure that I
did it correctly. Here's how:

mdadm -C /dev/md0 --level=raid1 --raid-devices=2  /dev/sda1 missing

As I understand it, this can't be an issue with my config files, because
the error occurs *before* the filesystem is mounted.

# fdisk -l /dev/sd[a-z]

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   *   1   38850   312062593+  fd  Linux raid 
autodetect
/dev/sda2   38851   38913  506047+  fd  Linux raid 
autodetect

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *   1   38850   312062593+  fd  Linux raid 
autodetect
/dev/sdb2   38851   38913  506047+  fd  Linux raid 
autodetect

Some info about the (brand new) disks:

# hdparm -I /dev/sda

ATA device, with non-removable media
Model Number:   WDC WD3200YS-01PGB0 
Serial Number:  WD-WCAPD2664999
Firmware Revision:  21.00M21
Standards:
Supported: 7 6 5 4 
Likely used: 7
Configuration:
Logical max current
cylinders   16383   16383
heads   16  16
sectors/track   63  63
--
CHS current addressable sectors:   16514064
LBAuser addressable sectors:  268435455
LBA48  user addressable sectors:  625142448
device size with M = 1024*1024:  305245 MBytes
device size with M = 1000*1000:  320072 MBytes (320 GB)


Many thanks,
Thomas
-
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


Re: invalid (zero) superblock magic upon creation of a new RAID-1 array

2006-11-05 Thread Neil Brown
On Sunday November 5, [EMAIL PROTECTED] wrote:
 Hi
 
 Why would the superblock magic be zero on a newly created RAID-1 set?
 
 I get this error when the kernel (2.6.17.7) boots:
 
 md: Autodetecting RAID arrays.
 md: invalid raid superblock magic on sda1, found 0x0 not 0xa92b4efc
 md: sda1 has invalid sb, not importing!
 md: invalid raid superblock magic on sda2, found 0x0 not 0xa92b4efc
 md: sda2 has invalid sb, not importing!
 md: invalid raid superblock magic on sdb1, found 0x0 not 0xa92b4efc
 md: sdb1 has invalid sb, not importing!
 md: invalid raid superblock magic on sdb2, found 0x0 not 0xa92b4efc
 md: sdb2 has invalid sb, not importing!
 md: autorun ...
 md: ... autorun DONE.
 
 (I modified md.c so that it prints out found  not 0xa92b4efc)
 
 I have a monolithic kernel, compiled for RAID-1.
 
 Once the system is up and running, mdadm brings up the RAID arrays fine:
 
 # cat /proc/mdstat
 Personalities : [raid1] 
 md1 : active raid1 sda2[0] sdb2[1]
   506036 blocks super 1.0 [2/2] [UU]
  ^

in-kernel autodetect (based on partition types FD) only works for
version 0.90 superblocks.

You mdadm to assemble the array, it is more flexible than auto-detect.

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


Re: invalid (zero) superblock magic upon creation of a new RAID-1 array

2006-11-05 Thread Thomas Andrews
On Mon, Nov 06, 2006 at 09:17:26AM +1100, Neil Brown wrote:

 On Sunday November 5, [EMAIL PROTECTED] wrote:

  Why would the superblock magic be zero on a newly created RAID-1 set?
  
  I get this error when the kernel (2.6.17.7) boots:
  
  md: Autodetecting RAID arrays.
  md: invalid raid superblock magic on sda1, found 0x0 not 0xa92b4efc
  md: sda1 has invalid sb, not importing!
  md: invalid raid superblock magic on sda2, found 0x0 not 0xa92b4efc
  md: sda2 has invalid sb, not importing!
  md: invalid raid superblock magic on sdb1, found 0x0 not 0xa92b4efc
  md: sdb1 has invalid sb, not importing!
  md: invalid raid superblock magic on sdb2, found 0x0 not 0xa92b4efc
  md: sdb2 has invalid sb, not importing!
  md: autorun ...
  md: ... autorun DONE.
  
  (I modified md.c so that it prints out found  not 0xa92b4efc)
  
  I have a monolithic kernel, compiled for RAID-1.
  
  Once the system is up and running, mdadm brings up the RAID arrays fine:
  
  # cat /proc/mdstat
  Personalities : [raid1] 
  md1 : active raid1 sda2[0] sdb2[1]
506036 blocks super 1.0 [2/2] [UU]
   ^
 
 in-kernel autodetect (based on partition types FD) only works for
 version 0.90 superblocks.
 
 You mdadm to assemble the array, it is more flexible than auto-detect.

Thanks Neil, I fixed my problem by creating the raid set using the -e
option:

mdadm -C /dev/md0 -e 0.90 --level=raid1 --raid-devices=2  /dev/sda1 
/dev/sdb1

You're suggestion to use mdadm to assemble the array is not an option
for me because it is the root partition that is raided, but thanks for
putting me in the right direction.

Regards,
Thomas
-
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