# GRUB/DMRAID/LVM woe

## IncredibleMrT

Hi all.

I'm trying to install gentoo on a rather old HP Proliant DL320G2 rack server. It's not the most performant of beasts but it will do just nicely for what I have planned.

It's a faily low spec Pentium4 and has two 80GB harddrives within and is 'raided' at BIOS level to raid1. I think it's known as fake raid.

The raid array has been built and initialised within the BIOS.

I start the livecd environment using 

```
gentoo dodmraid
```

 kernel option - this gives me the relevant entries in /dv/mapper/blah.

I am using LVM for various 'folders' as suggested in gentoo's LVM guide (http://www.gentoo.org/doc/en/lvm2.xml)

I have gone through the install procedure and all seems well.

/etc/fstab looks as follows :

```

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

/dev/mapper/lsi_ehbjieidca1     /boot   ext2    noauto,noatime 1 2

/dev/sda2                       none    swap    sw             0 0

/dev/mapper/lsi_ehbjieidca3     /       ext4    noatime        0 1

# Logical volumes

/dev/vg/usr   /usr    ext4    noatime        0 2

/dev/vg/home  /home   ext4    noatime        0 2

/dev/vg/opt   /opt    ext4    noatime        0 2

/dev/vg/var   /var    ext4    noatime        0 2

/dev/vg/tmp   /tmp    ext4    noatime        0 2

/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0

/dev/fd0                /mnt/floppy     auto            noauto          0 0

```

lvm2 is installed and set to load on boot using rc-update add lvm boot.

Like I say, from within the livecd everything seems ok.

I am building the kernel (gentoo-sources) using 

```
genkernel --lvm --dmraid --disklabel --menuconfig --mountboot --save-config  all
```

 just to get me up and running the quickest. Once i'm confident things work ok, i'll look to see what modules are being loaded against what hardware and refine the kernel manually.

My problem is, when I boot into the installed system, it handles raid as expected and starts to boot - it just doesn't see my lvm setup and so /usr, /home, /opt, /var & /tmp are not being mounted thus causing lots of issues.

Once in the system, I can see the lvm setup in /dev/vg/blah; but if I try to mount them I am met by 

```
can't read superblock
```

 message.

I was able to turn on rc logging and here is the output :

```

rc shutdown logging started at Mon Aug  6 12:23:27 2012

 * Caching service dependencies ...

 [ ok ]

 * Stopping local

 [ ok ]

 * Saving random seed ...

 [ ok ]

 * Deactivating swap devices ...

 [ ok ]

 * Unmounting network filesystems ...

 [ ok ]

 * Bringing down interface eth0

 *   Removing addresses

 *     192.168.28.78/24

 * Bringing down interface lo

 *   Removing addresses

 * Unmounting loop devices

 * Unmounting filesystems

 * Stopping udev ...

 [ ok ]

rc shutdown logging stopped at Mon Aug  6 12:23:29 2012

rc boot logging started at Mon Aug  6 12:24:35 2012

 * Setting system clock using the hardware clock [UTC] ...

 [ ok ]

 * Autoloaded 0 module(s)

 * Setting up the Logical Volume Manager ...

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4

  The link /dev/vg/usr should had been created by udev but it was not found. Falling back to direct link creation.

  The link /dev/vg/home should had been created by udev but it was not found. Falling back to direct link creation.

  The link /dev/vg/opt should had been created by udev but it was not found. Falling back to direct link creation.

  The link /dev/vg/var should had been created by udev but it was not found. Falling back to direct link creation.

  The link /dev/vg/tmp should had been created by udev but it was not found. Falling back to direct link creation.

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

 * Failed to setup the LVM

 [ !! ]

 * ERROR: lvm failed to start

 * Checking local filesystems  ...

/dev/mapper/lsi_ehbjieidca3: clean, 3460/65536 files, 29479/262144 blocks

/dev/mapper/lsi_ehbjieidca1: clean, 45/32768 files, 7272/131072 blocks

fsck.ext4fsck.ext4: Invalid argument while trying to open /dev/mapper/vg-opt

/dev/mapper/vg-opt:

The superblock could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

: Invalid argument while trying to open /dev/mapper/vg-usr

/dev/mapper/vg-usr:

The superblockfsck.ext4: Invalid argument while trying to open /dev/mapper/vg-var

fsck.ext4 could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

: Invalid argument while trying to open /dev/mapper/vg-tmp

/dev/mapper/vg-tmp:

The superblock could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

/dev/mapper/vg-var:

The superblock could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

fsck.ext4: Invalid argument while trying to open /dev/mapper/vg-home

/dev/mapper/vg-home:

The superblock could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

    e2fsck -b 8193 <device>

 * Operational error

 [ !! ]

 * Remounting root filesystem read/write ...

 [ ok ]

 * Updating /etc/mtab ...

 [ ok ]

 * Mounting local filesystems ...

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg-usr,

       missing codepage or helper program, or other error

       (could this be the IDE device where you in fact use

       ide-scsi so that sr0 or sda or so is needed?)

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg-home,

       missing codepage or helper program, or other error

       (could this be the IDE device where you in fact use

       ide-scsi so that sr0 or sda or so is needed?)

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg-opt,

       missing codepage or helper program, or other error

       (could this be the IDE device where you in fact use

       ide-scsi so that sr0 or sda or so is needed?)

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg-var,

       missing codepage or helper program, or other error

       (could this be the IDE device where you in fact use

       ide-scsi so that sr0 or sda or so is needed?)

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg-tmp,

       missing codepage or helper program, or other error

       (could this be the IDE device where you in fact use

       ide-scsi so that sr0 or sda or so is needed?)

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

 * Some local filesystem failed to mount

 [ !! ]

 * Configuring kernel parameters ...

 [ ok ]

 * Wiping /tmp directory ...

/etc/init.d/bootmisc: line 47: find: command not found

 [ ok ]

 * Setting hostname to oralin ...

 [ ok ]

 * Setting terminal encoding [UTF-8] ...

 [ ok ]

 * Setting keyboard mode [UTF-8] ...

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

 [ ok ]

 * Loading key mappings [uk] ...

/etc/init.d/keymaps: line 55: loadkeys: command not found

 * Error loading key mappings

 [ !! ]

 * ERROR: keymaps failed to start

 * Bringing up interface lo

 *   127.0.0.1/8 ...

 [ ok ]

 *   Adding routes

 *     127.0.0.0/8 via 127.0.0.1 ...

 [ ok ]

 * Mounting USB device filesystem [usbfs] ...

/etc/init.d/procfs: line 32: getent: command not found

 [ ok ]

 * Activating swap devices ...

swapon: /dev/sda2: swapon failed: Invalid argument

 [ ok ]

 * Initializing random number generator ...

 [ ok ]

rc boot logging stopped at Mon Aug  6 12:24:39 2012

rc default logging started at Mon Aug  6 12:24:39 2012

 * Setting up the Logical Volume Manager ...

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

  device-mapper: reload ioctl failed: Invalid argument

 * Failed to setup the LVM

 [ !! ]

 * ERROR: lvm failed to start

 * Setting keyboard mode [UTF-8] ...

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

/etc/init.d/keymaps: line 49: kbd_mode: command not found

 [ ok ]

 * Loading key mappings [uk] ...

/etc/init.d/keymaps: line 55: loadkeys: command not found

 * Error loading key mappings

 [ !! ]

 * ERROR: keymaps failed to start

 * Bringing up interface eth0

 *   192.168.28.78 ...

 [ ok ]

 *   Adding routes

 *     default via 192.168.27.1 ...

SIOCADDRT: No such process

 [ !! ]

 * Mounting network filesystems ...

 [ ok ]

/etc/init.d/syslog-ng: line 29: syslog-ng: command not found

 * Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)

 [ !! ]

 * ERROR: syslog-ng failed to start

 * Generating dsa host key ...

/etc/init.d/sshd: line 45: ssh-keygen: command not found

 [ !! ]

 * ERROR: sshd failed to start

 * Doing udev cleanups

 * Starting vixie-cron ...

 * start-stop-daemon: /usr/sbin/cron does not exist

 * Failed to start vixie-cron

 [ !! ]

 * ERROR: vixie-cron failed to start

 * Starting local

 [ ok ]

rc default logging stopped at Mon Aug  6 12:24:40 2012

rc shutdown logging started at Mon Aug  6 12:25:35 2012

 * Stopping local

 [ ok ]

 * Saving random seed ...

 [ ok ]

 * Deactivating swap devices ...

 [ ok ]

 * Unmounting network filesystems ...

 [ ok ]

 * Bringing down interface eth0

 *   Removing addresses

 *     192.168.28.78/24

 * Bringing down interface lo

 *   Removing addresses

 * Unmounting loop devices

 * Unmounting filesystems

 * Stopping udev ...

 [ ok ]

rc shutdown logging stopped at Mon Aug  6 12:25:37 2012

```

