LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-01-2007, 03:45 PM   #1
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Rep: Reputation: 23
fsck /Ctrl-D


Hi,

I have a box with several disk connected, both SCSI and IDE. (raid configurations) When I boot it from cold it holds up during the boot process for a very long time and then kicks out to give a fsck error. Pressing Ctrl-D re-boots, still with the same long delay but it goes into mandriva ok after that.

Once started ok re-boots work fine, but if I shut down completely the problem starts all over aagin.

let me know which files/logs that are of interest and where they can be found and I'll add them to the thread.

Regards,
Mårten

Last edited by MartenH; 08-01-2007 at 03:51 PM.
 
Old 08-01-2007, 04:03 PM   #2
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
At what point in the boot process does it hang?

Also, have you run fsck on all partitions?
 
Old 08-01-2007, 04:11 PM   #3
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Original Poster
Rep: Reputation: 23
Sorry, I'm still learning Mandriva and Linux so forgive me if I ask silly questions, but:

Quote:
Originally Posted by zQUEz
At what point in the boot process does it hang?
Which log can I check this in? There is to much data to write down on the screen but I haven't been able to find a "boot" log file.

Quote:
Originally Posted by zQUEz
Also, have you run fsck on all partitions?
How do I do this?
 
Old 08-02-2007, 06:34 AM   #4
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
Thats ok, I am fairly new to Linux too.
You can't run fsck on mounted partitions, thus you can't run fsck on /.
To get around this, you want to run when the system is booting.
I am only familiar with Redhat and Fedora, but to force the system to run fsck on all partitions when it is booting, type :# touch /forcefsck
When you reboot it will run a file check on all partitions to see if any errors exist.

as for how far it gets in the boot process, you could check /var/log/messages to see where abouts it gets before your issue.
 
Old 08-02-2007, 11:13 AM   #5
ernie
Senior Member
 
Registered: Nov 2001
Location: Toledo, Ohio - USA
Distribution: Mageia 1
Posts: 1,079
Blog Entries: 4

Rep: Reputation: 70
If it stops the boot process for a long while, please report what the last three or four messages are that you see on the screen before it 'kicks out to give an fsck error'?
 
Old 08-02-2007, 03:52 PM   #6
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by ernie
If it stops the boot process for a long while, please report what the last three or four messages are that you see on the screen before it 'kicks out to give an fsck error'?

Just to eliminate a few problem sources I removed several HDDs from my setup. Here is what I'm left with.

hda > system
hdb > not used
hdc > not used
hdd > not used
sda > Single disk with ReiserFS monuted as /mnt/quickdown
sdb > not used
sdc > not used
sdd > Part of raid1 set
sde > Part of raid1 set
Raid > using disks above on md0. Mounted as /mnt/draid

The important parts of the message I get at bootup is:
Code:
Starting up raid devices: mdadm: No devices listed in conf file were found.

Setting up LVM: No volume groups found

Failed to open the device '/dev/md0' : No such file or directory
Failed to open the device '/dev/sda1' : No such file or directory
After Ctrl-D it boots fine, reboots work fine. But after a complete "shutdown -h now" the problem occurs again. Could it be that the SCSI drives has not had time to spin up?
 
Old 08-02-2007, 03:57 PM   #7
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Original Poster
Rep: Reputation: 23
Here are a few files:

/etc/fstab
Code:
/dev/hda1 / reiserfs notail 1 1
/dev/md0 /mnt/draid reiserfs defaults 1 2
/dev/sda1 /mnt/quickdown reiserfs notail 1 2
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0
/etc/mtab
Code:
/dev/hda1 / reiserfs rw,notail 0 0
none /proc proc rw 0 0
/dev/md0 /mnt/draid reiserfs rw 0 0
/dev/sda1 /mnt/quickdown reiserfs rw,notail 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/etc/mdadm.conf
Code:
DEVICE /dev/sdc1 /dev/sdd1
ARRAY /dev/md0 UUID=8a7848e3:631df4ad:ba630261:d1574c1c auto=yes
 
Old 08-03-2007, 05:04 AM   #8
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
So when the system does boot normally, your /dev/md0 (raid) does mount and work fine?

I noticed an issue in your mdadm.conf:
You have "DEVICE /dev/sdc1 /dev/sdd1"
But you listed /dev/sdd and /dev/sde as being part of your raid. So sdc shouldn't be in your raid mdadm.conf file.

Also, I havn't done very much at all with software raid, but when I did, I recall having to set the partition type to code FD in fdisk - raid autodetect. Not sure if that is relevant or if you have done/tried this.
 
Old 08-03-2007, 05:09 AM   #9
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
Also, take a look at the below that has a quick example guide to setting up software raid using mdadm as well as a method to test. Just to be sure.

