LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   I don't have RAID - do I ???? (https://www.linuxquestions.org/questions/slackware-14/i-dont-have-raid-do-i-801360/)

harryhaller 04-11-2010 09:56 AM

I don't have RAID - do I ????
 
During boot, I have always got messages about RAID. Before, using the huge kernel, these did not worry me particularly, but now that I have switched to the generic kernel and initrd, the boot process really slows down when it comes to the RAID part.

I have a bog normal PC with two ide disks, two dvd drives, one of them a burner and USB1 and USB2 ports - the USB2 ports are on a card as my PC is a somewhat elderly P4.

I'm sure I don't have RAID - or do I?

If not I want to stop it searching for and configuring RAID.

Here are the messages from dmesg:
Code:

hda: Maxtor 6Y060L0, ATA DISK drive
hdb: MAXTOR STM3802110A, ATA DISK drive
hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hda: host side 80-wire cable detection failed, limiting max speed to UDMA33
hda: UDMA/33 mode selected
hdb: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdb: host side 80-wire cable detection failed, limiting max speed to UDMA33
hdb: UDMA/33 mode selected
Probing IDE interface ide1...
hdc: Optiarc DVD RW AD-5170A, ATAPI CD/DVD-ROM drive
hdd: LG CD-RW CED-8081B, ATAPI CD/DVD-ROM drive
hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdc: host side 80-wire cable detection failed, limiting max speed to UDMA33
hdc: UDMA/33 mode selected
hdd: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdd: MWDMA2 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide-gd driver 1.18
hda: max request size: 128KiB
hda: 120103200 sectors (61492 MB) w/2048KiB Cache, CHS=65535/16/63
hda: cache flushes supported
 hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 hda9 hda10 > hda4
hdb: max request size: 512KiB
hdb: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=16383/255/63
hdb: cache flushes supported
 hdb: hdb1 hdb3 < hdb5 hdb6 hdb7 > hdb4
ide-cd driver 5.00
ide-cd: hdc: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
ide-cd: hdd: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
PNP: PS/2 Controller [PNP0303:KEYB,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice

md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
raid6: int32x1    359 MB/s
raid6: int32x2    417 MB/s
raid6: int32x4    621 MB/s
raid6: int32x8    367 MB/s
raid6: mmxx1    1101 MB/s
raid6: mmxx2    1601 MB/s
raid6: sse1x1    578 MB/s
raid6: sse1x2    859 MB/s
raid6: sse2x1    910 MB/s
raid6: sse2x2    1117 MB/s
raid6: using algorithm sse2x2 (1117 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
md: multipath personality registered for level -4

device-mapper: ioctl: 4.14.0-ioctl (2008-04-23) initialised: dm-devel@redhat.com
cpuidle: using governor ladder
TCP cubic registered


LuckyCyborg 04-11-2010 10:07 AM

Well, imagine that your system have drivers for RAID, even you don't use. Simply, ignore this messages.

harryhaller 04-11-2010 10:12 AM

Quote:

Originally Posted by LuckyCyborg (Post 3931788)
Simply, ignore this messages.

As I said, I can't. The boot process really slows down to a standstill when it gets to the part where it is doing the probing etc. for raid. In short, it slows down the boot process considerably.

GazL 04-11-2010 10:19 AM

Add raid=noautodetect to your kernel command line. It won't stop you seeing the md messages you get in the log when the driver loads, but it'll stop it attempting to scan for an array to build. I'm not convinced this is what's slowing your boot down however, as it whizzes by on mine, but if you think it is, it's worth a try.

trumpet_tom 04-11-2010 10:21 AM

You could try compiling your own kernel with the RAID drivers taken out. There are guides all over the place for compiling a custom kernel. Admittedly, it's not a "quick fix" if you have never done this before but might be something worth considering.

harryhaller 04-11-2010 11:25 AM

Quote:

Originally Posted by GazL (Post 3931799)
Add raid=noautodetect to your kernel command line. It won't stop you seeing the md messages you get in the log when the driver loads, but it'll stop it attempting to scan for an array to build.

Yes, they did whizz by, but then strangley it stopped and mdadm ran, bringing the message that no config file was found and that "this might take a bit of time". It did.

Unfortunately those were console meassges that are not in dmesg and were too early in the startup to be captured by bootlogd.

I can't find where or how mdadm is called.

Quote:

Originally Posted by trumpet_tom (Post 3931804)
You could try compiling your own kernel with the RAID drivers taken out. There are guides all over the place for compiling a custom kernel. Admittedly, it's not a "quick fix" if you have never done this before but might be something worth considering.

I've only ever done it once before - about 2 years ago - so I need the practice :)
But it seems to be the only solution.

GazL 04-11-2010 12:40 PM

I'm just wondering whether you might have accidentally included RAID support in the initrd by using the '-R' option on mkinitrd or RAID=1 in mkinitrd.conf. If you do a "ls /boot/initrd-tree/sbin/mdadm" does it find anything? If you do, then try to rebuild your initrd without raid support and see if that helps.

harryhaller 04-11-2010 01:01 PM

Code:

$ ls /boot/initrd-tree/sbin/mdadm
/boot/initrd-tree/sbin/mdadm

Yup. You're right.

Here's my present mkinitrd.conf:
Code:

# mkinitrd.conf
# See "man mkinitrd.conf" for details on the syntax of this file
#
# built according to man mkinitrd.conf
#
#
SOURCE_TREE="/boot/initrd-tree"
CLEAR_TREE="0"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
KEYMAP="us"
MODULE_LIST="ext2"
#LUKSDEV="/dev/hda1"
ROOTDEV="/dev/hda2"
ROOTFS="ext2"
RESUMEDEV="/dev/hda6"
#RAID="0"
#LVM="0"
WAIT="1"

I thought that unset, RAID defaulted to "0"

. In anycase I shall run it again, "mkinitrd -F", with RAID=0 and LVM=0. I shall also add CLEAR_TREE="1".

Thanks GazL

harryhaller 04-11-2010 01:34 PM

Nothing changed:

Code:

using /lib/modules/2.6.29.6-smp/kernel/fs/ext2/ext2.ko
initrd.gz: loading us mapping
mdadm: No arrays found in config file
reading all physical volumes
    this may take a while.....

Here is mkinitrd.conf:
Code:

# mkinitrd.conf
# See "man mkinitrd.conf" for details on the syntax of this file
#
# built according to man mkinitrd.conf
#
#
SOURCE_TREE="/boot/initrd-tree"
CLEAR_TREE="1"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
KEYMAP="us"
MODULE_LIST="ext2"
##  LUKSDEV="/dev/hda1"
ROOTDEV="/dev/hda2"
ROOTFS="ext2"
RESUMEDEV="/dev/hda6"
RAID="0"
LVM="0"
WAIT="1"

I ran: makeinitrd -F then lilo

Here is /boot/initrd-tree/sbin/:
Code:

adjtimex
arp
brctl
chpasswd
chroot
crond
depmod
dmsetup.static
dnsd
fakeidentd
fbset
fbsplash
fdisk
findfs
freeramdisk
fsck
fsck.minix
getty
halt
hdparm
hwclock
ifconfig
ifdown
ifenslave
ifup
init
inotifyd
insmod
klogd
loadfont
loadkmap
logread
losetup
lsmod
lvm.static
makedevs
mdadm
mdev
mkfs.minix
mkswap
modprobe
nameif
pivot_root
poweroff
raidautorun
rdate
rdev
readprofile
reboot
rmmod
route
runlevel
setconsole
setfont
setlogcons
slattach
start-stop-daemon
sulogin
svlogd
swapoff
swapon
switch_root
sysctl
syslogd
telnetd
vconfig
vgchange
vgscan
watchdog
zcip


Richard Cranium 04-11-2010 02:46 PM

Well, you could run...
Code:

chmod -x /sbin/mdadm
...prior to re-running mkinitrd.

Although if you remove /boot/initrd-tree manually prior to re-running mkinitrd, you should not even have a /boot/initrd-tree/sbin/mdadm present at all.

What command line are you using to run mkinitrd?

GazL 04-11-2010 02:51 PM

Ahh, if you look in the /sbin/mkinitrd script you find this.

Code:

if [ ! -z "$RAID" ]; then
  if [ -r /sbin/mdadm ]; then
    mkdir -p $SOURCE_TREE/sbin
    cp /sbin/mdadm $SOURCE_TREE/sbin/mdadm
    chmod 0755 $SOURCE_TREE/sbin/mdadm
  else
    echo "ERROR:  mdadm binary is missing, RAID support not installed"
  fi
fi

You need to either comment out your LVM=, and RAID= lines, or set them to "".
RAID="0" won't do the trick.

I don't know if they've reworked it since 13.0 (I'm using current), but all it does is source in the mkinitrd.conf file, so yes, an unset RAID= should work.

harryhaller 04-11-2010 02:59 PM

Quote:

Originally Posted by Richard Cranium (Post 3932050)
if you remove /boot/initrd-tree manually prior to re-running mkinitrd, you should not even have a /boot/initrd-tree/sbin/mdadm present at all.

No. It's still there.

Quote:

Originally Posted by Richard Cranium (Post 3932050)
What command line are you using to run mkinitrd?

Code:

mkinitrd -F

GazL 04-11-2010 03:10 PM

Clutching at straws now, but perhaps you've managed to get some non-printable characters in your mkinitrd.conf file that are upsetting the script.

I'd suggest renaming it out the way and building an initrd with just the command-line options.

mkinitrd -c -k 2.6.29.6-smp -m ext2 -f ext2 -r /dev/hda2

Or, something very similar.

harryhaller 04-11-2010 03:14 PM

GazL - THAT WORKED !!! :hattip:

As you said:

Quote:

set them to ""
Here's the new mkinitrd.conf
Code:

# mkinitrd.conf
# See "man mkinitrd.conf" for details on the syntax of this file
#
# built according to man mkinitrd.conf
#
#
SOURCE_TREE="/boot/initrd-tree"
CLEAR_TREE="1"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
KEYMAP="us"
MODULE_LIST="ext2"
##  LUKSDEV="/dev/hda1"
ROOTDEV="/dev/hda2"
ROOTFS="ext2"
RESUMEDEV="/dev/hda6"
RAID=""
LVM=""
WAIT="1"

Many thanks :)

Now to see what else I can throw out of startup.....

GazL 04-11-2010 03:22 PM

So, when you had them commented out, it didn't work, but setting them to "" worked? How strange.
All I can think of there is that those variables were somehow exported from your shell environment and were being inherited. The mkinitrd script probably ought to unset them at the beginning to avoid things like that.

Anyway, whatever the reason. glad you got there in the end. :)


All times are GMT -5. The time now is 02:09 AM.