Operating System - HP-UX
1753280 Members
5614 Online
108792 Solutions
New Discussion юеВ

2disk 1vg; plan to create another vg and move lvol

 
SOLVED
Go to solution
Babs_1
Frequent Advisor

2disk 1vg; plan to create another vg and move lvol

Hi all,
I have an Lclass 900 with HPUX 11.0
Here is my question, sorry that should really be questions!!!
I have 2 disks in 1 vg00, Bad I know some of the data in the lvol in on both disks eeckkk!!! I would like to split them back into 2 vg's and move aound some of my lvol. However I have identified that disk 1 contains /, /stand, /var /opt etc. so I would like to leave that one alone :)
Here are some of my details pvdisplay on the disk I want to create a new vg on (disk 2);

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol4 101 101
/dev/vg00/lvol5 75 75
/dev/vg00/lvol9 1625 1625
/dev/vg00/lvol10 2102 2102
/dev/vg00/lvol13 162 162

These are the lvols I want to backup and remove and recreate/restore on the new vg after creation. however some of there data is on disk 1.
What happens to that data on disk 1 when I restore the data to the newly created lvol on new vg01???
Can I reclaim that space on disk1 used by the lvol that will now be on disk 2
One of the lvol is /home are there any negative impacts of moving this?
I have onlinejfs, but do I need to be in single user mode to lvremove these lvol's(/tmp etc.
Am I planning this in the right way?
What are the potential pitfalls?
I appreciate you all taking time out to help me on this :)
Thanks
Babs :)
19 REPLIES 19
Massimo Bianchi
Honored Contributor
Solution

Re: 2disk 1vg; plan to create another vg and move lvol

Hi Babs,
nice to see you again.

Before a full answer, please post output of these commands:


vgdisplay -v vg00

bdf


Generally speaking, if there is an lvol across two disks, data will be lost, we need to reduce the lvol, or move the data.

But we need the output of mentioned command to give you a plan.

HTH,
Massimo
Pete Randall
Outstanding Contributor

Re: 2disk 1vg; plan to create another vg and move lvol

Babs,

I think the safest way for you to do this is to make an Ignite make_tape_recovery backup and use it to rebuild your vg00 first, then you can create a vg01 on the second disk and restore from a conventional backup the data that you want there. You can download Ignite from here:

http://www.software.hp.com/products/IUX/index.html


Pete



Pete
Ian Dennison_1
Honored Contributor

Re: 2disk 1vg; plan to create another vg and move lvol

Hi Babs,

Have you considered 'pvmove'? I use it all the time to relocate lvols from 1 disk to another on Oracle Database Lvols.

2 potential problems,....

1. Some lvols require contiguous space, can't remember them off the top of my head.

2. You will not be able to reclaim space (if that is a side-benefit you want to pursue)

3. Pvmove will not worked on striped lvols (not the case here, I assume)

In the case of /tmp, you will need to be in Single User mode as a lot of processes tie up /tmp with temporary files.

This is going to be real fiddly to do with just 2 disks; do you have a 3rd you can use temporarily? What I would do as follows,...

Extend vg00, add in a 3rd disk
Pvmove all extents of all lvols to be relocated from 1st and 2nd disk to 3rd disk
Pvmove all extents of all lvols to remain in vg00 to 1st disk.
Vgreduce second disk out of vg00
Create new VG on second disk, create new lvols on new VG
Boot into single user mode, mount lvols and copy across lvol data to vg01, lvremove old lvols from vg00, vgreduce 3rd disk.

This is slightly longwinded but reduces the amount of Single User modes needed to just 1.

Share and Enjoy! Ian
Building a dumber user
Robert-Jan Goossens
Honored Contributor

Re: 2disk 1vg; plan to create another vg and move lvol

Babs,

Have you got a vg01 ?

If you have, is there enough free space inside vg01 ?

Could you post an output from ?
# bdf

Robert-Jan.
Massimo Bianchi
Honored Contributor

Re: 2disk 1vg; plan to create another vg and move lvol

Hi,
for all who read this message, please take also a look at this:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5cd1506d69a7d711abdc0090277a778c,00.html


This second thread is its son...

There is the need to reinstall the server, keeping the second disk free for recovering information purpose.

Massimo
Babs_1
Frequent Advisor

Re: 2disk 1vg; plan to create another vg and move lvol

 
Babs_1
Frequent Advisor

Re: 2disk 1vg; plan to create another vg and move lvol

opps of course that was vgdisplay -v not -c
Pete Randall
Outstanding Contributor

Re: 2disk 1vg; plan to create another vg and move lvol

Babs,

You're right. Without a locally attached tape drive, Ignite is pretty much out of the question. It will take some very careful planning to remove all the logical volumes on the second disk without affecting any of your root volumes (essentialy lvol1 through lvol8). If removing lvol9 through lvol14 will entirely free up the second disk, then this should be quite do-able.


Pete



Pete
Babs_1
Frequent Advisor

Re: 2disk 1vg; plan to create another vg and move lvol

Hi Pete,
was afraid that was the case with ignite :(
Lvol4, lvol5 are partly on disk2 these are /tmp and /home. lvol9, lvol10 and lvol3 are mostly on disk2 these are oracle volumes and some other data. lvol11, lvol12 and lvol14 are on disk 1 but only contain mapdata and old oracle mount points....
Perhaps a vg01 on most of disk2 rather than all of disk2 is my only option it seems?