Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mdadm raid1 new install not booting
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
the.root
Apprentice
Apprentice


Joined: 29 Apr 2007
Posts: 210
Location: -84.706059324915, -62.4843750666430

PostPosted: Sun Jun 26, 2011 6:33 am    Post subject: mdadm raid1 new install not booting Reply with quote

Hello,

So forgive me if this is something stupid, I have setup quite a few md raids before but it has been a while.

This is on a fresh install, I've actually started over twice paying close attention to what I'm doing so hopefully its not some simple oversight.

I'm trying to take two drives: sda/sdb and mirror all 4 partitions on them as my system drive/partition set.

However when trying to do the initial boot, it never gets to the init phase. Always seems to choke up around mounting the root partition.

Code:

md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
md: Loading md125: /dev/sda2
md: bind <sda2>
md: bind <sdb2>
bio: create slab <bio-1> at 1
md/raid1:md125: active with 2 out of 2 mirrors
md125: detected capacity change from 0 to 109999882240
md125: unknown partition table
md125: unknown partition table
EXT4-fs (md125): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4) filesystem readonly on device 9:125.
Freeing unused kernel memory: 584k freed
Write protecting the kernel read-only data: 10240k
Freeing unused kernel memory: 128k freed
Freeing unused kernel memory:1404k freed
init-early.sh used greatest stack depth: 4488 bytes left


Now the above is from my latest attempt to use some modified boot perimeters to see if it helped. Namely you'll probably question the raid=noautodetect used, maybe the md125, and the ex4..

I'll try to recall everything I've done and the outcomes, but it may be difficult as I've been toying with this off and on all day.

the above boot excerpt was from adding/changing the boot line to:
kernel /boot/gentoo-2.6.38.r6_1 root=/dev/md125 md=125,/dev/sda2,/dev/sdb2 raid=noautodetect rootfstype=ext4

which seems to be about as far as I can get in the boot process. without that it usually complains about "md2: could not update array. -22" or "md_import_device returned -16".

despite my best efforts it seems to want to call it md125 in bootup. I've tried booting off the live cd and

Code:

md --stop /dev/md12X
md --assemble /dev/mdX /dev/sdX /dev/sdX


with the appropriate values. it didn't seem to help, whenever I boot off of a live cd it reorders and renumbers them in the 12x range, and whenever I boot off my drives, even though i'm calling md2 it autodetects and tries to use md125 ?? either way trying to use the md2 or md125 values in the boot command didnt seem to resolve.

I also booted off the livecd and chrooted into the raid w/out /dev bound and then `MAKEDEV md` - which created all the md devices. That seemingly helped produce a different error message, however did not resolve and allow me to boot.cat /

drive layout..
Code:

sd..1=boot
sd..2=root
sd..3=tmp
sd..4=swap



fdisk -l
Code:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1e6d3949

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      392672      195312+  fd  Linux raid autodetect
/dev/sda2          392673   215236422   107421875   fd  Linux raid autodetect
/dev/sda3       215236423   293361422    39062500   fd  Linux raid autodetect
/dev/sda4       293361423   312581806     9610192   fd  Linux raid autodetect

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x315684c6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      392672      195312+  fd  Linux raid autodetect
/dev/sdb2          392673   215236422   107421875   fd  Linux raid autodetect
/dev/sdb3       215236423   293361422    39062500   fd  Linux raid autodetect
/dev/sdb4       293361423   312581806     9610192   fd  Linux raid autodetect



mdadm.conf
Code:

ARRAY /dev/md1 metadata=0.90 UUID=8bf134de:f5a782cb:cb201669:f728008a
ARRAY /dev/md2 metadata=0.90 UUID=ed299599:a0ffe3d6:cb201669:f728008a
ARRAY /dev/md3 metadata=0.90 UUID=14a54769:a0bf073f:cb201669:f728008a
ARRAY /dev/md4 metadata=0.90 UUID=320bf374:97611428:cb201669:f728008a


