Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sw raid-1: boot problem... SOLVED
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Jarry
n00b
n00b


Joined: 12 Jul 2005
Posts: 13

PostPosted: Tue Jul 12, 2005 9:19 am    Post subject: sw raid-1: boot problem... SOLVED Reply with quote

I'm trying to install gentoo on a small server in full sw-raid1 setup,
using info in http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml

I have a similar setup with /boot / and swap on md. After creating md's
I continued with installation using info in
http://www.gentoo.org/doc/en/handbook/2005.0/index.xml

I recompilled kernel with md-support (no modules), installed boot-loader
(lilo, on /dev/md0), created /etc/fstab, emerged mdadm, etc, etc...
Everything was OK until 10.d: Rebooting the System

When booting into new system (this time from disks, not from
installation cd), I got following messages:
---------------------------------------------------------------------
... <up to here everything normal, all md's correctly autodetected>...

* mounting sysfs at sys ...
can't create lock file /etc/mtab1008: Read only file-system
(use -n flag to override) [!!]

...<again everything normal up to>...

* checking root filesystem
ext2fs_check_if_mount: No such file or directory while determining
whether /dev/md1 is mounted
fsck.ext3: No such file or directory while trying to open /dev/md1
/dev/md1:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contain 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>

* Filesystem could not be fixed :-( [!!]

Give root-password for maintenance
(or type Control-D for normal startup):
---------------------------------------------------------------------

Then I logged as root and tried that "e2fsck -b 8193 /dev/md1" with
the same error. Rebooting did not change anything...

BTW, I repeated the whole installation 3 times, even with different
pair of disks (I thought there is some hw-error), but no difference...
What now? Could someone tell me where the problem is?


Last edited by Jarry on Wed Jul 13, 2005 4:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Jul 12, 2005 10:28 am    Post subject: Re: sw raid-1: boot problem... Reply with quote

Jarry wrote:
I have a similar setup with /boot / and swap on md. (...)
Then I logged as root and tried that "e2fsck -b 8193 /dev/md1" with
the same error. Rebooting did not change anything...

What is the layout ? Is /dev/md1 really the root fs ? Can you post your fstab ?

If e2fsck can't find the superblock, there is likely some confusion over which filesystem is on which device.
Back to top
View user's profile Send private message
Jarry
n00b
n00b


Joined: 12 Jul 2005
Posts: 13

PostPosted: Tue Jul 12, 2005 12:15 pm    Post subject: Reply with quote

/dev/md1 is really my /. My fstab looks like:

/dev/md0 /boot ext3 noauto 1 1
/dev/md1 / ext3 defaults 0 0
/dev/md2 none swap sw 0 0
/dev/md3 /var ext3 defaults 0 0
/dev/md4 /tmp ext3 defaults,nosuid,noexec 0 0
/dev/md5 /usr ext3 defaults 0 0
/dev/md6 /opt ext3 defaults 0 0
/dev/md7 /chroot ext3 defaults 0 0
/dev/md8 /home ext3 defaults,nosuid,noexec 0 0

btw, I tried booting livecd again:

livecd root # modprobe md
livecd root # modprobe raid1
livecd root # for i in 0 1 2 3 4 5 6 7 8; do mknod /dev/md$i b 9 $i; done
livecd root # mdadm --assemble /dev/md0 /dev/hde1 /dev/hdg1
livecd root # mdadm --assemble /dev/md1 /dev/hde2 /dev/hdg2
livecd root # mdadm --assemble /dev/md2 /dev/hde3 /dev/hdg3
livecd root # mdadm --assemble /dev/md3 /dev/hde5 /dev/hdg5
livecd root # mdadm --assemble /dev/md4 /dev/hde6 /dev/hdg6
livecd root # mdadm --assemble /dev/md5 /dev/hde7 /dev/hdg7
livecd root # mdadm --assemble /dev/md6 /dev/hde8 /dev/hdg8
livecd root # mdadm --assemble /dev/md7 /dev/hde9 /dev/hdg9
livecd root # mdadm --assemble /dev/md8 /dev/hde10 /dev/hdg10

livecd root # mount /dev/md1 /mnt/gentoo
livecd root # mount /dev/md0 /mnt/gentoo/boot
livecd root # mount /dev/md3 /mnt/gentoo/var
livecd root # mount /dev/md4 /mnt/gentoo/tmp
livecd root # mount /dev/md5 /mnt/gentoo/usr
livecd root # mount /dev/md6 /mnt/gentoo/opt
livecd root # mount /dev/md7 /mnt/gentoo/chroot
livecd root # mount /dev/md8 /mnt/gentoo/home

No problem, I could assemble all md's and mount them under livecd.
But why I can not boot my new system???
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Jul 12, 2005 12:52 pm    Post subject: Reply with quote

And what happens if you try to "mount -o rw,remount /dev/md1 /" when logged in as root (after the errors) ? Because the filesystem and the raid are ok, since the kernel was able to mount it properly (else it wouldn't get that far.)

Jarry wrote:
fsck.ext3: No such file or directory while trying to open /dev/md1

Could you do also "ls /dev/md*", to check you've got md nodes (but udev should have created them) ? Looks like fsck.ext3 could not open /dev/md1 because the "file" (device node) does not exist.
Back to top
View user's profile Send private message
Jarry
n00b
n00b


Joined: 12 Jul 2005
Posts: 13

PostPosted: Tue Jul 12, 2005 2:33 pm    Post subject: Reply with quote

Man, mercy, it seems we are getting closer!

I tried:

mount -o rw,remount /dev/md1
can't create lock file /etc/mtab~1202: Read-only filesystem (use -n flag to override)

ls -l /dev/md*
ls: /dev/md*: No such file or directory

It looks that there are no /dev/md* device-files! Why udev did not create them???
I tried to create them manually (the same as during installation), but after reboot
they were again gone! That is probably why during boot-process no /dev/md
can be mounted or checked if it is mounted!

Now those error messages during boot-up (from ext2fs_check_if_mount and
fsck.ext3 seems to be clear: no /dev/md1 exists!)

Then I booted adain livecd, created /dev/md in livecd-environment as above
(because livecd does not create them automaticly), mounted /dev/md1 (/) to
/mnt/gentoo, and checked /mnt/gentoo/dev, and I found them there (md0, 1,...10)!

Now what is wrong with those /dev/md's and why udev does not create them???
Maybe I misconfigured kernel before compiling???

And in that "maintenance mode" I can not create device-files manually
mknod /dev/md0 -b 9 0 gives:
mknod: invalid option --b
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Jul 12, 2005 3:08 pm    Post subject: Reply with quote

Jarry wrote:
It looks that there are no /dev/md* device-files! Why udev did not create them???
I tried to create them manually (the same as during installation), but after reboot
they were again gone! That is probably why during boot-process no /dev/md
can be mounted or checked if it is mounted!

They are gone because /dev it a tmpfs (an in-memory filesystem) when using udev.
Jarry wrote:
checked /mnt/gentoo/dev, and I found them there (md0, 1,...10)!
Now what is wrong with those /dev/md's and why udev does not create them???

Are there udev-related errors during the boot process ? Do the other devices in /dev look ok (ie is udev mostly working, except for md, or is it not working at all) ? Which kernel / udev versions are you using ?
Jarry wrote:
mknod /dev/md0 -b 9 0 gives:
mknod: invalid option --b

It is "mknod /dev/md0 b 9 0", not "-b 9 0".
Back to top
View user's profile Send private message
Jarry
n00b
n00b


Joined: 12 Jul 2005
Posts: 13

PostPosted: Tue Jul 12, 2005 3:53 pm    Post subject: Reply with quote

> They are gone because /dev it a tmpfs (an in-memory filesystem) when using udev.

Then it is definitely something wrong with udev. Or should I turn udev in kernel config off?

> Are there udev-related errors during the boot process?

No, everything seems to be OK. During boot-process I can see only those 2 errors mentioned above.
And now I think they are only a consequence of non-existing /dev/md? files...

> It is "mknod /dev/md0 b 9 0", not "-b 9 0".

Mea culpa, mea culpa. But even when I created them manually, after next booting they are gone...
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4725
Location: Angra do Heroísmo (PT)

PostPosted: Tue Jul 12, 2005 6:33 pm    Post subject: Reply with quote

Hi.

Have you looked at /etc/conf.d/rc? You want to set the RC_TARBALL option on or it won't save your newly created dev nodes.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
lomo
n00b
n00b


Joined: 19 May 2003
Posts: 9
Location: Slovakia

PostPosted: Wed Jul 13, 2005 6:39 am    Post subject: same problem here Reply with quote

Hi,

I've tried to install on raid1+lvm, just for testing before deploying on the server following the instructions at
http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID_mirror_and_LVM2_on_top_of_RAID
and I have the exactly same problem here... I found that on debian same error occures.. look at
http://lists.debian.org/debian-kernel/2005/02/msg00253.html

maybe it's a bug in udev (I do think so), but I don't want to use devfs anymore. I've also lookend in the kernel log and md devices are found only the device nodes are not there.
Back to top
View user's profile Send private message
Jarry
n00b
n00b


Joined: 12 Jul 2005
Posts: 13

PostPosted: Wed Jul 13, 2005 4:15 pm    Post subject: SOLVED ! Reply with quote

I solved this problem by repeating the whole installation (except md resyncing), now as "network-installation",
e.g. the last portage-snapshot and stage1 downloaded from some mirror server (previously I installed
without network, portage and stage3 from Gentoo-2005.0 universal installation CD).

Suddenly the problem dissapeared (i don't know why), and my gentoo-server boots-up without a problem!
I think it might be thanks to new kernel used (2.6.12-r4 from net, as opposed to 2.6.11-r3 which
is on installation CD).

But on gentoo.devel mailinglist there has also been some discussion about udev not working properly:
http://article.gmane.org/gmane.linux.gentoo.devel/29788
Back to top
View user's profile Send private message
lomo
n00b
n00b


Joined: 19 May 2003
Posts: 9
Location: Slovakia

PostPosted: Wed Jul 13, 2005 6:51 pm    Post subject: solution Reply with quote

hi
i've found the root cause - baselayout scripts.. when emerging to the latest stable in portage (i don't remeber the version it was something 1.11.12-xx, I think) the problem has disappeared.

so don't forget to emerge latest baselayout, lvm2, udev and mdadm and it will work fine...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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