Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move lv to another VG and use the same disk

Status
Not open for further replies.

babcia01

IS-IT--Management
Jul 11, 2002
37
0
0
US
Hi,

I have logical volume logvl1 which is part of rootvg. logvol1 is located on hdisk5. hdisk5 is only used by loglov1.

I want to change loglv1 logical volume to be part of another new VolumeGroup and continue using the same hdisk5.

Is there a quick way to accomplish it?
I am familiar and used steps to move logical volume from one VolumeGroup to another Volume group (different disks).
The above explained situation is is different since I will continue using same hdisk.
 
bro, i dont think u can do this for your lv should be part of a certain volume group. as far as i know you cant have 2 lvs in one disk having owned by 2 different volume groups, correct?Unless, you remove the hdisk5(via reducevg) then include(extendvg ) this one as part of the other volume group you were referring to.
 
Unmount filesystems (if any)
Stop any apps using RAW logical volumes.
varyoffvg <vgname> # 1 minute
exportvg <vgname> # 1 minute
importvg -y <newvgname> hdisk5 # 1 minute

All done. You will need to stop your apps to do this.

BV
 

Sorry but that won't work.
You can't export rootvg and when importing the hdisk5 you'll import the intire rootvg again. Won't change anything.

Basically you can't do this.

Cheers
 
Ah - I missed the part of this meing 'rootvg' Thanks for catching that. I guess I did not read it close enough. I was on 4-hours sleep from tech problems the night before.

BV
 
babcia01,

You say that hdisk5 will be "part" of a new volume group.

Will the new volume group have enough room for the logical volume without hdisk5?

If so:

1. create new volume group without hdisk5
2. move logical volume from rootvg to new volume group (you stated you're familiar with the process)
3. reducevg rootvg hdisk5
4. extendvg newvg hdisk5

If you have a reason (performance, perhaps) for wanting the logical volume to physically reside on hdisk5, you can use migratepv to put it back on hdisk5 after it's added to the new volume group.

If not:

1. backup the logical volume to tape.
2. record information needed to re-create the logical volume
3. reducevg rootvg hdisk5
4. create your new vg
5. re-create the logical volume, now in the new vg
6. restore the logical volume from tape.

Add belts and suspenders to the backup (pull tables of contents, create multiple backups) to your level of comfort before destroying the original logical volume.

Personally, I've white-knuckled more than enough "offload to tape, completely restructure disk system, restore from tape" procedures for a lifetime (one would do, but I've seen more.) Now I just keep enough space hidden on my systems to ensure that I don't have to do that. Sometimes it's a bit of a "three card monte", but it's a lot less stressful having the tape be my second net instead of my *only*. :)

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L

 
Thank you for your answers, especially the last one which was quite extensive. I counted that there could be something quick but after seeing the answers I concluded that I need to resort to the normal, previously used process.
I thought that there could be some special, unknown to me shortcut, to address is since I want to continue using the same hdisk.



 
Thanks for the question. I now know, as well, that there's no shortcut.

The final word would probably be that both mkvg and extendvg state in their notes that "The previous contents of the physical volume are lost, so the user must be cautious when using the override function."

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top