Seems LVM not properly installed - help!
I've installed LVM using RPMs - the rpms listed belowl
lvm-iop10-0.9.1_beta6-1.i386.rpm
lvm-iop10-lib-0.9.1_beta6-1.i386.rpm
lvm-iop10-man-0.9.1_beta6-1.i386.rpm
lvm-iop10-patchgen-0.9.1_beta6-1.i386.rpm
lvm-base-1.1-1.i386.rpm
All the /sbin/<progs> are there (as far as I can tell).
I'm loading the kernel support via a module (kernel 2.4.3). I can tell the module is loaded by the LSMOD command which lists LVM-MOD as one of the modules loaded. Also /proc/lvm is there.
The iop10 libraries are under /lib/lvm-iop10. (what IS "IOP10" anyway??)
However when I try to run any of the /sbin progs, the same msg keeps appearing -
vgcreate
lvmiopversion -- LVM driver/module not loaded?
vgcreate: /lib/lvm-iop not found. Is lvm-iop installed?
VGCREATE seems to be looking in the wrong place - "/lib/lvm-iop" instead of "/lib/lvm-iop10".
Have I installed LVM correctly here, does anyone know? If so, where
can I look for a solution?
Signature · 2 lines
regs rupert
Quoted 2 lines · Rupert
The iop10 libraries are under
/lib/lvm-iop10. (what IS "IOP10" anyway??)
IOP = Input/Output Protocol
This is the version of LVM user tools and kernel that your system has, and the user tools IOP must match the kernel IOP.
Quoted 2 lines
However when I try to run any of the /sbin progs, the same msg keeps appearing -
You can get the kernel IOP from "cat /proc/lvm/global". You should check that /dev/lvm exists, and is character device 109,0.
Quoted 2 lines
vgcreate
lvmiopversion -- LVM driver/module not loaded?
This means that the lvmiopversion program can't get the kernel IOP via ioctl from /dev/lvm. This is very unusual, because even if /dev/lvm is deleted or is totally bogus, it should be re-created for us.
Quoted 1 line
vgcreate:
/lib/lvm-iopnot found. Is lvm-iop installed?
This is a result of lvmiopversion failing. The script _should_ report
vgcreate: /sbin/lvmiopversion not found or can't determine IOP version
in this case. I don't know what else it could be.
Quoted 2 lines
VGCREATE seems to be looking in the wrong place - "
/lib/lvm-iop" instead of "/lib/lvm-iop10".
No, just a result of the wrapper script getting an empty string for IOP, yet strangely not empty enough to generate the above error.
Quoted 2 lines
Have I installed LVM correctly here, does anyone know? If so, where
can I look for a solution?
Try running both:
echo "'lvmiopversion'"
strace lvmiopversion
and sending the output here (you only need send the last 20 lines of strace).
Cheers, Andreas
Signature · 3 lines
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- DogbertQuoted 6 lines · Andreas Dilger
Rupert writes:
Try running both:
echo "'
lvmiopversion'"
strace lvmiopversion
I think I've found out what the problem is..... I had a look at the /dev/lvm device. It looked just like you said it should. I saw the root ownership, and that reminded me of a common mistake of mine - trying to run something an non-root.
I SUed to root. Ran "vgcreate" as an example, and got what I would expect -
[root@NAV-111 /dev]# vgcreate
vgcreate
vgcreate -- please enter a volume group name and physical volumes
So I guess it was that simple.
Just in case giving you the output of STRACE LVMIOPVERSION does help, here it is -
Quoted 1 line
echo "'
lvmiopversion'"
^^^^^^^^^^^^^^^^^^ This line didn't make sense to me, output
just ''lvmiopversion''.
[root@NAV-111 /dev]# strace lvmiopversion execve("/sbin/lvmiopversion", ["lvmiopversion"], [/* 41 vars */]) = 0 uname({sys="Linux", node="NAV-111.DSL.NAVPOINT.COM", ...}) = 0
brk(0) = 0x80499e0open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=37642, ...}) = 0 old_mmap(NULL, 37642, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\300\1"..., 1024) = 1024fstat64(3, {st_mode=S_IFREG|0755, st_size=5155229, ...}) = 0 old_mmap(NULL, 1214792, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40022000mprotect(0x40142000, 35144, PROT_NONE) = 0 old_mmap(0x40142000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11f000) = 0x40142000old_mmap(0x40147000, 14664, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40147000
close(3) = 0
munmap(0x40018000, 37642) = 0
getpid() = 1453
stat64("/dev/lvm", {st_mode=S_IFCHR|0640, st_rdev=makedev(109, 0), ...})
= 0
open("/dev/lvm", O_RDONLY) = 3
ioctl(3, 0x8004fe98, 0xbffff8ba) = 0
close(3) = 0fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 write(1, "10\n", 310
) = 3munmap(0x40018000, 4096) = 0_exit(0) = ?
-----------------------------------------------------
The next thing I need to figure out is how to convert my root file system to LVM when it's more than 50% full. I have another disk which
is going to go into the volume set. I'm reading through the LVM-HOWTO
on this, but am skeptical about how to go ahead.
In case you can offer any advice, my current setup is -
Device Boot Start End Blocks Id System /dev/sda1 * 1 3 24066 83 Linux /dev/sda2 4 1116 8940172+ 5 Extended /dev/sda5 4 1099 8803588+ 83 Linux /dev/sda6 1100 1116 136521 82 Linux swap
If I create an LVM volume first on /dev/sdb (my second disk), but don't copy over the root partition files, can I then extend the LV to /dev/sda5 so that my files are then inside the LV?
That's enough for now. I don't want to ask ALL my questions at once!
Thanks a lot for your help so far !
Signature · 2 lines
regs rupert