Skip to contentSkip to conversation

LVM2 on a USB-disk/ same VG name

linux-lvm Axel Braun 2 participants 6 messages Mar 9, 2006 – Mar 14, 2006

lore
Share & tools
lore

Axel Braun

author
#0 lore raw

Hello experts,

I need your advice to save some data: My old laptop died, but I could make the HD work again via a USB-adapter. I attached it to the new Laptop (as well running SuSE 10.0 / lvm2), and the lvm on the USB-Disk is not displayed.

The lvm on the installed system is active:
z60m:~ # pvdisplay /dev/sda8
--- Physical volume ---

  PV Name               /dev/sda8
  VG Name               system
  PV Size               28.75 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              7359
  Free PE               11
  Allocated PE          7348
  PV UUID               ZdwaLr-anXc-Z7ck-cGI0-oFoW-UluI-F7SZ18

This group is also active:
z60m:~ # lvscan

  ACTIVE            '/dev/system/daten' [12.70 GB] inherit
  ACTIVE            '/dev/system/home' [8.00 GB] inherit
  ACTIVE            '/dev/system/root' [8.00 GB] inherit

Now, on the USB-disk is a LVM as well:
z60m:~ # pvdisplay /dev/sdb8
--- Physical volume ---

  PV Name               /dev/sdb8
  VG Name               system
  PV Size               17.48 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              4475
  Free PE               9
  Allocated PE          4466
  PV UUID               P8KDPg-QbME-4Hzc-lw8G-ntOA-1dIv-1DeXmR

vgscan does not activate the group on the USB - due to the same name? z60m:~ # vgchange -a y
3 logical volume(s) in volume group "system" now active
z60m:~ # pvscan
PV /dev/sda8 VG system lvm2 [28.75 GB / 44.00 MB free]
Total: 1 [28.75 GB] / in use: 1 [28.75 GB] / in no VG: 0 [0 ]
z60m:~ # lvscan

  ACTIVE            '/dev/system/daten' [12.70 GB] inherit
  ACTIVE            '/dev/system/home' [8.00 GB] inherit
  ACTIVE            '/dev/system/root' [8.00 GB] inherit

What is your proposal to activate the USB-lvm group - best without loosing data.....

TIA
Axel

Signature · 2 lines
"Feel free" mit GMX FreeMail!
Monat f�r Monat 10 FreeSMS inklusive! http://www.gmx.net
#1 lore raw

Hi Axel,

vgrename the active one and adjust /etc/fstab appropriately. 'vgscan;vgchange -ay' should gain you access to the USB one then.

Regards,
Heinz -- The LVM Guy --

Quoted 50 lines · Axel Braun

Hello experts,

I need your advice to save some data: My old laptop died, but I could make the HD work again via a USB-adapter. I attached it to the new Laptop (as well running SuSE 10.0 / lvm2), and the lvm on the USB-Disk is not displayed.

The lvm on the installed system is active:
z60m:~ # pvdisplay /dev/sda8
--- Physical volume ---

  PV Name               /dev/sda8
  VG Name               system
  PV Size               28.75 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              7359
  Free PE               11
  Allocated PE          7348
  PV UUID               ZdwaLr-anXc-Z7ck-cGI0-oFoW-UluI-F7SZ18

This group is also active:
z60m:~ # lvscan

  ACTIVE            '/dev/system/daten' [12.70 GB] inherit
  ACTIVE            '/dev/system/home' [8.00 GB] inherit
  ACTIVE            '/dev/system/root' [8.00 GB] inherit

Now, on the USB-disk is a LVM as well:
z60m:~ # pvdisplay /dev/sdb8
--- Physical volume ---

  PV Name               /dev/sdb8
  VG Name               system
  PV Size               17.48 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              4475
  Free PE               9
  Allocated PE          4466
  PV UUID               P8KDPg-QbME-4Hzc-lw8G-ntOA-1dIv-1DeXmR

vgscan does not activate the group on the USB - due to the same name? z60m:~ # vgchange -a y
3 logical volume(s) in volume group "system" now active
z60m:~ # pvscan
PV /dev/sda8 VG system lvm2 [28.75 GB / 44.00 MB free]
Total: 1 [28.75 GB] / in use: 1 [28.75 GB] / in no VG: 0 [0 ]
z60m:~ # lvscan

  ACTIVE            '/dev/system/daten' [12.70 GB] inherit
  ACTIVE            '/dev/system/home' [8.00 GB] inherit
  ACTIVE            '/dev/system/root' [8.00 GB] inherit
Quoted 15 lines

What is your proposal to activate the USB-lvm group - best without loosing data.....

TIA
Axel

Signature · 8 lines
"Feel free" mit GMX FreeMail!
Monat f?r Monat 10 FreeSMS inklusive! http://www.gmx.net

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

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

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Cluster and Storage Development                   56242 Marienrachdorf
                                                  Germany
[email protected]                            +49 2626 141200
                                                       FAX 924446

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

author
#2 lore raw

Hello Heinz,

Quoted 2 lines

vgrename the active one and adjust /etc/fstab appropriately. 'vgscan;vgchange -ay' should gain you access to the USB one then.

After deactivation I could change the name, but after the reboot the dm-mapper was still looking for the old volume group 'system'. I tried to boot the rescue system, maybe the inittab needed a refresh - but that did not work.
unfortunately Suse's system repair cant deal with LVM, so my best idea was to change everything back.

Cheers
Axel

Signature · 2 lines
Echte DSL-Flatrate dauerhaft f�r 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
#3 lore raw
Quoted 9 lines · Axel Braun

Hello Heinz,

Quoted 2 lines

vgrename the active one and adjust /etc/fstab appropriately. 'vgscan;vgchange -ay' should gain you access to the USB one then.

After deactivation I could change the name, but after the reboot the dm-mapper was still looking for the old volume group 'system'. I tried to boot the rescue system, maybe the inittab needed a refresh - but that did not work.

Did you change /etc/fstab ?

Heinz

Quoted 9 lines

unfortunately Suse's system repair cant deal with LVM, so my best idea was to change everything back.

Cheers
Axel

Signature · 2 lines
Echte DSL-Flatrate dauerhaft f?r 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

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

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Cluster and Storage Development                   56242 Marienrachdorf
                                                  Germany
[email protected]                            +49 2626 141200
                                                       FAX 924446

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

author
#4 lore raw

Hallo Heinz,

Quoted 11 lines
Quoted 5 lines
Quoted 2 lines

vgrename the active one and adjust /etc/fstab appropriately. 'vgscan;vgchange -ay' should gain you access to the USB one then.

After deactivation I could change the name, but after the reboot the dm-mapper was still looking for the old volume group 'system'. I tried

to

Quoted 1 line

boot the rescue system, maybe the inittab needed a refresh - but that

did

Quoted 1 line

not work.

Did you change /etc/fstab ?

yes, even before I changed the vgname

Ax

Signature · 2 lines
"Feel free" mit GMX FreeMail!
Monat f�r Monat 10 FreeSMS inklusive! http://www.gmx.net
author
#5 lore raw

Solved: [linux-lvm] LVM2 on a USB-disk/ same VG name

In reply to Heinz Mauelshagen

Hallo Heinz,

** Reply to message from Heinz Mauelshagen <[email protected]> on Thu, 9 Mar 2006 14:31:01 +0100

Quoted 6 lines · Axel Braun
Quoted 5 lines

Hello Heinz,

Quoted 2 lines

vgrename the active one and adjust /etc/fstab appropriately. 'vgscan;vgchange -ay' should gain you access to the USB one then.

Quoted 6 lines
Quoted 4 lines

After deactivation I could change the name, but after the reboot the dm-mapper was still looking for the old volume group 'system'. I tried to boot the rescue system, maybe the inittab needed a refresh - but that did not work.

Did you change /etc/fstab ?

The missing element was: Change settings for bootloader (/boot/grub/menu.lst)

The way it worked for me:
- change settings in /etc/fstab and /boot/grub/menu.lst
- boot the rescue system from CD (otherwise the volume groups are still active)
- do a vgrename / vgsan
- reboot

Cheers
Axel

Signature · 6 lines
Dr.-Ing. Axel K. Braun
Mobile: +49.173.7003.154
VoIP/Skype: axxite
 
To lead the people, walk behind them.
(Lao Tse)