/proc/mdstat (off live-cd, skewed md#'s)
Code:

Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md124 : active (auto-read-only) raid1 sda1[0] sdb1[1]
      195200 blocks [2/2] [UU]
     
md125 : active (auto-read-only) raid1 sda3[0] sdb3[1]
      39062400 blocks [2/2] [UU]
     
md126 : active raid1 sdb2[1] sda2[0]
      107421760 blocks [2/2] [UU]
     
md127 : active (auto-read-only) raid1 sdb4[1] sda4[0]
      9610112 blocks [2/2] [UU]
     
unused devices: <none>



grub.conf
Code:

title Gentoo Linux 2.6.38-r6_1b
root (hd0,0)
kernel /boot/gentoo-2.6.38.r6_1 root=/dev/md2 md=2,/dev/sda2,/dev/sdb2 nopic clocksource=hpet



fstab
Code:

/dev/md1                        /boot                           ext2            noauto                  0 0
/dev/md2                        /                               ext4            defaults                0 1
/dev/md3                        /tmp                            ext4            defaults                0 0 

/dev/md4                        none                            swap            sw                      0 0
shm                             /dev/shm                        tmpfs           nodev,nosuid,noexec     0 0               

/dev/cdrom                      /mnt/cdrom                      auto            noauto,user             0 0
/dev/sr0                        /mnt/dvd                        auto            noauto,user             0 0


kernel .config (btw - this is a .config taken from a near identical machine that fully works w/ raid - although its running a much older kernel so it had to update and i only changed a couple non related items in it when recompiling)

Code:

# Generic fallback / legacy drivers
#
# CONFIG_PATA_ACPI is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_LEGACY is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_AUTODETECT=y
CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID456=y
# CONFIG_MULTICORE_RAID456 is not set
CONFIG_MD_MULTIPATH=y
# CONFIG_MD_FAULTY is not set
CONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
# CONFIG_DM_CRYPT is not set
# CONFIG_DM_SNAPSHOT is not set
CONFIG_DM_MIRROR=y
# CONFIG_DM_RAID is not set
# CONFIG_DM_LOG_USERSPACE is not set
CONFIG_DM_ZERO=y
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
# CONFIG_DM_UEVENT is not set
# CONFIG_TARGET_CORE is not set
# CONFIG_FUSION is not set



dmesg..
Code:

sl811: driver sl811-hcd, 19 May 2005
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.19.1-ioctl (2011-01-07) initialised: dm-devel@redhat.com
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
raid6: int64x1   2437 MB/s
scsi 8:0:0:0: Direct-Access     SD/MMC   Card  Reader     1.00 PQ: 0 ANSI: 0
sd 8:0:0:0: Attached scsi generic sg5 type 0
raid6: int64x2   2504 MB/s
sd 8:0:0:0: [sde] 990976 512-byte logical blocks: (507 MB/483 MiB)
sd 8:0:0:0: [sde] Write Protect is off
sd 8:0:0:0: [sde] Mode Sense: 03 00 00 00
sd 8:0:0:0: [sde] Assuming drive cache: write through
sd 8:0:0:0: [sde] Assuming drive cache: write through
 sde: sde1
sd 8:0:0:0: [sde] Assuming drive cache: write through
sd 8:0:0:0: [sde] Attached SCSI removable disk
raid6: int64x4   2027 MB/s
raid6: int64x8   1841 MB/s
raid6: sse2x1    3860 MB/s
raid6: sse2x2    6358 MB/s
raid6: sse2x4    7908 MB/s
raid6: using algorithm sse2x4 (7908 MB/s)
async_tx: api initialized (async)
xor: automatically using best checksumming function: generic_sse
   generic_sse:  9964.800 MB/sec
xor: using function: generic_sse (9964.800 MB/sec)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
md: raid10 personality registered for level 10
JFS: nTxBlock = 8192, nTxLock = 65536
fuse init (API version 7.16)
e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
e1000: Copyright (c) 1999-2006 Intel Corporation.
EXT3-fs (sda2): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sda2): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
EXT3-fs (sda3): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sda3): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
UDF-fs: No partition found (1)
EXT3-fs (sdb2): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sdb2): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
EXT3-fs (sdb3): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sdb3): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (sdb3): mounted filesystem with ordered data mode. Opts: (null)
UDF-fs: No partition found (1)
EXT3-fs: barriers not enabled
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sdc2): mounted filesystem with writeback data mode
EXT3-fs: barriers not enabled
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sdc3): mounted filesystem with writeback data mode
attempt to access beyond end of device
sdc4: rw=0, want=18, limit=2
REISERFS warning (device sdc4): sh-2006 read_super_block: bread failed (dev sdc4, block 8, size 1024)
attempt to access beyond end of device
sdc4: rw=0, want=130, limit=2
REISERFS warning (device sdc4): sh-2006 read_super_block: bread failed (dev sdc4, block 64, size 1024)
attempt to access beyond end of device
sdc4: rw=0, want=4, limit=2
EXT3-fs (sdc4): error: unable to read superblock
attempt to access beyond end of device
sdc4: rw=0, want=4, limit=2
EXT2-fs (sdc4): error: unable to read superblock
attempt to access beyond end of device
sdc4: rw=0, want=4, limit=2
EXT4-fs (sdc4): unable to read superblock
attempt to access beyond end of device
sdc4: rw=0, want=66, limit=2
isofs_fill_super: bread failed, dev=sdc4, iso_blknum=16, block=32
attempt to access beyond end of device
sdc4: rw=0, want=3, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=3, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=18, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=65, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=257, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=513, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=68, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=1028, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=2052, limit=2
UDF-fs: No partition found (1)
attempt to access beyond end of device
sdc4: rw=0, want=72, limit=2
attempt to access beyond end of device
sdc4: rw=0, want=128, limit=2
EXT3-fs: barriers not enabled
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sdc5): mounted filesystem with writeback data mode
UDF-fs: No partition found (1)
EXT3-fs (sdd1): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sdd1): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (sdd1): mounted filesystem with ordered data mode. Opts: (null)
EXT3-fs (sdd2): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (sdd2): error: couldn't mount because of unsupported optional features (240)
EXT4-fs (sdd2): mounted filesystem with ordered data mode. Opts: (null)
udev: starting version 151
udevd (16003): /proc/16003/oom_adj is deprecated, please use /proc/16003/oom_score_adj instead.
md: bind<sda4>
md: bind<sda2>
md: bind<sdb2>
bio: create slab <bio-1> at 1
md/raid1:md126: active with 2 out of 2 mirrors
md126: detected capacity change from 0 to 109999882240
 md126: unknown partition table
