Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jul 22, 2004 7:15 pm 
Offline
Junior Member
User avatar

Joined: Thu Jul 08, 2004 3:24 pm
Posts: 26
Location: London, UK
Every lv* command results in the following error:
Code:
  /dev/mapper/control: open failed: No such file or directory
  Is device-mapper driver missing from kernel?

Is this normal? (I'm using the gentoo image- dev-mapper package is installed)


Last edited by Raayat on Tue Aug 03, 2004 10:15 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Fri Jul 23, 2004 7:59 am 
Offline
Senior Member

Joined: Thu Oct 30, 2003 11:27 am
Posts: 52
Website: http://www.wasteland.org/
Location: Rochester, NY
If you're running a 2.4 kernel, I don't believe the linode kernels have device mapper patched in. The 2.6 kernels appear to have it enabled however. If you type cat /proc/devices, look for an entry like "254 device-mapper" under block devices. If that's not there, you don't have DM.


Top
   
 Post subject:
PostPosted: Mon Aug 02, 2004 10:32 am 
Offline
Junior Member
User avatar

Joined: Thu Jul 08, 2004 3:24 pm
Posts: 26
Location: London, UK
As seen in this thread, I can't get dietlibc to emerge cleanly (specifically I can't get the diet executable to run without segfaulting) in 2.6 kernels.

Chris, is there any chance of getting/plan to get device-mapper into the 2.4 kernels, or finding out what the problem with diet is in the 2.6 kernel?


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2004 10:18 am 
Offline
Junior Member
User avatar

Joined: Thu Jul 08, 2004 3:24 pm
Posts: 26
Location: London, UK
I guess the problem really lies with getting LVM to work: the device mapper is only built in to the 2.6 kernels, but to build mkinitrd, I need dietlibc, which doesn't seem to work under the 2.6 kernels.


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2004 11:42 am 
Offline
Junior Member

Joined: Fri Oct 10, 2003 5:57 pm
Posts: 25
I've had LVM working for a while, and, unfortunately, never wrote it up.

However, I got it working on Debian, not Gentoo, so the packages might have different ways of testing for the right underpinnings....

I nonetheless have LVM running on top of 2.4 just fine. I think the Debian package which does the right thing is libdevmapper0, which labels itself as a user-space device mapper. After that, I have package lvm10, which is pretty much it.

I actually never succeeded in getting an initrd built which works quite right, even though the initrd feature was initially added so that I could try to get LVM working.

Sorry I'm not of more immediate help. I'll try to see if I can find more of the details of what I did and post here again.


Top
   
 Post subject:
PostPosted: Tue Aug 03, 2004 5:21 pm 
Offline
Junior Member
User avatar

Joined: Thu Jul 08, 2004 3:24 pm
Posts: 26
Location: London, UK
I'm really curious how you got LVM working on 2.4 without the device-mapper ioctls available in the kernel; I thought libdevmapper was just a wrapper library for dmsetup and the ioctls.

Of course, I could just have misunderstood completely.


Top
   
 Post subject:
PostPosted: Wed Aug 04, 2004 5:04 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
LVM is enabled in the 2.4 Linode kernels:
Code:
fremont root # uname -a
Linux fremont 2.4.26-linode31-1um #1 Thu Jul 8 18:24:02 EDT 2004 i686 UML User Mode Linux GNU/Linux
fremont root # cat /proc/devices
Character devices:
  1 mem
  2 pty/m%d
  3 pty/s%d
  4 vc/%d
  5 ptmx
 10 misc
 67 coda_psdev
108 ppp
109 lvm
128 ptm
136 pts/%d
162 raw
 
Block devices:
  1 ramdisk
  7 loop
  9 md
 58 lvm
 60 cow
 98 ubd
fremont root # cat /proc/lvm/global
LVM driver LVM version 1.0.8(17/11/2003)
 
Total:  0 VGs  0 PVs  0 LVs (0 LVs open)
Global: 143 bytes malloced   IOP version: 10   1:18:55 active
fremont root #


It looks like LVM2 requires the device-mapper ioctl library and plain old LVM uses a kernel patch.

sys-fs/lvm-user emerges OK and the utilities seem to run as expected:
Code:
fremont root # vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume group


Watch this space for more news as Mr Dangerous backs up and then tries to wreck his Gentoo!

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Wed Aug 04, 2004 7:59 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
OK, got it working.

Code:
fremont root # pvcreate /dev/ubd/3
pvcreate -- physical volume "/dev/ubd/3" successfully created
 
fremont root # pvcreate /dev/ubd/4
pvcreate -- physical volume "/dev/ubd/4" successfully created
 
fremont root # vgcreate test_vg /dev/hd/disc3/disc     
vgcreate -- INFO: using default physical extent size 32 MB
vgcreate -- INFO: maximum logical volume size is 2 Terabyte
vgcreate -- doing automatic backup of volume group "test_vg"
vgcreate -- volume group "test_vg" successfully created and activated
 
fremont root # vgextend test_vg /dev/hd/disc4/disc
vgextend -- INFO: maximum logical volume size is 2 Terabyte
vgextend -- doing automatic backup of volume group "test_vg"
vgextend -- volume group "test_vg" successfully extended

fremont root # lvcreate -L512M --name lv_test_01 test_vg
lvcreate -- doing automatic backup of "test_vg"
lvcreate -- logical volume "/dev/test_vg/lv_test_01" successfully created
 
