Re: mount root filesystem on lvm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Son, 2003-05-11 um 21.38 schrieb Manfred Gschweidl:

> uupps...sorry, maybe i should carefully read my mails, after writing 
> them. ;-)
> i mean only one entry exists in "/dev/mapper", and this is "control", 
> but no other entry.

Ah, ok, I'm seeing. Well, I think that's a problem with LVM2. At the
moment the device files are created either when a volume group gets
activated or when it is already active and you add a logical volume.

But when the volume group got activated by the ramdisk and the system
switches the root filesystem, you now don't have the devices files.

I think that's where "lvm mknodes" should kick it, but... not
implemented yet. And you can't deactivate and reactivate the volume
group because the root filesystem on it is mounted.

Great. :D

So it looks like you must create the device files manually.

cd /dev/mapper
mknod volumegroupname-logicalvolumename b 254 0
mknod volumegroupname-logicalvolumename b 254 1
...

After that you also should create the symlinks

cd /dev/volumegroupname
ln -s ../mapper/volumegroupname-logicalvolumename logicalvolumename
...

Since you already put an ls command into the ramdisk before you should
know which minor got assigned to which volume.

Or, perhaps this should work: AFAIK if you have a directory /initrd on
your root filesystem, the old ramdisk should be moved there after the
root filesystem is mounted, so you can just copy the directories and
device files that got create there in /dev (/initrd/dev/mapper and
/initrd/dev/volumegroupname) to your /dev. But I have never tested this.

This sounds rather ugly and complicated, but it only occurs when
switching from LVM1 to LVM2 while having it mounted (because you can't
activate it via LVM2 while running on the real filesystem where the
device nodes should be created correctly. Or wait until the mknodes
command is finished or implement it yourself. ;-)

-- 
Christophe Saout <christophe@saout.de>


_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux