View previous topic :: View next topic |
Author |
Message |
RoundsToZero Guru
Joined: 17 Nov 2003 Posts: 478 Location: New York, NY
|
Posted: Mon Jan 23, 2006 2:05 pm Post subject: missing device nodes for vg, but vg appears in scan |
|
|
I am using lvm2 2.01.09, gentoo-sources 2.6.15-r1, and udev 079. I didn't get
a response to this as a reply to a previous thread which seems to have fallen
off the face of the earth, and I figured this deserved its own thread.
I am trying to set up an LVM2 VG using a loop device. My problem is that
device nodes are never created for my VG. However, my VG shows up in scans
(vgscan) and displays (vgdisplay). Even vgscan --mknodes does not make the
nodes. Because I never get a node for my VG, I can't figure out how I am
supposed to create LV's in it.
I have the modules loop, dm-mod and dm-snapshot loaded. Therefore, I do
have /dev/mapper/control. Here is what I have done so far:
- Create file and set up to use with loop device
# dd if=/dev/zero of=/local/snapshot bs=1M count=512
# losetup /dev/loop0 /local/snapshot
- Set up the PV
# pvcreate /dev/loop0
- Create the VG
# vgcreate snapshot /dev/loop0
At this point commands like this fail:
# lvcreate -L512 -s -n backup snapshot
Path required for Logical Volume "snapshot"
The origin name should include the volume group.
# lvcreate -L512 -s -n backup /dev/snapshot
"/dev/snapshot": Invalid path for Logical Volume
The origin name should include the volume group.
I have read in the docs that "vgscan" is run automatically now and that I
should expect to see my VG in /dev. This does not happen so I do the
following:
- Try to activate the VG
# vgchange -a y snapshot
0 logical volume(s) in volume group "snapshot" now active
- Try running vgscan manually
# vgscan
Reading all physical volumes. This may take a while...
Found volume group "snapshot" using metadata type lvm2
# vgscan --mknodes
Reading all physical volumes. This may take a while...
Found volume group "snapshot" using metadata type lvm2
- No results in /dev, try vgdisplay
# vgdisplay
Code: |
--- Volume group ---
VG Name snapshot
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 508.00 MB
PE Size 4.00 MB
Total PE 127
Alloc PE / Size 0 / 0
Free PE / Size 127 / 508.00 MB
VG UUID RG5GM3-WrEZ-PmCM-Fl0A-wjAy-Udqo-xLASVj
|
It looks like my VG is there, but it still isn't showing up in /dev. I read
something about how if udev isn't configured properly, you will get devices
like /dev/dm-# where # is 0-9, instead of named VG nodes. I don't have those
either, but I follow the instructions which are to uncomment a line in my
udev rules:
KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k",
SYMLINK+="%c"
I learn that devmap_name is included with multipath-tools, so I install those,
version 0.4.6. I reload my udev rules and repeat the steps above, but there
is no change. Then I wonder if this has anything to do with the multipath
target in the kernel configuration for the device mapper. I enable it,
reboot for good measure, and load the multipath module. I repeat the steps
above, but there is still no change.
At this point I wonder if udev has some problem outside the scope of my
imagination, so I try to see if I can use vgscan to create nodes outside
of /dev by editing lvm.conf. When I run vgscan --mknodes, however, it still
only creates mapper/control. I guess I shouldn't have really expected that
to work, but it's still weird. |
|
Back to top |
|
|
zeroclip n00b
Joined: 02 Apr 2004 Posts: 38
|
Posted: Tue Jan 24, 2006 9:46 pm Post subject: |
|
|
Exactly the same problem here. I've tried everything you have I end up with the same result!
Please help someone!! |
|
Back to top |
|
|
zeroclip n00b
Joined: 02 Apr 2004 Posts: 38
|
Posted: Tue Jan 24, 2006 11:07 pm Post subject: |
|
|
Huh. Now it works!
All i did was update to udev-81-r1, uncomment the dm-[0-9] rule in 50-udev.rules and then a reboot. Now it works! Strange u |
|
Back to top |
|
|
RoundsToZero Guru
Joined: 17 Nov 2003 Posts: 478 Location: New York, NY
|
Posted: Wed Jan 25, 2006 12:35 am Post subject: |
|
|
Do you still have multipath-tools installed? And the multipath kernel module? |
|
Back to top |
|
|
zeroclip n00b
Joined: 02 Apr 2004 Posts: 38
|
Posted: Wed Jan 25, 2006 8:06 am Post subject: |
|
|
yep same kernel 2.6.15-gentoo-r1 and multipath-tools installed. |
|
Back to top |
|
|
RoundsToZero Guru
Joined: 17 Nov 2003 Posts: 478 Location: New York, NY
|
Posted: Wed Jan 25, 2006 2:14 pm Post subject: |
|
|
It's still not working for me. Am I supposed to have a /proc/lvm? I don't, but when I did an strace of vgscan it looked like it was trying to access it a lot and was unable to.
EDIT: Also, do you need the multipathd service started? Are you using a loop device as your PV? Are you using stable versions of lvm2 and device-mapper? |
|
Back to top |
|
|
|
|
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 You cannot vote in polls in this forum
|
|