On Sat, Sep 01, 2001 at 10:19:25AM +0400, Andrej Borsenkow wrote:
> Brian J. Murrell wrote:
> >
> 
> I tried to create simple pd, vg and it works and boots without error 
> messages; vgscan is also happy with mknod so it was not a problem.

Did you do this on a system that was booted from an initrd in which
the initrd did the vgscan?  In other words, did you do this on a
system with an root filesystem on an LV?

I can do all of what you say you can do on a my workstation too, which
does NOT have an LVM root filesystem.  The problems I am outlining are
only problems on systems with LVM based root filesystems.

> >1.  mount initrd
> >2.  mount devfs
> >3   load lvm module (which creates devfs nodes)
> >3.  vgscan, vchange -a y
> >4.  mount real root (on lvm partition)
> >5.  mount devfs again (on real root)
> >6.  unmount initrd
> >
> >I think the lvm nodes are created successfully in step 3 but get lost
> >when devfs is mounted a second time in step 5.
> >
> 
> Ah ... no that's wrong.

You sure?  Think carefully and witness my further evidence below.


> I am not sure if it is even possible to mount 
> devfs after kernel has started.

The kernel mounts it just fine, twice.  It is not being mounted by a
"mount" command but rather by the kernel.

> It is hard enough to umount it in any case.

Well, after the initrd is done and unmounted the devfs must get
unmounted too, or perhaps it's mount goes into limbo.

> You need not to mount devfs explicitly.

I don't.  I should have been clearer.  The mount of devfs in steps 2
and 5 is done by the kernel, not by userspace (i.e. mount(8) command).

> You just boot with devfs=mount 
> boot option.

That is what I am doing.

> Mounting happens in __init of devfs automatically in this 
> case and will persist until reboot.

How long it persists, I don't know.  The kernel seems able to unmount
the initrd just fine, which does have the devfs mounted on it's /dev
directory.

> I guess, these mutlitple mounts 
> confused your kernel.

The kernel did the multiple mounts, not userspace.

> So, steps 2 and 5 are not needed.

As I said, they are done by the kernel, not userspace so I can't
elimiate them even if I wanted to (which I don't).

> Either you boot with devfs or without.

I am booting with devfs=mount.

> Would you mind trying without steps 2 and 5 but with devfs=mount boot 
> option?

That is what was done.  Steps 2 and 5 are not actually actions that
are performed during boot but rather I was just reporting what the
kernel does.  See below for the kernel output of the system booting.

> This should work if my theory is correct :-)

Sorry, your theory is not quite correct.  :-(

Here is the (relevant) kernel output during the boot.  The line
nubmers on the left of course were just added here so that I could
annotate below.

1.  Linux version 2.4.8-11mdk ([EMAIL PROTECTED]) (gcc version egcs-2.91.66 
19990314/Linux (egcs-1.1.2 release / Linux-Mandrake 8.1)) #1 Wed Aug 22 16:22:21 CEST 
2001
    [ snip ]
2.  Kernel command line: BOOT_IMAGE=linux ro root=3a00 devfs=mount
    [ snip ]
3.  devfs: v0.107 (20010709) Richard Gooch ([EMAIL PROTECTED])
4.  devfs: boot_options: 0x2
    [ snip ]
5.  RAMDISK: Compressed image found at block 0
6.  
Uncompressing...............................................................................................................................done.
7.  Freeing initrd memory: 1282k freed
8.  VFS: Mounted root (ext2 filesystem).
9.  Mounted devfs on /dev
10. LVM version 0.9.1_beta3  by Heinz Mauelshagen  (25/01/2001)
11. lvm -- Module successfully initialized
12, devfs: devfs_register(): device already registered: "group"
13, devfs: devfs_register(): device already registered: "lvol1"
14, devfs: devfs_register(): device already registered: "1"
15, VFS: Mounted root (ext2 filesystem) readonly.
16, change_root: old root has d_count=2
17, Mounted devfs on /dev
18, Freeing unused kernel memory: 708k freed

Notice in line 2, the kernel command line does include "devfs=mount".
Notice in lines 5-8, the initial ramdisk is detected and mounted.  In
line 9, the kernel mounts devfs.  Lines 10-11 are the loading of the
lvm driver and lines 12-14 are errors from devfs about devices that
exist, I guess.  I am not sure why I am getting these.

See on line 15, the real root filesystem (on the LVM LV) is mounted
successfully (yay!) and on line 17, devfs is mounted again -- by the
kernel.

The system boots fine onto the LVM based root filesystem.  The problem
is that the device nodes in /dev/VG (group, lvol1 and 1) are missing
an uncreatable.

b.


-- 
Brian J. Murrell

Reply via email to