Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting from BIOS-PC GPT FS + RAID and LVM problems
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
patd44
n00b
n00b


Joined: 29 Jul 2012
Posts: 1

PostPosted: Sun Jul 29, 2012 9:49 am    Post subject: Booting from BIOS-PC GPT FS + RAID and LVM problems Reply with quote

Hi all,

This isn't exactly a n00b question, most of the grunt work has been done, I'm just missing some bits to make all of this work and some help would be greatly appreciated, if there is more info needed, let me know, would really like to know why this is failing.

I'm currently migrating from 2X 1.5TB drives to 2X 3TB drives thus requiring me to go to GPT. What I have accomplished is the following

- Created the GPT Partition Map
- Created the partitions
- MDADM'ed the Paritions togther in a RAID-1 Config
-- /Boot - 100MB - /dev/md10
-- /tmp - 4GB - /dev/md11
-- SWAP - 4GB
-- / - 40GB - /dev/md12
-- LVM Partiton 2.7TB - /dev/md13

- I've added my new LVM /dev/md13 device to the existing LVM pool and migrated my extents to the new volume
- I've copied my system files to /dev/md12
- I've copied my boot to /dev/md10
- I've successfully installed grub2 with an MS-Dos boot partition to /dev/md10 with each underlying /dev(sdc-sdd) also having each been grubed in case of disk failure
-- I have confirmed that the UUID of the boot and root correspond to the UUID of the respective /dev/mdX devices

the problem is the following:

- upon reboot, no matter what I do, I cannot get the new raid devices to activate correctly
-- when I do mdadm --stop /dev/mdX then mdadm --assemble --scan everything comes back without a re-sync (ignore /dev/md1)
Code:

de ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [multipath]
md1 : inactive sdb2[1](S)
      8008320 blocks
       
md13 : inactive sdd5[1](S)
      2876681216 blocks super 1.2
       
md10 : inactive sdd1[1](S)
      102336 blocks super 1.2
       
md11 : inactive sdd3[1](S)
      4189184 blocks super 1.2
       
md12 : inactive sdd4[1](S)
      44926976 blocks super 1.2
       
md122 : active raid1 sdb1[1] sda1[0]
      104320 blocks [2/2] [UU]
     
md2 : active raid1 sdb3[1] sda3[0]
      15004608 blocks [2/2] [UU]
     
md3 : active raid1 sdb5[1] sda5[0]
      8008256 blocks [2/2] [UU]
     
md5 : active raid0 sdb7[1] sda7[0]
      2828001792 blocks 256k chunks
     
md126 : active raid1 sdb6[1] sda6[0]
      20008832 blocks [2/2] [UU]
     
unused devices: <none>
de ~ # mdadm --stop /dev/md10
mdadm: stopped /dev/md10
de ~ # mdadm --stop /dev/md11
mdadm: stopped /dev/md11
de ~ # mdadm --stop /dev/md12
mdadm: stopped /dev/md12
de ~ # mdadm --stop /dev/md13
mdadm: stopped /dev/md13

de ~ # mdadm --assemble --scan
mdadm: /dev/md1 is already in use.
mdadm: /dev/md/10 has been started with 2 drives.
mdadm: /dev/md/11 has been started with 2 drives.
mdadm: /dev/md/12 has been started with 2 drives.
mdadm: /dev/md/13 has been started with 2 drives.
mdadm: /dev/md1 is already in use.

de ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] [multipath]
md10 : active raid1 sdc1[0] sdd1[1]
      102272 blocks super 1.2 [2/2] [UU]
     
md13 : active raid1 sdc5[0] sdd5[1]
      2876681024 blocks super 1.2 [2/2] [UU]
     
md12 : active raid1 sdc4[0] sdd4[1]
      44926848 blocks super 1.2 [2/2] [UU]
     
md11 : active raid1 sdc3[0] sdd3[1]
      4189120 blocks super 1.2 [2/2] [UU]
     
md1 : inactive sdb2[1](S)
      8008320 blocks
       
md122 : active raid1 sdb1[1] sda1[0]
      104320 blocks [2/2] [UU]
     
md2 : active raid1 sdb3[1] sda3[0]
      15004608 blocks [2/2] [UU]
     
md3 : active raid1 sdb5[1] sda5[0]
      8008256 blocks [2/2] [UU]
     
md5 : active raid0 sdb7[1] sda7[0]
      2828001792 blocks 256k chunks
     
md126 : active raid1 sdb6[1] sda6[0]
      20008832 blocks [2/2] [UU]


- I get "grub2 invalid arch independent elf magic" when booting off the new GPT setup, which I suspect is related to the MDADM devices not activating after reboot

here is a bunch of technical info to help you guys out

Partition setup
Code:

de ~ # gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdc: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2A89DD9D-3D50-4A2B-BA15-9BF20C55A2FE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 8-sector boundaries
Total free space is 9099 sectors (4.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206848   100.0 MiB   FD00  primary
   2          208896         8599552   4.0 GiB     FD00  primary
   3         8601600        16984064   4.0 GiB     FD00  primary
   4        16986112       106905600   42.9 GiB    FD00  primary
   5       106907648      5860532223   2.7 TiB     FD00  primary
   6              34            2047   1007.0 KiB  EF02  BIOS boot partition

Command (? for help):


UUID and relevant Grub.cfg info
This was set when I did grub2-install
Grub2-Install :
Quote:

de / # grub2-install --modules="part_gpt fat ext2 mdraid09" --no-floppy /dev/sdc
Installation finished. No error reported.
de / # grub2-install --modules="part_gpt fat ext2 mdraid09" --no-floppy /dev/sdd
Installation finished. No error reported.

Code:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d2fbef5a-49ed-42d2-84f6-0f4dd11e2c22' {
   load_video
   set gfxpayload=keep
   insmod gzio
   insmod part_gpt
   insmod part_gpt
   insmod diskfilter
   insmod mdraid1x
   insmod ext2
   set root='mduuid/d5e60418279c54cd9ba4cb8c470b49dc'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint='mduuid/d5e60418279c54cd9ba4cb8c470b49dc'  503771eb-0d63-4cc6-801f-987727a21cbc
   else
     search --no-floppy --fs-uuid --set=root 503771eb-0d63-4cc6-801f-987727a21cbc
   fi
   echo   'Loading Linux x86_64-2.6.39-hardened-r12 ...'
   linux   /kernel-genkernel-x86_64-2.6.39-hardened-r12 root=UUID=d2fbef5a-49ed-42d2-84f6-0f4dd11e2c22 ro 
   echo   'Loading initial ramdisk ...'
   initrd   /initramfs-genkernel-x86_64-2.6.39-hardened-r12
}

de / # grub2-probe -d --target=fs_uuid /dev/md10
503771eb-0d63-4cc6-801f-987727a21cbc

de / # grub2-probe -d --target=fs_uuid /dev/md12
d2fbef5a-49ed-42d2-84f6-0f4dd11e2c22


/etc/mdadm.conf
Code:

..... (truncated commented section)
# If the lines are not found, mdadm will exit quietly
#MAILADDR root@mydomain.tld
#PROGRAM /usr/sbin/handle-mdadm-events
ARRAY /dev/md122 UUID=65f4a822:b0766c31:776c2c25:004bd7b2
ARRAY /dev/md1 UUID=74bfd2d0:65f76f44:776c2c25:004bd7b2
ARRAY /dev/md2 UUID=204d6391:fec34ae5:776c2c25:004bd7b2
ARRAY /dev/md3 UUID=601fe5bf:27e8d561:776c2c25:004bd7b2
ARRAY /dev/md126 UUID=24ff0a66:8da0b3d0:776c2c25:004bd7b2
ARRAY /dev/md5 UUID=85de33f7:f0fe1f29:776c2c25:004bd7b2
ARRAY /dev/md/10 metadata=1.2 UUID=d5e60418:279c54cd:9ba4cb8c:470b49dc name=de:10
ARRAY /dev/md/11 metadata=1.2 UUID=cd698a3f:998acc09:e77aa721:8c0a45da name=de:11
ARRAY /dev/md/12 metadata=1.2 UUID=7c7a0a2c:8f956dd6:00bfe56b:34d0bb5e name=de:12
ARRAY /dev/md/13 metadata=1.2 UUID=7b4a10c8:f6417d9d:2b158302:38de3c3c name=de:13


Current grub.conf

To make sure I truly did have mdadm support in my initfs I changed my normal boot to an already existing initfs. my original 1 default is the 3 commented out lines without the initfs since the mdadm modules are compiled in kernel, actually just about everything is compiled in kernel and I dont use modules since *I personally* hate modules and want have what I need in kernel.

currently I am booted off the initfs which boots off my mdX devices

Code:

de ~ # cat /boot/grub/grub.conf
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 1
timeout 5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 2.6.39-r8
root (hd0,0)
kernel /boot/2.6.39-hardened-r8 root=/dev/md126

title Gentoo Linux 2.6.39-r12
root (hd0,0)
kernel /boot/2.6.39-hardened-r12 root=/dev/ram0 real_root=/dev/md126 dolvm domdadminitrd
initrd /boot/initramfs-genkernel-x86_64-2.6.39-hardened-r12

#title Gentoo Linux 2.6.39-r12
#root (hd0,0)
#kernel /boot/2.6.39-hardened-r12 root=/dev/md126                               

title Gentoo Linux Encrypted Hardened
root (hd0,0)
kernel /boot/2.6.39-hardened-r12 root=/dev/ram0 real_root=/dev/mapper/root crypt_root=/dev/vg_vm/de-system dolvm domdadm
initrd /boot/initramfs-genkernel-x86_64-2.6.39-hardened-r12

title Gentoo Linux Encrypted Hardened -test
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-2.6.39-hardened-r12 root=/dev/ram0 real_root=/dev/mapper/root crypt_root=/dev/vg_vm/de-system dolvm domdadm
initrd /boot/initramfs-genkernel-x86_64-2.6.39-hardened-r12


# vim:ft=conf:
de ~ #


/etc/fstab
Code:

de ~ # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>         <mountpoint>   <type>      <opts>      <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/md0      /boot      auto      noatime   1 2
/dev/md4      /      auto      noatime      0 1
/dev/md1      none      swap      sw      0 0
/dev/md3      /mnt/tmp   auto      noauto,ro   0 0
/dev/mapper/vg_vm-ISO_Images /ISO       auto            noatime         0 0

_________________
MCSE - Minesweeper Consultant and Solitaire Expert
Back to top
View user's profile Send private message
mbjr
Guru
Guru


Joined: 17 Jan 2004
Posts: 531
Location: Budapest/Hungary

PostPosted: Sun Aug 05, 2012 11:17 am    Post subject: Reply with quote

Hi there,

I failed not to notice that your current grub entry is missing the initramfs configuration - may be for a reason.
Do you get anything meaningful from the kernel at boot time (i.e. start with quiet)?

Ta,
_________________
mb
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