Can anyone shed any light onto where i'm going wrong.

Really appreciate the help.

Thanks

P.S. here's my grub.conf incase there is something missing there....

```
default 0

timeout 30

#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux (Current)

root (hd0,0)

kernel /boot/kernel root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/mapper/lsi_ehbjieidca3 dodmraid dolvm udev video=vesafb:ywrap,pmipal,1280x1024-16@60 boot_delay=10

initrd /boot/initramfs

title Gentoo Linux (Previous)

root (hd0,0)

kernel /boot/kernel.old root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/mapper/lsi_ehbjieidca3 dodmraid dolvm udev video=vesafb:ywrap,pmipal,1280x1024-16@60 boot_delay=10

initrd /boot/initramfs.old

```

... and my make.conf

```
# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-O2 -march=pentium4 -pipe"

CXXFLAGS="${CFLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="i686-pc-linux-gnu"

MAKEOPTS="-j2"

USE="pic lvm"

CONFIG_PROTECT="/etc /boot /usr/local/"

```

using 

```
default/linux/x86/10.0/server *
```

 profile

----------

## erik258

Firstly, your post is reminiscent of:

```
dan@angie ~ $ eselect news list 

News items:

  [1]      2009-04-18  Generation 1 Java Setup Deprecated

  [2]      2009-07-02  kdeprefix and monolithic ebuilds issues

  [3]      2010-03-25  Python 3.1

  [4]      2010-08-01  --as-needed enabled in default profiles

  [5]      2011-05-22  Removal of kdeprefix support

  [6]      2011-08-28  Mesa r600 driver now defaults to gallium

  [7]      2011-10-15  Upgrade to libpng15

  [8]      2012-03-16  udev-181 unmasking

  [9]      2012-05-21  Portage config-protect-if-modified default

dan@angie ~ $ eselect news read 8

2012-03-16-udev-181-unmasking

  Title                     udev-181 unmasking

  Author                    William Hubbs <williamh@gentoo.org>

  Posted                    2012-03-16

  Revision                  1

udev-181 is being unmasked on 2012-03-19.

This news item is to inform you that once you upgrade to a version of

udev >=181, if you have /usr on a separate partition, you must boot your

system with an initramfs which pre-mounts /usr.

An initramfs which does this is created by

>=sys-kernel/genkernel-3.4.25.1 or

>=sys-kernel/dracut-017-r1. If you do not want to use these tools, be

sure any initramfs you create pre-mounts /usr.

Also, if you are using OpenRC, you must upgrade to >= openrc-0.9.9.

For more information on why this has been done, see the following URL:

http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
```

Did you notice these?

 *Quote:*   

> 
> 
> ```
> Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4 
> 
> ...

 

Did your devices change names by chance?  Not that it should really matter, as far as I can think - I would LVM wouldn't care what /dev/sd[a-z] was used for a PV.

----------

## IncredibleMrT

@erik258

The UDEV shouldn't be an issue as i'm using the standard x86 tree which is only at version 171-r6

```
livecd / # emerge udev -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R    ] sys-fs/udev-171-r6  USE="rule_generator -action_modeswitch -build -debug -edd -extras -floppy -gudev -hwdb -introspection -keymap (-selinux) -test" 0 kB

```

As for the devices changing names, when booting the kernel using dmraid & dolvm options, it only seems to find three partitions on my raid array 

```
(chroot) livecd ~ # ls -l /dev/mapper/

total 0

crw------- 1 root root  10, 236 Aug  7 08:59 control

brw------- 1 root root 253,   0 Aug  7 08:59 lsi_ehbjieidca

brw------- 1 root root 253,   1 Aug  7 08:59 lsi_ehbjieidca1