#### copied from http://kbase.redhat.com/faq/FAQ_85_7689.shtm
First, make sure that the RAID devices are active. This is to ensure that software RAID is actually working before creating the configuration file. This can be verified by checking /proc/mdstat or running:

# mdadm -D <RAID device>
Suppose that SCSI disks were used for the software RAID, /etc/mdadm.conf can now be configured as follows:

# echo 'DEVICE /dev/sd*[0-9]' > /etc/mdadm.conf
# mdadm -Ds >> /etc/mdadm.conf
where * can be [a-z] and the partition is [0-9] depending on the designated device.

Below is a sample /etc/mdadm.conf generated from the commands above:

DEVICE /dev/sd*[0-9]
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=ff56f9a2:4ed49bb4:605d5c9f:276116e0
devices=/dev/sda1,/dev/sdb1
To verify that the correct configuration file has been created, execute the following commands:

# mdadm -S /dev/md0
# mdadm -As
This should stop and start the /dev/md0 device.
 
Old 08-04-2007, 06:42 AM   #10
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by zQUEz
So when the system does boot normally, your /dev/md0 (raid) does mount and work fine?
Yes, my mounts and everything works fine after pressing Ctrl-D and rebooting. And as long as I keep using shutdown -r there is no problem. But with shutdown -h I encounter the issue again. That's why I'm starting to suspect that it might have to do with the SCSI disk starting up.

Quote:
Originally Posted by zQUEz
I noticed an issue in your mdadm.conf:
You have "DEVICE /dev/sdc1 /dev/sdd1"
But you listed /dev/sdd and /dev/sde as being part of your raid. So sdc shouldn't be in your raid mdadm.conf file.
That was a mistake on my part, sdc and sdd are the correct disks.

Quote:
Also, I havn't done very much at all with software raid, but when I did, I recall having to set the partition type to code FD in fdisk - raid autodetect. Not sure if that is relevant or if you have done/tried this.
I set the disks up using the configuration tool in Mandriva instead of the command line fdisk so I simply choose Linux raid which gives them the 0xfd type.

As to your second post. I've tried that and things and up correctly. The only thing not happening is that the "devices" argument doesn't get set.

I've made som emodifications so here is my final mdadm.conf
Code:
DEVICE /dev/sdc1 /dev/sdd1
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=8a7848e3:631df4ad:ba630261:d1574c1c devices=/dev/sdc1,/dev/sdd1
It seems to be working fine with the #mdadm -As command.

Since everything seems to be working the way it should except from a complete reboot I am leaning towards it being due to some kind of SCSI startup issue.
 
Old 08-04-2007, 05:10 PM   #11
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Original Poster
Rep: Reputation: 23
An additional note. If I use shutdown -f -h now it boots up ok but the disks are not added as desired. #mdadm -D /dev/md0 gives No such file or directory. And neither md0 nor sda1 are mounted.

But if mount sda1 it shows up ok and is accesible. The same thing goes for #mdadm -As followed by #mount -t /dev/md0 /mnt/draid.

It wouldn't be solving the issue, but perhaps an acceptable workaround would be to always force the -f switch on shutdown and then have the mdadm and mount commands executed at the end of the bootup process? How would I go about doing this in that case?

(I would of course prefer solving the problem!)

Last edited by MartenH; 08-04-2007 at 05:31 PM.
 
Old 08-04-2007, 06:00 PM   #12
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Original Poster
Rep: Reputation: 23
Setting the fsck check to 0 in /etc/fstab and adding the mount commands to rc.local did the trick. I havn't solved the problem but atleast I have a workaround in place. Tomorrow I'll try this with my LVM consisting of both IDE and SCSI disk, that might proove interesting. Will probably add the noauto in fstab as well...
 
Old 08-07-2007, 07:39 AM   #13
MartenH
Member
 
Registered: Jul 2005
Location: Lund, Sweden
Distribution: Debian
Posts: 78

Original Poster
Rep: Reputation: 23
I wasn't able to get the LVM working correctly at all. But I finally "solved" the problem. I changed to linear raid instead of LVM and then did as with the other raid volume above. Everything seems to be working fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to create bash short cuts (like CTRL+l for clear and Ctrl+D for exit) supersubu123 Linux - General 5 05-30-2007 03:02 AM
ctrl+c & ctrl+v equivalent for Gnome terminal window? halfpower Linux - General 2 11-29-2005 02:57 AM
automatic fsck on boot. fsck errors. nixel Slackware 1 05-17-2004 07:51 AM
no ctrl-a or ctrl-z in emacs or on command line? ashlock Fedora 5 12-30-2003 08:00 PM
ctrl+ c ctrl +v not working in windows xp Astro General 3 10-20-2003 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration