[linux-lvm] Problem Upgrading from LVM1 to LVM2
Mark T. Valites
valites at geneseo.edu
Sun Jan 9 18:51:17 UTC 2005
I'd like to upgrade my LVM1 based machine to LVM2. I recently compiled a
new 2.4.28 kernel and patched in the
linux-2.4.26-rc1-devmapper-ioctl.patch patch from;
ftp://sources.redhat.com/pub/dm/patches/2.4-stable/2.4.26/linux-2.4.26-rc1-devmapper-ioctl.patch
A copy of my kernel config is available here:
http://www.geneseo.edu/~valites/config-2.4.28-x86_mythtv-dev_mapper
I have quite a few things running on this machine, so I'd prefer to stick
with 2.4 for now.
The machine is running Debian testing, with these versions of relevant
packages:
lvm-common 1.5.17
lvm10 1.0.8-8
lvm2 2.00.24-1
libdevmapper1.00 1.00.19-2
libdevmapper-dev 1.00.19-2
I compiled devmapper statically into the kernel & I'm pretty sure it's
working:
myth:/usr/src# ls -l /dev/mapper/control
crw------- 1 root root 10, 63 Jan 9 11:53 /dev/mapper/control
myth:/usr/src# file !$
file /dev/mapper/control
/dev/mapper/control: character special (10/63)
myth:~# cat /proc/misc
63 device-mapper
135 rtc
1 psaux
Following the docs in the LVM HOWTO, specifically section 4.1.1:
(http://linux.geneseo.edu/LDP/HOWTO/LVM-HOWTO/lvm2faq.html#AEN235),
I've added the devmap_mknod.sh script to my lvm startup script
(/etc/init.d/lvm):
#!/bin/bash
#
# lvm This script handles the LVM startup/shutdown
# so that LVMs are properly configured and available.
#
# try to load module in case that hasn't been done yet
modprobe lvm >/dev/null 2>&1
modprobe lvm-mod >/dev/null 2>&1
modprobe dm-mod >/dev/null 2>&1
/root/device-mapper.1.00.19/scripts/devmap_mknod.sh ; lvm vgscan ; lvm
vgchange -ay
set -e
test -x /sbin/lvmiopversion -a -x /sbin/vgscan -a -x /sbin/vgchange ||
exit 0
test -f /etc/default/lvm-common && . /etc/default/lvm-common
# So much for being "LVM independant" :(
create_lvm_device()
{
mknod --mode=600 /dev/lvm c 109 0 >/dev/null 2>&1 || true
}
<truncated>
The LVM1 tools see my PVs and VGs fine:
myth:/usr/src# /lib/lvm-10/pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- inactive PV "/dev/hdg" is in EXPORTED VG "music_vg" [111.75 GB / 0 free]
pvscan -- inactive PV "/dev/hdf" is in EXPORTED VG "music_vg" [111.79 GB / 0 free]
pvscan -- total: 2 [223.55 GB] / in use: 2 [223.55 GB] / in no VG: 0 [0]
myth:/usr/src# /lib/lvm-10/vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found exported volume group "music_vgPV_EXP"
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume group
But the LVM2 tools do not:
myth:/usr/src# /lib/lvm-200/pvscan
logical extent (56202) already mapped.
Couldn't fill logical volume maps.
No matching physical volumes found
myth:/usr/src# /lib/lvm-200/vgscan
Reading all physical volumes. This may take a while...
logical extent (56202) already mapped.
Couldn't fill logical volume maps.
Volume group "music_vg" not found
After reading section 4.1.5 of the same HOWTO, I was under the impression
LVM2 should be able to see the VGs created from LVM1.
I don't have enough scratch space to temporarily dump the data to and
start fresh with LVM2 VGs. I do have remotely located backups of my data,
but it'll take me a long time to restore all of it and if you can't guess
from the name of the VG, I can live without the data for a while.
I've had no luck google-ing or searching the lvm archives. Does anyone
have any suggestions for making the LVM2 tools first see my LVM1 VGs so I
can then convert them to LVM2?
Thanks in advance,
-Mark
--
Mark T. Valites
Unix Systems Analyst
Computing & Information Technology
SUNY Geneseo
>--))> >--))>
More information about the linux-lvm
mailing list