Skip to contentSkip to conversation

lvm 0.8 to 1.0 transition?

linux-lvm Friedrich Lobenstock 2 participants 6 messages Feb 26, 2002 – Feb 27, 2002

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · Friedrich Lobenstock

Anything special I have to take care if I make a transition from lvm 0.8 to lvm 1.0?

Otherwise I would do the same as described in
http://www.sistina.com/lvm_howtos/lvm_howto/Moving_a_volume_group_to_.html

In case you just want to update your LVM software, you don't need to vgexport/vgimport your VGs as described under that URL.

Presuming that you took backups of your data and metadata (/etc/lvmconf/*) and don't have root on a LV, you just need to install the new LVM software (take LVM 1.0.3!), and run "vgscan;vgchange -ay" after the successfull installation and reboot. "vgscan;vgchange -ay" is probably in your system startup script anyway.

To be save, you could copy your LVM 0.8 software to /sbin/lvm-0.8 (tools) and /lib/lvm-0.8 (library) respectively. Make your LVM 0.8 capable kernel bootable too.

With these preperations, you still can boot into single user for LVM 0.8 recovery in case something goes wrong.

Quoted 11 lines
Signature · 9 lines
-- 
MfG / Regards
Friedrich Lobenstock

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#2 lore raw
Quoted 6 lines · Heinz J . Mauelshagen

In case you just want to update your LVM software, you don't need to vgexport/vgimport your VGs as described under that URL.

Presuming that you took backups of your data and metadata (/etc/lvmconf/*) and don't have root on a LV,

Yes root is on a LV on RAID1 and the data is on a LV on another RAID1

# uname -a
Linux www 2.4.0-test12-pre4-reiserfs-md-fixes #4 Fri Jan 19 14:48:29 CET 2001 i686 unknown
# cat /proc/lvm
LVM driver version 0.8final  (15/02/2000)

Total: 2 VGs 2 PVs 6 LVs (6 LVs open 6 times)

Global: 156410 bytes malloced IOP version: 6 22:43:33 active

VG: system-disk [1 PV, 4 LV/4 open] PE Size: 4096 KB
Usage [KB/PE]: 9969664 /2434 total 9969664 /2434 used 0 /0 free
PV: [AA] md1 9969664 /2434 9969664 /2434 0 /0

    LVs: [AWCL  ] swap                        524288 /128      1x open
         [AWDL  ] root                       2097152 /512      1x open
         [AWDL  ] tmp                         524288 /128      1x open
         [AWDL  ] var                        6823936 /1666     1x open

VG: data-disk [1 PV, 2 LV/2 open] PE Size: 8192 KB
Usage [KB/PE]: 78143488 /9539 total 55615488 /6789 used 22528000 /2750 free
PV: [AA] md3 78143488 /9539 55615488 /6789 22528000 /2750

    LVs: [AWDL  ] 1                         18022400 /2200     1x open
         [AWDL  ] 2                         37593088 /4589     1x open
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/system-disk/root
                      2.0G  1.5G  522M  75% /
/dev/md0               50M   37M   13M  74% /boot
/dev/system-disk/tmp  512M   32M  480M   6% /tmp
/dev/system-disk/var  6.5G   92M  6.4G   1% /var
/dev/data-disk/1       17G   12G  5.1G  70% /mount/1
/dev/data-disk/2       36G   12G   24G  34% /mount/2

/dev/system-disk/ has PV /dev/md1
/dev/data-disk/ has PV /dev/md3

# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hdc1[0] hda1[1]
      51264 blocks [2/2] [UU]

md1 : active raid1 hdc2[0] hda2[1]

      9970560 blocks [2/2] [UU]

md3 : active raid1 hdg1[1] hde1[0]

      78150592 blocks [2/2] [UU]

Therefore I will install a new system and I'll just take the disks that belong to /dev/md3 and put them in this new system. So I'll have the old system to put the disks back if anything goes wrong in the new system.

In the new system I just need to pvmove the the data onto the new disks, this time hardware RAID instead of software RAID, so no fancy stuff to get lilo boot with root on LV.

So how should I do it, just "vgscan;vgchange -ay" or do I need to vgexport/vgimport and will this cause troubles?

Signature · 3 lines
MfG / Regards
Friedrich Lobenstock

#3 lore raw
Quoted 64 lines · Friedrich Lobenstock
Quoted 6 lines · Heinz J . Mauelshagen

In case you just want to update your LVM software, you don't need to vgexport/vgimport your VGs as described under that URL.

Presuming that you took backups of your data and metadata (/etc/lvmconf/*) and don't have root on a LV,

Yes root is on a LV on RAID1 and the data is on a LV on another RAID1

# uname -a
Linux www 2.4.0-test12-pre4-reiserfs-md-fixes #4 Fri Jan 19 14:48:29 CET 2001 i686 unknown
# cat /proc/lvm
LVM driver version 0.8final  (15/02/2000)

Total: 2 VGs 2 PVs 6 LVs (6 LVs open 6 times)

Global: 156410 bytes malloced IOP version: 6 22:43:33 active

VG: system-disk [1 PV, 4 LV/4 open] PE Size: 4096 KB
Usage [KB/PE]: 9969664 /2434 total 9969664 /2434 used 0 /0 free
PV: [AA] md1 9969664 /2434 9969664 /2434 0 /0

    LVs: [AWCL  ] swap                        524288 /128      1x open
         [AWDL  ] root                       2097152 /512      1x open
         [AWDL  ] tmp                         524288 /128      1x open
         [AWDL  ] var                        6823936 /1666     1x open

VG: data-disk [1 PV, 2 LV/2 open] PE Size: 8192 KB
Usage [KB/PE]: 78143488 /9539 total 55615488 /6789 used 22528000 /2750 free
PV: [AA] md3 78143488 /9539 55615488 /6789 22528000 /2750

    LVs: [AWDL  ] 1                         18022400 /2200     1x open
         [AWDL  ] 2                         37593088 /4589     1x open
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/system-disk/root
                      2.0G  1.5G  522M  75% /
/dev/md0               50M   37M   13M  74% /boot
/dev/system-disk/tmp  512M   32M  480M   6% /tmp
/dev/system-disk/var  6.5G   92M  6.4G   1% /var
/dev/data-disk/1       17G   12G  5.1G  70% /mount/1
/dev/data-disk/2       36G   12G   24G  34% /mount/2

/dev/system-disk/ has PV /dev/md1
/dev/data-disk/ has PV /dev/md3

# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hdc1[0] hda1[1]
      51264 blocks [2/2] [UU]

md1 : active raid1 hdc2[0] hda2[1]

      9970560 blocks [2/2] [UU]

md3 : active raid1 hdg1[1] hde1[0]

      78150592 blocks [2/2] [UU]

Therefore I will install a new system and I'll just take the disks that belong to /dev/md3 and put them in this new system. So I'll have the old system to put the disks back if anything goes wrong in the new system.

Quoted 6 lines

In the new system I just need to pvmove the the data onto the new disks, this time hardware RAID instead of software RAID, so no fancy stuff to get lilo boot with root on LV.

So how should I do it, just "vgscan;vgchange -ay" or do I need to vgexport/vgimport and will this cause troubles?

If you want to move the devices over to another system, vgexport+vgimport is the recommended way to go.

Quoted 11 lines
Signature · 10 lines
-- 
MfG / Regards
Friedrich Lobenstock


_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#4 lore raw
Quoted 2 lines · Heinz J . Mauelshagen

If you want to move the devices over to another system, vgexport+vgimport is the recommended way to go.

So you mean that there are no known problems with
vgexport (lvm 0.8) and vgimport (lvm 1.0)

Signature · 2 lines
MfG / Regards
Friedrich Lobenstock
#5 lore raw
Quoted 7 lines · Friedrich Lobenstock
Quoted 2 lines · Heinz J . Mauelshagen

If you want to move the devices over to another system, vgexport+vgimport is the recommended way to go.

So you mean that there are no known problems with
vgexport (lvm 0.8) and vgimport (lvm 1.0)

Yes.

Quoted 11 lines
Signature · 10 lines
-- 
MfG / Regards
Friedrich Lobenstock


_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
[email protected]                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-