Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB/DMRAID/LVM woe
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Mon Aug 06, 2012 12:07 pm    Post subject: GRUB/DMRAID/LVM woe Reply with quote

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
Code:
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 :
Code:

# <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
Code:
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
Code:
can't read superblock
message.

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

Code:


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

Code:
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

Code:
# 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
Code:
default/linux/x86/10.0/server *
profile
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Tue Aug 07, 2012 12:53 am    Post subject: Reply with quote

Firstly, your post is reminiscent of:

Code:
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:
Code:
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


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.
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Tue Aug 07, 2012 8:35 am    Post subject: Reply with quote

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

Code:
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

Code:
(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 :
Code:
kpartx -d /dev/mapper/lsi_ehbjieidca
then
Code:
kpartx -a /dev/mapper/lsi_ehbjieidca


which then gives
Code:
(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
Back to top
View user's profile Send private message
cach0rr0
Moderator
Moderator


Joined: 13 Nov 2008
Posts: 4117
Location: Houston, Republic of Texas

PostPosted: Wed Aug 08, 2012 8:42 am    Post subject: Reply with quote

shot in the dark -

can you confirm the kernel that's being built is including devtmpfs and devtmpfs_mount ?
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Wed Aug 08, 2012 9:44 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Wed Aug 08, 2012 2:59 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Thu Aug 09, 2012 4:03 pm    Post subject: Reply with quote

Does anyone have any further ideas? I'm all out.
Thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Aug 09, 2012 6:14 pm    Post subject: Reply with quote

IncredibleMrT,

Tell us how you constructed your raid set, partitioned it and created your LVM phsical volume.
Code:
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.
_________________
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
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Fri Aug 10, 2012 8:14 am    Post subject: Reply with quote

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
Code:
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.....
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 11, 2012 8:37 pm    Post subject: Reply with quote

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
_________________
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
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Mon Aug 13, 2012 9:00 am    Post subject: Reply with quote

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.

:-/
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Aug 13, 2012 6:38 pm    Post subject: Reply with quote

IncredibleMrT,

Please dd the first block off of both drives, thats the MBR and email the files to me.
Code:
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.
_________________
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
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Tue Aug 14, 2012 8:42 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 14, 2012 7:43 pm    Post subject: Reply with quote

IncredibleMrT,

Your files look ok. Rereading ...
/etc/fstab:
# <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
dmesg:
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.

LVM:
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.

boot mesages:
 * 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.

dmesg:
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.
_________________
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
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Wed Aug 15, 2012 8:24 am    Post subject: Reply with quote

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 :)

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:

Code:

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)
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4735

PostPosted: Wed Aug 15, 2012 8:48 am    Post subject: Reply with quote

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.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Wed Aug 15, 2012 11:01 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4735

PostPosted: Wed Aug 15, 2012 11:25 am    Post subject: Reply with quote

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. :)
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Aug 15, 2012 4:41 pm    Post subject: Reply with quote

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.
_________________
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
IncredibleMrT
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2008
Posts: 86
Location: Rotherham, UK

PostPosted: Fri Aug 17, 2012 8:00 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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