You are not logged in.

#1 2008-11-10 21:43:25

tiny
Member
Registered: 2008-11-10
Posts: 11

RAID1 + LVM no workee

Hi. I've recently installed Arch on my lappy and I liked it so much,
I decided to switch distro on my workstation also. But here the problems started.

I downloaded latest install image. I tried with both. Ftp and Core image.

This is the error I get:

:: Running Hook [raid]
:: Running Hook [keymap]
:: Loading keymap...done.
:: Running Hook [lvm2]
device-mapper:uevent: version 1.0.3
device-mapper: ioctl: 4.14.0-ioctl (2008-04-23) initialised: dm-devel@redhat.com
mknod: File exists
Scanning logical volumes...
  Reading all pysical volumes. This may take a while...
Activating logical volumes...
:: Running Hook [filesystem]
:: Loading root filesystrem module...
Attempting to create root device '/dev/mapper/array-root'
ERROR: Failed to parse block device name for '/dev/mapper/array-root'
unknown
ERROR: root fs cannot be detected.  Try using the rootfstype= kernel parameter.
Waiting for devices to settle...done.

Root device '/dev/mapper/array-root' desn't exist, attempting to create it
ERROR: Failed to parse block device name for '/dev/mapper/array-root'
ERROR: Unable to create/detect root device '/dev/mapper/array-root;
Dropping to a recovery shell ...

I've also had problems with grub installing from setup program so I installed it
mannually from grub prompt. I even did that from chrooted environment.

I can manage to chroot into my system from archlive and get a working environment after:

modprobe raid1
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1
mdadm --assemble /dev/md1 /dev/sda3 /dev/sdb3
modbprobe dm-mod
vgscan
vgchange -ay

mount /dev/mapper/array-root /mnt/
mount /dev/mapper/array-home /mnt/home/
mount /dev/md0 /mnt/boot/

mount /dev/ /mnt/dev/ --bind
mount /sys/ /mnt/sys/ --bind
mount /proc/ /mnt/proc/ --bind

rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="no"
TIMEZONE="Europe/Ljubljana"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(8139cp 8139too atl1 mii slhc snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="yes"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="deneb"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="dhcp"
INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond)

mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES="pata_acpi pata_jmicron ata_generic scsi_mod ahci ata_piix"

# BINARIES
# This setting includes, into the CPIO image, and additional
# binaries a given user may wish.  This is run first, so may
# be used to override the actual binaries used in a given hook.
# (Existing files are NOT overwritten is already added)
# BINARIES are dependancy parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in anyway.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options,
# like so:
#    FILES="/etc/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'modload' may be used in place of 'udev', but is not recommended
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
#    This setup specifies all modules in the MODULES setting above.
#    No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
#    This setup will autodetect all modules for your system and should
#    work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
#    This is identical to the above, except the old ide subsystem is
#    used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
#    This setup will generate a 'full' image which supports most systems.
#    No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
#    This setup assembles an pata raid array with an encrypted root FS.
#    Note: See 'mkinitcpio -H raid' for more information on raid devices.
#    HOOKS="base udev pata raid encrypt filesystems"
#
#    This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
HOOKS="base udev autodetect pata scsi sata raid usbinput keymap lvm2 filesystems"

menu.lst

# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst

# DEVICE NAME CONVERSIONS 
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/hda        (hd0)
#  /dev/hdb2       (hd1,1)
#  /dev/hda3       (hd0,2)
#

#  FRAMEBUFFER RESOLUTION SETTINGS
#     +-------------------------------------------------+
#          | 640x480    800x600    1024x768   1280x1024
#      ----+--------------------------------------------
#      256 | 0x301=769  0x303=771  0x305=773   0x307=775
#      32K | 0x310=784  0x313=787  0x316=790   0x319=793
#      64K | 0x311=785  0x314=788  0x317=791   0x31A=794
#      16M | 0x312=786  0x315=789  0x318=792   0x31B=795
#     +-------------------------------------------------+

# general configuration:
timeout   5
default   0
color light-blue/black light-cyan/blue

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/mapper/array-root ro vga=773
initrd /kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz26 root=/dev/mapper/array-root ro
initrd /kernel26-fallback.img

# (1) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1

fdisk -l:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c8e50

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13      104391   fd  Linux raid autodetect
/dev/sda2              14          77      514080   82  Linux swap / Solaris
/dev/sda3              78       60801   487765530   fd  Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0007b26b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14          77      514080   82  Linux swap / Solaris
/dev/sdb3              78       60801   487765530   fd  Linux raid autodetect

vgdisplay

  --- Volume group ---
  VG Name               array
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               465.17 GB
  PE Size               4.00 MB
  Total PE              119083
  Alloc PE / Size       119083 / 465.17 GB
  Free  PE / Size       0 / 0   
  VG UUID               1i110D-iyJa-oRdl-7ikZ-Nzm9-dia6-sMieWh

lvdisplay

 
  --- Logical volume ---
  LV Name                /dev/array/root
  VG Name                array
  LV UUID                iBx9bO-KCSJ-lQCN-Itpo-PQ76-2qEA-d1osiN
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.00 GB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/array/home
  VG Name                array
  LV UUID                HtVebG-XjUj-O3Ju-xhrm-Zwy4-IKwE-p57DuR
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                415.17 GB
  Current LE             106283
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

What do you think? Where did I go wrong? smile

Offline

#2 2008-11-15 02:34:48

vah
Member
Registered: 2007-03-30
Posts: 7

Re: RAID1 + LVM no workee

I just got my very similar configuration to work here. The only thing I find missing is that you don't specify the RAID array holding your root file system at the kernel command line. (http://wiki.archlinux.org/index.php/Mki … Using_raid) Change that line in your menu.lst to:

kernel /vmlinuz26 root=/dev/mapper/array-root ro vga=773 md=1,/dev/sda3,/dev/sdb3

and it _should_ find the root and boot correctly.

Offline

#3 2008-11-15 05:39:44

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: RAID1 + LVM no workee

vah is correct, the md arrays must be added to the kernel command line in order for the kernel to find the root filesystem on boot.

Offline

Board footer

Powered by FluxBB