Skip to contentSkip to conversation

lvm on root filesystem with devfs

linux-lvm Joe Harvell 3 participants 4 messages May 25, 2001 – May 26, 2001

lore
Share & tools
lore
#0 lore raw

I made a custom initrd to bring up lvm on my root filesystem. When not running a kernel with devfs, I simply cpio the /dev entries from the ram filesystem into the lvm root filesystem before doing pivot_root. This is so the remaining lvm filesystems can be mounted. Everything works fine in this case.

When I run with devfs, though, the /dev entries don't ever show up in /dev when I do a vgscan. The result is that I am not able to mount the lvm root filesystem.

* Does the fact that I have lvm compiled as a module have anything to do with this?
* Assuming the entries are created, then I shouldn't have to use cpio anymore (with devfs). Right?

---
Joe Harvell

#1 lore raw
Quoted 2 lines

From: [email protected] [mailto:[email protected]]On Behalf Of Joe Harvell

[snip]

Quoted 7 lines

When I run with devfs, though, the /dev entries don't ever show up in /dev when I do a vgscan. The result is that I am not able to mount the lvm root filesystem.

* Does the fact that I have lvm compiled as a module have anything to do with this?

uh huh. Unless;
1. the lvm module is on the initrd
and
2. the initrd loads this module

the lvm module will be on a logical volume which can't be mounted because the kernel doesn't know how to...

#2 lore raw

Yes, the lvm module is on the initrd.
Yes, the module is being loaded.

As I said, This works just fine if I am not using devfs.

Quoted 24 lines · Steve Wray
Quoted 2 lines

From: [email protected] [mailto:[email protected]]On Behalf Of Joe Harvell

[snip]

Quoted 7 lines

When I run with devfs, though, the /dev entries don't ever show up in /dev when I do a vgscan. The result is that I am not able to mount the lvm root filesystem.

* Does the fact that I have lvm compiled as a module have anything to do with this?

uh huh. Unless;
1. the lvm module is on the initrd
and
2. the initrd loads this module

the lvm module will be on a logical volume which can't be mounted because the kernel doesn't know how to...

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

#3 lore raw
In reply to Joe Harvell
Quoted 7 lines · Joe Harvell

When I run with devfs, though, the /dev entries don't ever show up in /dev when I do a vgscan. The result is that I am not able to mount the lvm root filesystem.

* Does the fact that I have lvm compiled as a module have anything to do with this?

When you run with devfs device entries are not created by vgscan. IIRC they should be created by the kernel whenever you activate the vg.

Quoted 2 lines

* Assuming the entries are created, then I shouldn't have to use cpio anymore (with devfs). Right?

right, the devfs mounted on your initrd is the same devfs that gets mounted on /dev after pivot_root.

Regards,
L.

Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \