LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   fsck /Ctrl-D (https://www.linuxquestions.org/questions/mandriva-30/fsck-ctrl-d-574009/)

MartenH 08-01-2007 03:45 PM

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

zQUEz 08-01-2007 04:03 PM

At what point in the boot process does it hang?

Also, have you run fsck on all partitions?

MartenH 08-01-2007 04:11 PM

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?

zQUEz 08-02-2007 06:34 AM

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.

ernie 08-02-2007 11:13 AM

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'?

MartenH 08-02-2007 03:52 PM

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?

MartenH 08-02-2007 03:57 PM

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


zQUEz 08-03-2007 05:04 AM

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.

zQUEz 08-03-2007 05:09 AM

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.

MartenH 08-04-2007 06:42 AM

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.

MartenH 08-04-2007 05:10 PM

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

MartenH 08-04-2007 06:00 PM

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

MartenH 08-07-2007 07:39 AM

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.


All times are GMT -5. The time now is 08:25 AM.