fremont root # lvcreate -L512M --name lv_test_02 test_vg
lvcreate -- doing automatic backup of "test_vg"
lvcreate -- logical volume "/dev/test_vg/lv_test_02" successfully created
 
fremont root # pvdisplay /dev/ubd/*
pvdisplay -- no physical volume identifier on "/dev/ubd/0"
 
pvdisplay -- no physical volume identifier on "/dev/ubd/1"
 
pvdisplay -- no physical volume identifier on "/dev/ubd/2"
 
--- Physical volume ---
PV Name               /dev/hd/disc3/disc
VG Name               test_vg
PV Size               769 MB [1574912 secs] / NOT usable 32.19 MB [LVM: 128 KB]
PV#                   1
PV Status             available
Allocatable           yes (but full)
Cur LV                2
PE Size (KByte)       32768
Total PE              23
Free PE               0
Allocated PE          23
PV UUID               5VB60Q-4GPP-02NX-fLRG-CAvN-LxL6-8rKpPF
 
--- Physical volume ---
PV Name               /dev/hd/disc4/disc
VG Name               test_vg
PV Size               769 MB [1574912 secs] / NOT usable 32.19 MB [LVM: 128 KB]
PV#                   2
PV Status             available
Allocatable           yes
Cur LV                1
PE Size (KByte)       32768
Total PE              23
Free PE               14
Allocated PE          9
PV UUID               WxgLOx-g0CK-XMtm-E84C-eqp9-8y8i-5RhLkS
 
 
fremont root # vgdisplay
--- Volume group ---
VG Name               test_vg
VG Access             read/write
VG Status             available/resizable
VG #                  0
MAX LV                256
Cur LV                2
Open LV               0
MAX LV Size           2 TB
Max PV                256
Cur PV                2
Act PV                2
VG Size               1.44 GB
PE Size               32 MB
Total PE              46
Alloc PE / Size       32 / 1 GB
Free  PE / Size       14 / 448 MB
VG UUID               8PjlOV-6UI2-772f-kQdH-sOvh-67u2-0CkjPf
 
 
fremont root # lvscan
lvscan -- ACTIVE            "/dev/test_vg/lv_test_01" [512 MB]
lvscan -- ACTIVE            "/dev/test_vg/lv_test_02" [512 MB]
lvscan -- 2 logical volumes with 1 GB total in 1 volume group
lvscan -- 2 active logical volumes
 
fremont root # mkreiserfs /dev/test_vg/lv_test_01
mkreiserfs 3.6.17 (2003 www.namesys.com)
 
8><  8><  8><  8><  8><  8><  8><  8><  8><  8><  8><
boring stuff deleted
8><  8><  8><  8><  8><  8><  8><  8><  8><  8><  8><
 
ReiserFS is successfully created on /dev/test_vg/lv_test_01.

fremont root # mkreiserfs /dev/test_vg/lv_test_02
mkreiserfs 3.6.17 (2003 www.namesys.com)
 
8><  8><  8><  8><  8><  8><  8><  8><  8><  8><  8><
boring stuff deleted
8><  8><  8><  8><  8><  8><  8><  8><  8><  8><  8><

ReiserFS is successfully created on /dev/test_vg/lv_test_02.

fremont root # mkdir /mnt/test_01
fremont root # mkdir /mnt/test_02
fremont root # mount /dev/test_vg/lv_test_01 /mnt/test_01
fremont root # mount /dev/test_vg/lv_test_02 /mnt/test_02
fremont root # mount
/dev/ubd/0 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev type devfs (rw)
none on /dev/shm type tmpfs (rw)
/dev/test_vg/lv_test_01 on /mnt/test_01 type reiserfs (rw)
/dev/test_vg/lv_test_02 on /mnt/test_02 type reiserfs (rw)



There is a major weirdness that I still don't understand:
Code:
fremont root # vgcreate test_vg /dev/ubd/3
vgcreate -- no valid physical volumes in command line

Using /dev/ubd/3 doesn't work with vgcreate, but dev/hd/disc3/disc does. Weirder still, /dev/ubd/3 does work with pvcreate. I think this is a Gentooism. Certainly confused me for a while!

By the way, there is a bad looking message during boot:
Code:
 * Setting up the Logical Volume Manager...FATAL: Could not load /lib/modules/2.4.26-linode31-1um/modules.dep: No such file or directory   [ ok ]
but I think it doesn't matter. Just don't understand why module loading is being attempted when all the good stuff is built into the kernel anyway.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Wed Aug 04, 2004 11:18 am 
Offline
Senior Member

Joined: Thu Oct 30, 2003 11:27 am
Posts: 52
Website: http://www.wasteland.org/
Location: Rochester, NY
Quote:
Using /dev/ubd/3 doesn't work with vgcreate, but dev/hd/disc3/disc does. Weirder still, /dev/ubd/3 does work with pvcreate. I think this is a Gentooism. Certainly confused me for a while!


It's a devfs+lvm1 thing. It's not unique to gentoo or linode.


Top
   
 Post subject:
PostPosted: Wed Aug 04, 2004 6:43 pm 
Offline
Junior Member
User avatar

Joined: Thu Jul 08, 2004 3:24 pm
Posts: 26
Location: London, UK
I'm attempting to use LVM2, so I'll need the 2.6 kernel for now... I'll get around the dietlibc issue by using the Debian mkinitrd (links to libc instead).


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: dobriain, wolfsoft and 2 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group