brw------- 1 root root 253,   2 Aug  7 08:59 lsi_ehbjieidca2

brw------- 1 root root 253,   3 Aug  7 08:59 lsi_ehbjieidca3
```

It's missing the fourth partition which is where the LVM is held. Under the livecd environment this is the same so I use :

```
kpartx -d /dev/mapper/lsi_ehbjieidca
```

 then 

```
kpartx -a /dev/mapper/lsi_ehbjieidca
```

which then gives

```
(chroot) livecd ~ # ls -l /dev/mapper/

total 0

crw------- 1 root root  10, 236 Aug  7 08:59 control

brw------- 1 root root 253,   0 Aug  7 08:59 lsi_ehbjieidca

brw------- 1 root root 253,   1 Aug  7 08:59 lsi_ehbjieidca1

brw------- 1 root root 253,   2 Aug  7 08:59 lsi_ehbjieidca2

brw------- 1 root root 253,   3 Aug  7 08:59 lsi_ehbjieidca3

brw------- 1 root root 253,   4 Aug  7 08:59 lsi_ehbjieidca4

```

So, in answer to your question, erik258, the device name is the same under livecd or 'normal run', only the required lvm partition isn't being seen in the raid array. This is why it tries to read the lvm directly from /dev/sd[ab]4

----------

## cach0rr0

shot in the dark - 

can you confirm the kernel that's being built is including devtmpfs and devtmpfs_mount ?

----------

## IncredibleMrT

Ooh @cach0rr0, you might have something there!

Just checked and it isn't included!

Rebuilding now *fingers crossed*

Just so i'm aware, as i'm using genkernel initially just to get things up and running (i'll cut it down later), do I have to specify additional settings each time I build it or should they be stored and used in the config from the previous build?

The only reason I ask is that i'm 99.9% sure i've added them before!

----------

## IncredibleMrT

Hmmm, that didn't make a difference. 

It still isn't mapping /dev/mapper/lsi_ehbjieidca4 (lvm partition) when loading the raid - pulls in the other three partitions (boot, swap, root).

This is driving me mad!

I just don't understand why booting the kernel with dmraid (either through liveCD or normal boot) using dmraid would pull in three physical partitions on the disk, but not the fourth.

----------

## IncredibleMrT

Does anyone have any further ideas? I'm all out.

Thanks.

----------

## NeddySeagoon

IncredibleMrT,

Tell us how you constructed your raid set, partitioned it and created your LVM phsical volume.

```
Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4 

Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4 
```

It appears that LVM is seeing your /dev/sda4 and /dev/sdb4 as two seperste physical volumes with the same UUID, which would be correct if the raid failed to assemble, or the LVM partitions were created outside of the raid.

----------

## IncredibleMrT

Hi, 

@NeddySeagoon, here is the process - i'm typing from memory, so if things aren't syntactically correct then don't shoot me.

The raid array was set in the BIOS.  It was two disks, RAID1. Array created and initialised before liveCD was even put in.

Upon boot, I selected standard gentoo kernel initially - once into the livecd environment I realised that it wasn't showing as raid (nothing in /dev/mapper other than the control file). 

Rebooted, this time using 'gentoo dodmraid' as the kernel option.

Now I have /dev/mapper/lsi_ehbjieidca.

This, as far as I was concerned, was all I needed do as far as raid was concerned within the livecd environment. Still saw /dev/sd[ab] but assumed this was normal as long as I used the reference in /dev/mapper

used fdisk /dev/mapper/lsi_ehbjieidca and created boot(83), swap(82), root (83) and lvm(8e)partitions

LVM

pvcreate /dev/mapper/lsi_ehbjieidca

vgcreate vg /dev/mapper/lsi_ehbjieidca

lvcreate -L10G -nusr  vg

lvcreate -L2G  -nhome vg

lvcreate -L5G  -nopt  vg

lvcreate -L10G -nvar  vg

lvcreate -L2G  -ntmp  vg

created filesystems on each,

mounted,

etc

Installed as per the handbook, added lvm2, used genkernel (with dmraid & lvm support)to setup kernel (and initramfs) and added statics where needed.

Set grub as follows

```
default 0

timeout 30

#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux (Current)

root (hd0,0)

kernel /boot/kernel root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/mapper/lsi_ehbjieidca3 dodmraid dolvm video=vesafb:ywrap,pmipal,1280x1024-16@60 boot_delay=10

initrd /boot/initramfs

```

The only thing I was unsure about, was should I have modified /etc/lvm/lvm.conf? If I understood correctly, the default was fine but meant it might be a little slow to pick things up? Actually, is that the problem? By default it starts to look in /dev for the lv sets - should I make it only look to /dev/mapper and ignore everything else?

Hmm.....

----------

## NeddySeagoon

IncredibleMrT,

I have root on LVM on top of kernel raid5.

I'm fairly sure I hsve not set my partiton type to LVM .. its just linux (83) but I can't check right now,

As you say, seeing /dev/sda, /dev/sdb and /devmapper is quite normal. I think that LVM is looking at /dev/sda4 and /dev/sdb4 separately as you flagged the partition as LVM, then not looking at the raid.

I habe to do all my setup in an initrd, I don't have a lvm.conf at all,

Boot back into the liveCD and set the lvm partition back to 83.  lvm will still search for your physical volumes and find them.

From memory vgchange -ay

----------

## IncredibleMrT

Tried that @NeddySeagoon - it is no better (or worse)

Still, when it boots under it's own steam (and not a liveCD), it doesn't pick up the fourth partition on that raid array: /dev/mapper/lsi_ehbjieidca4. It finds the other three.

Without this partition, it won't find any lvm detail. 

This is the only problem that I can see; if it was able to pick up that partition, then I assume it would find the LVM details and boot up nicely.

:-/

----------

## NeddySeagoon

IncredibleMrT,

Please dd the first block off of both drives, thats  the MBR and email the files to me.

```
dd if=/dev/sda of=/sdaMBR count=1 bs=512

dd if=/dev/sdb of=/sdbMBR count=1 bs=512
```

I actially only need the last 66 bytes from each block - thats the partition table

Its really wierd that only some partitions can be seen.  I'll look with a hex editor.

I don't know of another bay to share binary files.

Your dmesg from booting normally may be useful too.  You can put that on a pastebin.

----------

## IncredibleMrT

Morning all, 

Here you go Neddy (I did the raided device too just in case):

Right, here they are. I've taken the liberty of doing the same for the raided mapping too. Using dropbox :

/dev/sda -> http://dl.dropbox.com/u/64741464/sdaMBR

/dev/sdb -> http://dl.dropbox.com/u/64741464/sdbMBR

/dev/mapper/lsi_ehbjieidca -> http://dl.dropbox.com/u/64741464/raidedMBR

dmesg -> http://dl.dropbox.com/u/64741464/dmesg.140812

Let me know if you need anything at else  :Smile: 

----------

## NeddySeagoon

IncredibleMrT,

Your files look ok. Rereading ...

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

/dev/mapper/lsi_ehbjieidca1     /boot   ext2    noauto,noatime 1 2 

/dev/sda2                       none    swap    sw             0 0 

/dev/mapper/lsi_ehbjieidca3     /       ext4    noatime        0 1 
```

You must not refer to the drives that are are members of the raid set directly. The raid set was made in the BIOS, as a whole drive raid.

The kernel found the swap signature and mounted swap 

```
Adding 4194300k swap on /dev/mapper/lsi_ehbjieidca2.  Priority:-1 extents:1 across:4194300k 
```

So you have raid swap.  Its a really bad idea to tell the kernel it can use /dev/sda2 too.  It might try to use it for different data and you really won't like that.

dmesg does not show /dev/sda2 being activated as swap, so it may be harmless.

```
pvcreate /dev/mapper/lsi_ehbjieidca

vgcreate vg /dev/mapper/lsi_ehbjieidca
```

is that a typo or did you really donate the entire fakeraid volume to LVM?

Hopefully you actually used lsi_ehbjieidca4in both places.

```
 * Setting up the Logical Volume Manager ... 

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4 

  Found duplicate PV iAuIC0aZSL5MJoT1afTYSE8m4qmrZnFN: using /dev/sdb4 not /dev/sda4 
```

suggest you created the PV on top of /dev/mapper/lsi_ehbjieidca4 correctly.

Moving on. [code=2"dmesg"]grep sd[ab] dmesg.140812 