md: bind<sdb4>
md/raid1:md127: active with 2 out of 2 mirrors
md127: detected capacity change from 0 to 9840754688
 md127: unknown partition table
md: bind<sdb3>
md: bind<sdb1>
md: bind<sda1>
md/raid1:md124: active with 2 out of 2 mirrors
md124: detected capacity change from 0 to 199884800
 md124: unknown partition table
md: bind<sda3>
md/raid1:md125: active with 2 out of 2 mirrors
md125: detected capacity change from 0 to 39999897600
 md125: unknown partition table
Real Time Clock Driver v1.12b



Any help or questions would be most appreciated! I did scour the forums and try a few suggestions I picked out from similar reports, however it did not resolve my issue (like the mkdev and the stop/reassemble, and some of the boot options). Also - I followed the gentoo software raid setup guide to the T, AFAIK.

Thanks everyone!!
_________________
Ps = (1.5 x 6 x .75) / {(4/3) (pi) [(31.039 x 10^15) (46.5 x 10^9)]^3}
Seems like a waste..
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jun 26, 2011 1:33 pm    Post subject: Reply with quote

the.root,

There have been some nasty changes to the default behaviour of mdadm of late but its seems as if you have spotted them.

What does
Code:
madam -E /dev/sda2
show?
_________________
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
the.root
Apprentice
Apprentice


Joined: 29 Apr 2007
Posts: 210
Location: -84.706059324915, -62.4843750666430

PostPosted: Sun Jun 26, 2011 5:38 pm    Post subject: Reply with quote

NeddySeagoon wrote:
the.root,

There have been some nasty changes to the default behaviour of mdadm of late but its seems as if you have spotted them.

What does
Code:
madam -E /dev/sda2
show?


Well I put my previous drive/build back in primary so I could get the server back up, but here's what sdb2 shows instead:

Code:

polaris ~ # mdadm -E /dev/sdb2
/dev/sdb2:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : ed299599:a0ffe3d6:cb201669:f728008a
  Creation Time : Sat Jun 25 19:21:04 2011
     Raid Level : raid1
  Used Dev Size : 107421760 (102.45 GiB 110.00 GB)
     Array Size : 107421760 (102.45 GiB 110.00 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 126

    Update Time : Sat Jun 25 22:14:22 2011
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 9c11044c - correct
         Events : 20


      Number   Major   Minor   RaidDevice State
this     0       8        2        0      active sync   /dev/sda2

   0     0       8        2        0      active sync   /dev/sda2
   1     1       8       18        1      active sync   /dev/sdb2


Thanks for the fast response!


EDIT

Okay, now i'm slightly more confused.. I ran `fdisk -l` off of my other working hard drive/build in this system and this is what i get..

Code:

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1e6d3949

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          25      195312+  fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2              25       13398   107421875   fd  Linux raid autodetect
Partition 2 does not end on cylinder boundary.
/dev/sdb3           13398       18261    39062500   fd  Linux raid autodetect
Partition 3 does not end on cylinder boundary.
/dev/sdb4           18261       19458     9610192   fd  Linux raid autodetect
Partition 4 does not end on cylinder boundary.

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x315684c6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          25      195312+  fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdc2              25       13398   107421875   fd  Linux raid autodetect
/dev/sdc3           13398       18261    39062500   fd  Linux raid autodetect
/dev/sdc4           18261       19458     9610192   fd  Linux raid autodetect


now if i run it off a live cd..

Code:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1e6d3949

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      392672      195312+  fd  Linux raid autodetect
/dev/sda2          392673   215236422   107421875   fd  Linux raid autodetect
/dev/sda3       215236423   293361422    39062500   fd  Linux raid autodetect
/dev/sda4       293361423   312581806     9610192   fd  Linux raid autodetect

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x315684c6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      392672      195312+  fd  Linux raid autodetect
/dev/sdb2          392673   215236422   107421875   fd  Linux raid autodetect
/dev/sdb3       215236423   293361422    39062500   fd  Linux raid autodetect
/dev/sdb4       293361423   312581806     9610192   fd  Linux raid autodetect


A - why if i copied the partition tables does one drive report more of the "not ending on cylinder boundary" then the other? - especially since its clear its saying each partition is ending on this cylinder and the next one is starting on the same one, thus the error.
B - the livecd fdisk doesnt even show that they are starting/ending on the same one..

which do i believe? to be fair i tried building this system last night from the working environment and off the livecd so i would've used both different fdisks.. Not sure if this is my problem since that's the case.. But maybe??

I guess I've found out the new fdisk goes by sectors and not cylinders.. So that partially explains it.. Each new partition is on the next sector, but still on the same cylinder. I'm hoping thats not a problem? The one fdisk that shows cylinder boundary error is from like a 5yr old build that hasnt really been touched much since.
_________________
Ps = (1.5 x 6 x .75) / {(4/3) (pi) [(31.039 x 10^15) (46.5 x 10^9)]^3}
Seems like a waste..
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jun 26, 2011 7:41 pm    Post subject: Reply with quote

the.root,

Easy things first. From your mdadm -E. Your raid superblock version is Version : 0.90.00, which is good for auto assembly. Its Raid Level : raid1 and
Code:
    Raid Devices : 2
  Total Devices : 2
Preferred Minor : 126
That preferred minor is a bit odd but it explains why auto assemble wants to use /dev/md126.

With regards to your fdisk, I suspect you are looking with two different versions of fdisk.
Code:
Partition X does not end on cylinder boundary.
is a warning, not an error.
Once upon a time when hard drives had head stepper motors and every track had the same number of sectors, (drives <4G) it was common practice to start and finish partitions on cylinder boundaries. With the OS systems common at the time, that made a lot of sense as Cylinder/Head/Sector addressing was common, so it was tidy. It was not a hard requirement, just a convention.

Thus fdisk would work in allocation units of Units = cylinders of 16065 * 512 = 8225280 bytes. Thats 8Mb. Evn that is a simplification because by convention on the PC, the first partition starts at CHS 0/1/0 to leave room for the Master Boot Record. In logical block addressing used today, thats sector 63 as there are
Code:
63 sectors/track

Today, HDD are zoned, with zones near the outside having more sectors per track then zones near the spindle. This makes a complete nonsense of the concept of sectors/track and CHS addressing altogether. Its just a myth perpetuated by old versions of fdisk. This zoning makes the data rate for a drive faster at the outside. In fact, drives are about 2x faster at the outside than near the spindle.

With the dawn of HDD that use physical sectors of 4096 bytes, rater than 512 bytes. Old fdisk became useless to partition these drives as it was set up to start at sector 63, (512bytes) which is not a multiple of 4096. So it made the disks very slow.

In both cases you have
Code:
    Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          25      195312+  fd  Linux raid autodetect

The 195312+ indicates you allocated so many Mb to the partition, rater than a number of cylinders.

At the end
Code:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      392672      195312+  fd  Linux raid autodetect
/dev/sdb2          392673   215236422   107421875   fd  Linux raid autodetect

the numbers are all 1K blocks but I suspect that the /dev/sdb1 * 2048 start is faked. sice we know its sector 63.

Other then different units and different versions of fdisk, I don't see anything to worry about.
I've given up on both fdisk and MSDOS partition tables and moved to parted and GPT as its the way of the future for HDD > 2Tb.

Cylinders and Heads are part of the stuff of myth and legend now. For a very long time hard drives have been treated as a sequence of blocks (sectors). Thats what Logical Block Addressing does. Its up to the drive to locate any logical block its asked for.
For completeness, drives are made with spare sectors. They are not perfect when they are new, so some of the spares are mapped in to make them appear to have no bad sectors. Through life, the drive anticipates sectors about to fail and swaps the data to another spare sector. Thus there is no fixed relationship between logical sectors, which the OS sees and physical sectors on the surface of the drive.
_________________
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
the.root
Apprentice
Apprentice


Joined: 29 Apr 2007
Posts: 210
Location: -84.706059324915, -62.4843750666430

PostPosted: Mon Jun 27, 2011 4:43 am    Post subject: Reply with quote

Thanks Needy for the detailed explanation on how fdisk is reporting the hdd's partitions, good to know.

About the superblock version - I specified that the second time i built the arrays to make sure they were .90 - as I heard that could cause similar problems.

Any ideas on where to go next/try to get this to work? I have quite a few servers needing a new build in raid1; but if there's some bugs or some limitation present I cant work around it's really going to hold me back :( .

Thanks everyone!
_________________
Ps = (1.5 x 6 x .75) / {(4/3) (pi) [(31.039 x 10^15) (46.5 x 10^9)]^3}
Seems like a waste..
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Jun 27, 2011 5:05 pm    Post subject: Reply with quote

the.root,

Take the easy way first. Do mdadm -E on all of your partitions donated to raid sets.
Check the Preferred Minor numbers.

Ensure you don't have the same preferred minor numbers in two different raid sets.

Let kernel raid auto assemble do its thing without any help on the kernel command line. Remove the
Code:
md=2,/dev/sda2,/dev/sdb2
from grub.conf.

Lastly, edit /etc/fstab to use the Preferred Minor numbers in /dev/mdX
In theory it should JustWork.

Post any error messages and if the boot process gets far enough, the output of dmesg too.
_________________
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
the.root
Apprentice
Apprentice


Joined: 29 Apr 2007
Posts: 210
Location: -84.706059324915, -62.4843750666430

PostPosted: Mon Jul 04, 2011 6:33 am    Post subject: Reply with quote

So I found a problem I think..

When I run:
`mdadm -E /dev/sda1` and sdb1 - it tells me it should be /dev/md124
`mdadm -E /dev/sda2` and sdb2 - it tells me it should be /dev/md126
`mdadm -E /dev/sda3` and sdb3 - it tells me it should be /dev/md3
`mdadm -E /dev/sda4` and sdb4 - it tells me it should be /dev/md4

Okay...

So if I run:
`mdadm --detail /dev/md124` it's for sda2/sdb2..
`mdadm --detail /dev/md126` it's for sda4/sdb4..
`mdadm --detail /dev/md125` is for sda1/sdb1
`mdadm --detail /dev/md127` is for sda3/sdb3


md3 and md4 are invalid.

It appears the whole mapping is screwed up and I don't get why or how to fix. How can mdadm examine and detail show me two different devices? I've rebuilt this 3 times per instructions I don't know what I'm doing wrong, I've never had these issues before.

I'm going to keep playing around with it tonight, if anyone has any more suggestions I'm all ears.

Thanks.


EXAMPLE:
Code:
livecd ~ # mdadm -E /dev/sda1; mdadm --detail /dev/md124
/dev/sda1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 8bf134de:f5a782cb:cb201669:f728008a (local to host livecd)
  Creation Time : Sat Jun 25 23:20:58 2011
     Raid Level : raid1
  Used Dev Size : 195200 (190.66 MiB 199.88 MB)
     Array Size : 195200 (190.66 MiB 199.88 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 124

    Update Time : Sun Jun 26 02:19:18 2011
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 891c1df1 - correct
         Events : 18


      Number   Major   Minor   RaidDevice State
this     1       8       17        1      active sync   /dev/sdb1

   0     0       8        1        0      active sync   /dev/sda1
   1     1       8       17        1      active sync   /dev/sdb1
/dev/md124:
        Version : 0.90
  Creation Time : Sat Jun 25 23:21:04 2011
     Raid Level : raid1
     Array Size : 107421760 (102.45 GiB 110.00 GB)
  Used Dev Size : 107421760 (102.45 GiB 110.00 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 124
    Persistence : Superblock is persistent

    Update Time : Mon Jul  4 01:51:36 2011
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : ed299599:a0ffe3d6:cb201669:f728008a (local to host livecd)
         Events : 0.20

    Number   Major   Minor   RaidDevice State
       0       8       18        0      active sync   /dev/sdb2
       1       8        2        1      active sync   /dev/sda2

_________________
Ps = (1.5 x 6 x .75) / {(4/3) (pi) [(31.039 x 10^15) (46.5 x 10^9)]^3}
Seems like a waste..
Back to top
View user's profile Send private message
the.root
Apprentice
Apprentice


Joined: 29 Apr 2007
Posts: 210
Location: -84.706059324915, -62.4843750666430

PostPosted: Mon Jul 04, 2011 8:46 am    Post subject: Reply with quote

Alright, well I got around the issue for now.

I found an old minimal ISO from 03/04/11 and used it. I also ended up creating the partition table with cfdisk and not fdisk because fdisk kept complaining about not ending on cylinders on one drive but not the other (even though the partition table was copied with sfdisk).. Before I could only replicate that error when looking at it with two different fdisk versions. I tried toggling off dos compatibility mode and switching to sectors -u in fdisk but it would still complain.. I don't know if this is related or not, but figured I'd note it.

Afterwards I continued the build the exact same before, and it all went off without a hitch. I don't know if mdadm, udev, whatever is different that solved the problem. Or if it was the whole weird partition stuff mentioned above.

Sorry I didn't have more time to really find the culprit. Maybe I can find time in the next week or so to go back on another machine, I can apparently replicate it everytime I attempted a build from a recent minimal-iso.

Thanks everyone.
_________________
Ps = (1.5 x 6 x .75) / {(4/3) (pi) [(31.039 x 10^15) (46.5 x 10^9)]^3}
Seems like a waste..
Back to top
View user's profile Send private message
anest
n00b
n00b


Joined: 12 Mar 2007
Posts: 31

PostPosted: Mon Oct 22, 2012 7:36 pm    Post subject: Re: mdadm raid1 new install not booting Reply with quote

You can call it as necrophilia, but just in case:

the.root wrote:

... However when trying to do the initial boot, it never gets to the init phase. Always seems to choke up around mounting the root partition.

... kernel .config (btw - this is a .config taken from a near identical machine that fully works w/ raid - although its running a much older kernel so it had to update and i only changed a couple non related items in it when recompiling)

Quote:

...
# CONFIG_DM_SNAPSHOT is not set
CONFIG_DM_MIRROR=y
# CONFIG_DM_RAID is not set
# CONFIG_DM_LOG_USERSPACE is not set
CONFIG_DM_ZERO=y
...



So, i hope it's somehow can help someone, someday...
ps: after moving config from old kernel to new, you must do 'make oldconfig' before start compiling, don't forget, it's imported! ...just a tip.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Oct 22, 2012 8:48 pm    Post subject: Reply with quote

anest,

Close but no cigar. The kernel can support two sorts of raid
Device Mapper Raid, enabled by CONFIG_DM_RAID amd Kernel or Multiple Device raid which is CONFIG_MD in the kernel.
DM Raid is for BIOS assisted fakeraid. MD raid is for kernel raid.
_________________
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