[linux-lvm] Problem Upgrading from LVM1 to LVM2

Mark T. Valites valites at geneseo.edu
Tue Jan 11 01:32:38 UTC 2005


On Mon, 10 Jan 2005, Mark T. Valites wrote:

> > Make sure you're using a recent version of LVM2.
>
> I see 2.00.33 is the most current. I'm using the 2.00.24-1 package
> provided in Debian testing - is it worth compiling the latest?

I stuck with 2.00.24-1 for now, but can easily change and might if I get a
chance tomorrow at work.

> > You'll need to restore your metadata from a backup using vgcfgrestore -
> > but first you need to work out which is the correct backup to restore
> > from, then use either lvm1 or lvm2 vgcfgrestore depending which format
> > that backup is in.

I was feeling brave and booted my lvm1 kernel, did a vgcfgbackup, then
booted back into my LVM2/dev_mapper kernel and did an vgcfgrestore. I was
encouraged that pvscan and vgscan picked up my volume, but actually
attempting to mount it failed:

myth:~# vgcfgrestore -M 1 music_vg
  Restored volume group music_vg

myth:~# pvscan
  PV /dev/hdg    is in exported VG music_vg [111.75 GB / 0    free]
  PV /dev/hdf    is in exported VG music_vg [111.79 GB / 0    free]
  Total: 2 [223.54 GB] / in use: 2 [223.54 GB] / in no VG: 0 [0   ]

myth:~# vgscan
  Reading all physical volumes.  This may take a while...
  Found exported volume group "music_vg" using metadata type lvm1

myth:~# mount /data/
mount: /dev/music_vg/music_lv is not a valid block device

myth:~# mount /data/
mount: /dev/music_vg/music_lv is not a valid block device

myth:~# vgimport music_vg
  Volume group "music_vg" successfully imported

myth:~# grep data /etc/fstab
/dev/music_vg/music_lv  /data   reiserfs        defaults        0       0

myth:~# vgchange -ay music_vg
  device-mapper ioctl cmd 9 failed: Invalid argument
  Couldn't load device 'music_vg-music_lv'.
  1 logical volume(s) in volume group "music_vg" now active

myth:~# mount /data/
mount: wrong fs type, bad option, bad superblock on /dev/music_vg/music_lv,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)

The last one scares me, but it's so close...!

myth:~# file /dev/mapper/music_vg-music_lv
/dev/mapper/music_vg-music_lv: block special (254/0)

myth:~# ls -l !$
ls -l /dev/mapper/music_vg-music_lv
brw-------  1 root root 254, 0 Jan 10 19:43 /dev/mapper/music_vg-music_lv

Where to now?

-Mark

-- 
Mark T. Valites
Unix Systems Analyst
Computing & Information Technology
SUNY Geneseo
>--))> >--))>





More information about the linux-lvm mailing list