Skip to contentSkip to conversation

How to change the PV Volume Group name?

linux-lvm Doug Gray 2 participants 2 messages Jan 26, 2009

lore
Share & tools
lore

Doug Gray

author
#0 lore raw

Hi,
I am a new here and new to lvm management, so be gentle please.

I have systems running of CF cards that were created using the normal installation as was my desktop system.

I would like to mount the CF cards via USB device and gain access to the contents of the lvm partition on my desktop system to be able to perform maintenance.

Additionally it would be helpful to be able to mount the CF image in loop mode so I can make modifications without the physical hardware.

Following the guide here:
http://tldp.org/HOWTO/LVM-HOWTO/recipemovevgtonewsys.html

I can see how to mount the CF partition... but what I don't follow is how the distinction is made when the PV VG Name are the same, ie the default 'VolGroup00'

I don't see a facility in pvchange to change the name.

Is it necessary to change the name?

How do I mount the CF partition?

How do I mount the CF partition file image?

I would be grateful for any help. This is straight forward with the normal disk volumes and partitions but to do so with lvm I am bamboozled.

Doug Gray

From my system:

[root@vulcan ~]# pvdisplay /dev/sda2
--- Physical volume ---

  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               1.80 GB / not usable 22.20 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              57
  Free PE               1
  Allocated PE          56
  PV UUID               GmT4UA-X3QN-QkGd-pMls-iIlp-UIUd-dmnE5F

[root@vulcan ~]# pvdisplay /dev/hda2
--- Physical volume ---

  PV Name               /dev/hda2
  VG Name               VolGroup00
  PV Size               186.21 GB / not usable 21.74 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              5958
  Free PE               1
  Allocated PE          5957
  PV UUID               02l6cp-88zz-4lbU-3Nut-cb04-5Bkj-yUHkRZ
#1 lore raw

Quoting Doug Gray <[email protected]>:

Quoted 5 lines

Hi,
I am a new here and new to lvm management, so be gentle please.

I don't see a facility in pvchange to change the name.

I think you are looking for vgchange and not pvchange for this.

Quoted 1 line

Is it necessary to change the name?

It is helpful to name your vg's something other than letting the system name them. that way you won't have multiple vg's named the same, which quickly will become a nightmare to work with.

Quoted 1 line

How do I mount the CF partition?

Look at dmesg and see what device it is then mount it like a normal drive.

Quoted 1 line

How do I mount the CF partition file image?

If it is a vg then you will want to run
'vgchange -ay'
vgscan

The issue the lvs command to see your lv's.

Then you can mount the individual lv's of the vg.

Quoted 5 lines

I would be grateful for any help. This is straight forward with the normal disk volumes and partitions but to do so with lvm I am bamboozled.

Doug Gray

Hope that helps,

Jon