sd 0:0:0:0: [sda] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

 sda: sda1 sda2 sda3 sda4

sd 0:0:0:0: [sda] Attached SCSI disk

sd 1:0:0:0: [sdb] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)

sd 1:0:0:0: [sdb] Write Protect is off

sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00

sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA[/code]

shows all of your partitions. This is the kernel looking at the drives individually, as dmraid is not yet started, but because you selected raid1, we know that the raid partition table will be identical to the individual drives.

```
EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
```

shows the real_root mounting.

There is nothing obviously wrong there.

I think you need a genkernel expert.  I'll see If I can get one to post here.

----------

## IncredibleMrT

Morning,

The excert from /etc/fstab was incorrect when I first posted it. I noticed and corrected the swap reference to use /dev/mapper/lsi... 

the pvcreate & lvcreate commands were both done against /dev/mapper/lsi_ehbjieidca4 - when I added that post I was typing from memory and must have overlooked that detail.

I'm glad you haven't found and glaringly obvious mistakes on my part, so while I feel good about that i'm increasingly frustrated that it doesn't want to play ball.

To that end, having run out of physical machines to use, i'm setting up a virtual gentoo client running off a Win2003 hyper server. Should be adequate for the time being until this problem is put to bed once and for all.

Appreciate all your help  :Smile: 

Bring on the genkernel guru! 

I'll have a play with a manual kernel too - just started on configuring a fresh seed. I only used genkernel for speed and in the hope it would just work! Oh, and it made setting up and initramfs easier too.

Here's a thought, if I build a manual kernel, can I still use the initramfs that genkernel creates, so:

```

cd /usr/src/linux

make -j3 && make modules && make modules_install && make install

genkernel initramfs (lvm and dmraid preferences have been set in genkernel.conf already)

```

----------

## DaggyStyle

small off topic question if I may, assuming that the raid controller is O\B, your rack is quite old and I wonder how does the O\B raid fairs against the kernel's sw raid.

afaik, all O\B raid are sw raid, so you might be better off using the kernel's sw raid which is updated more frequently, probably more stable and will likely to solve your issues.

just a point to take into account if it is even relevant.

----------

## IncredibleMrT

I have considered software. The reason I opted for using the hardware's raid because we have a few of these servers and they are reaching the end of their current use - so, if a disk fails, or the machine does, I can just move whatever parts need moving and hopefully it should come up without having to do any tweaks.

That said, I use software raid at home and my business laptop and have found it very stable.

----------

## DaggyStyle

 *IncredibleMrT wrote:*   

> I have considered software. The reason I opted for using the hardware's raid because we have a few of these servers and they are reaching the end of their current use - so, if a disk fails, or the machine does, I can just move whatever parts need moving and hopefully it should come up without having to do any tweaks.
> 
> That said, I use software raid at home and my business laptop and have found it very stable.

 

ok, I hope you solve this.  :Smile: 

----------

## NeddySeagoon

IncredibleMrT,

fakeraid is a version of software raid. Its just that a portion iof the software is provided in your BIOS.

The name fakeraid derives from that fact that it appears as hardware raid to Windows users, who cannot see the underlyiing drives.

For raid1 (and raid0 and raid10) where thare are no parity calculations required, the overhead of software raid (kernel raid or fakeraid) is minimal. Any redundency being provided by writing extra copies of the data.  Kernel raid1 scores over fakeraid1 because the kernel positions the heads in different places in different mirror copies in an attempt to reduce latency on reads. i.e. kernel raid is faster in real life as head movements are minimised. fakeraid reads only from a single drive.

Unfortunately, a switch from fakeraid to kernel raid means backing up everthing and reformatting.  If you do switch to kernel raid, keep in mind that your cmd64x IDE controller is probably the worst, most buggy design in PC history, so you might want to switch to your serverworks IDE interface too.

I didn't run into any genkernel devs on IRC last nignt, maybe tonight.

----------

## IncredibleMrT

No rush, i'm running with the gentoo virtual machine on windows hyper-v at the moment, seems quite quick but for the fact I can't seem to get X support - not sure what kernel driver to use for the VGA side - but that's for a separate thread...

Now, onto installing Oracle....

Thanks again for all you help.

----------

