Operating System - HP-UX
1752406 Members
5755 Online
108788 Solutions
New Discussion юеВ

Splitting a volume and creating new VG from that vol

 
ibnabbas
New Member

Splitting a volume and creating new VG from that vol

I am new to HP-UX. I have a requirement to split a mirrored volume (abc) from the VG (vgsource) and create a new VG (vgbackup) from that LUN (/dev/disk/disk111) and keep the same volume name (abc) and mount it as a separate filesystem.
9 REPLIES 9
Torsten.
Acclaimed Contributor

Re: Splitting a volume and creating new VG from that vol

It is not clear at all what you want to do.

If you split a mirrored *LVOL* (see lvsplit), then this new LVOL is inside the same VG, of course. Once splitted, you can mount it.

Creating a new VG means delete the data.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Manix
Honored Contributor

Re: Splitting a volume and creating new VG from that vol

Looks you are trying to get a free LUN /disk
which is part of a mirror lvol.

You need to split the mirror then reduce the
VG to free up the PV ( lun /dik) and then recreate a new VG from scratch ,you need
pvcreate ,vgcraete ,lvcreate ( same name can be used ).

Hope this help.

Thanks
Manix
HP-UX been always lovable - Mani Kalra
Torsten.
Acclaimed Contributor

Re: Splitting a volume and creating new VG from that vol

still not clear - same name for what???

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
ibnabbas
New Member

Re: Splitting a volume and creating new VG from that vol

Tortsen,

Let me rephrase.

Situation : The lvol abc is mirrored across 2 disks (disk21 and disk111) in VG vgsource.

Both disks are fine.

I want to break the mirror take disk111 out of vgsource and be able create a new VG (say vgnew) using disk111 and recreate the lvol abc with data well preserved !!!

Thanks.
ibnabbas
New Member

Re: Splitting a volume and creating new VG from that vol

Oh! you mean I cant take an lvol from one VG and move it to another VG (new or exisitng) ?
Torsten.
Acclaimed Contributor

Re: Splitting a volume and creating new VG from that vol

Exactly.

A LVOL always remains in the same VG.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
ibnabbas
New Member

Re: Splitting a volume and creating new VG from that vol

Any solution how I can clone the current lvol and move that data to another lvol in another VG.

Thx
Torsten.
Acclaimed Contributor

Re: Splitting a volume and creating new VG from that vol

"clone" may be the keyword ...


Is your array able to "clone"?


However, you may consider to create another LUN, VG and LVOL and copy the data.


Why do you need the data in another VG?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Emil Velez
Honored Contributor

Re: Splitting a volume and creating new VG from that vol

I actually demonstrate this capability.

Assumption the lvol that you split off is on a separate disk


Example: VG has LVs 1, 2, and 3 on PVs 0 and 1. LVs 4, 5, and 6 on PVs 2, 3, 4, and 5.
# vgchange -a n VG
# vgexport -m MAP VG
# vgchgid PV2 PV3 PV4 PV5
# mkdir /dev/VG;
mknod /dev/VG/group c 64 0xnn0000
# Where nn is the original volume group number.
# mkdir /dev/new_VG;
mknod /dev/new_VG/group c 64 0xmm0000
# Where mm is the new volume group number.
# vgimport -m MAP /dev/VG PV0 PV1
# vgimport -m MAP /dev/new_VG PV2 PV3 PV4 PV5
# vgchange -a y -q n VG;
# vgchange -a y new_VG
# lvremove -f VG/LV4 VG/LV5 VG/LV6 new_VG/LV1 new_VG/LV2 new_VG/LV3
# vgreduce -f VG;
# vgreduce -f new_VG
# vgcfgbackup VG; vgcfgbackup new_VG

This is not a supported procedure or capability but it is using supported commands

Think it through and try it on crash and burn system.