Skip to contentSkip to conversation

LVM 1 volumes and 2.6.2 kernel

linux-lvm Duncan Hill 5 participants 5 messages Feb 15, 2004 – Feb 17, 2004

lore
Share & tools
lore
#0 lore raw

Silly me decided a month or so back to migrate to 2.6, but I forgot that I had a LVM1 installation on my portable drive. Said installation doesn't seem to work now - even with dm-mod loaded, I get errors about /dev/mapper/control. What parts am I missing?

Fedora Core 1
2.6.2 kernel
lvm1 and lvm2 packages installed.

#1 lore raw
Quoted 8 lines · Duncan Hill

Silly me decided a month or so back to migrate to 2.6, but I forgot that I had a LVM1 installation on my portable drive. Said installation doesn't seem to work now - even with dm-mod loaded, I get errors about /dev/mapper/control. What parts am I missing?

Fedora Core 1
2.6.2 kernel
lvm1 and lvm2 packages installed.

There is a script called devmap_mknod.sh in the device mapper tarball's scripts directory - you need to run this script to create /dev/mapper/control. I don't know for sure, but I'd guess that it is included in the debian packages for device-mapper.

Regards,

Signature · 11 lines
AJ Lewis                                   Voice:  612-638-0500
Red Hat Inc.                               E-Mail: [email protected]
720 Washington Ave. SE, Suite 200
Minneapolis, MN 55414

Current GPG fingerprint = FE77 4B43 6A9B F982 A731  02FA 2BF5 7574 294A AA5A
Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the
many keyservers out there...
-----Begin Obligatory Humorous Quote----------------------------------------
I can bend minds with my spoon.
-----End Obligatory Humorous Quote------------------------------------------
#2 lore raw
Quoted 6 lines · AJ Lewis
Quoted 4 lines · Duncan Hill

Silly me decided a month or so back to migrate to 2.6, but I forgot that I had a LVM1 installation on my portable drive. Said installation doesn't seem to work now - even with dm-mod loaded, I get errors about /dev/mapper/control. What parts am I missing?

Quoted 6 lines

There is a script called devmap_mknod.sh in the device mapper tarball's scripts directory - you need to run this script to create /dev/mapper/control. I don't know for sure, but I'd guess that it is included in the debian packages for device-mapper.

Regards,

14:32:05 dhill@flyingfish
~> sudo modprobe dm-mod

14:32:11 dhill@flyingfish
~> sudo /home/dhill/Build/device-mapper.1.00.07/scripts/devmap_mknod.sh Creating /dev/mapper/control character device with major:10 minor:63.

Yay :) Will have to test when I get home to see if the commands work, as I left the drive behind this morning.

The script isn't in the rpm that's installed, which is weird. rpm -ql device-mapper
/lib/libdevmapper.so.1.00
/sbin/dmsetup
/usr/include/libdevmapper.h /usr/lib/libdevmapper.so /usr/share/doc/device-mapper-1.00.07 /usr/share/doc/device-mapper-1.00.07/COPYING /usr/share/doc/device-mapper-1.00.07/COPYING.LIB /usr/share/doc/device-mapper-1.00.07/README /usr/share/doc/device-mapper-1.00.07/VERSION /usr/share/man/man8/dmsetup.8.gz

Thanks!

#3 lore raw
In reply to AJ Lewis

Le 16.02.2004 15:21, AJ Lewis a écrit :

Quoted 8 lines · Duncan Hill
Quoted 1 line

Silly me decided a month or so back to migrate to 2.6, but I forgot

that I

Quoted 1 line

had a LVM1 installation on my portable drive. Said installation

doesn't

Quoted 3 lines

seem to work now - even with dm-mod loaded, I get errors about /dev/mapper/control. What parts am I missing?

Quoted 8 lines
Quoted 3 lines

Fedora Core 1
2.6.2 kernel
lvm1 and lvm2 packages installed.

There is a script called devmap_mknod.sh in the device mapper tarball's scripts directory - you need to run this script to create /dev/mapper/control. I don't know for sure, but I'd guess that it is included in the debian packages for device-mapper.

In sid, the script is part of the libdevmapper1.00 package, it is located in /usr/share/doc/libdevmapper1.00/

--
Regards
- Jean-Luc

#4 lore raw
In reply to Duncan Hill
Quoted 8 lines · Duncan Hill

Silly me decided a month or so back to migrate to 2.6, but I forgot that I had a LVM1 installation on my portable drive. Said installation doesn't seem to work now - even with dm-mod loaded, I get errors about /dev/mapper/control. What parts am I missing?

Fedora Core 1
2.6.2 kernel
lvm1 and lvm2 packages installed.

I had the same problem, and the answer you got isn't the right one for Fedora Core 1.

First, you want to update mkinitrd. I have mkinitrd-3.5.18-1.

This will upgrade /sbin/nash to have another builtin command called 'mkdmnod'.

Then you need to do a bunch of stuff to the /boot/initrd-<whatever> file. I will assume you already know how to do the whole dance necessary to mount it as a filesystem.

First, copy /sbin/nash to initrd's bin directory and make a hard link to initrd's sbin directory.

Then update the linuxrc file to have the command to make the device mapper node in it (mkdmnod). Here is what my linuxrc file looks like:

#!/bin/nash

echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
echo "Loading dm-mod.ko module"
insmod /lib/dm-mod.ko
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo "Making device mapper node"
mkdmnod
echo Creating block devices
mkdevices /dev
echo Scanning logical volumes
vgscan
echo Activating logical volumes
vgchange -ay
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/MonstVG/monstroot /sysroot pivot_root /sysroot /sysroot/initrd
umount /initrd/proc

Then, do the unmount compress dance to make a new initrd file, and if you reboot using it, things should be much better.

There are still some things that need doing to your rc scripts. My /dev/MonstVG directory now consists of a family of soft-links to devices in /dev/mappper, but their should be scripts and stuff lying around that handle that for you.

It makes me significantly less inclined to use Debian when I discover people using it offering advice as if it's the only thing that exists.

Have fun (if at all possible),

Signature · 4 lines
"It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg."  --- Thomas Jefferson
"Go to Heaven for the climate, Hell for the company."  -- Mark Twain
-- Eric Hopper ([email protected]  http://www.omnifarious.org/~hopper) --