Operating System - HP-UX
1833758 Members
2626 Online
110063 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?
Pete Randall
Outstanding Contributor

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

Babs,

In order to figure out exactly where lvols are located you can use the pvdisplay command:

pvdisplay -v /dev/disk/c1t5d0 |more

(you'll need to fill in your own device path)

The first screen or so is all you need. It should look something like this:

--- Physical volumes ---
PV Name /dev/dsk/c1t5d0
VG Name /dev/vg00
PV Status available
Allocatable yes
VGDA 2
Cur LV 4
PE Size (Mbytes) 4
Total PE 1023
Free PE 301
Allocated PE 722
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg00/lvol6 71 71
/dev/vg00/lvol7 16 16
/dev/vg00/lvol8 385 385
/dev/vg00/lvol9 250 250

--- Physical extents ---


We don't need all the Physical extents info, just the distribution.

Do this for each of your disks and let us know what you've got.


Pete



Pete
Pete Randall
Outstanding Contributor

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

Babs,

A Volume Group can't contain just part of a disk. We've got to clean out the whole thing.

You mentioned that lvol3 is "partly on disk 2". Your bdf output identifies lvol 3 as being /, which needs to be contiguous, so I don't think it's partly on disk 2.


Pete



Pete
Massimo Bianchi
Honored Contributor

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

Hi Pete,
the pvdisplay -v is in the question of the thread !

--- 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

Massimo
Pete Randall
Outstanding Contributor

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

Thanks, Massimo - how did I miss that.

Assuming that's all that's on disk 2, then all you have to do is get rid of enough lvols on disk 1 to give you space enough to create a new /tmp and a new /home. Call them /tmpnew and /homenew, then copy the contents of /tmp and /home to /tmpnew and /homenew, switch the mountpoints in /etc/fstab and reboot. That should leave you with nothing but non-root lvols on disk2 that you can safely blow away, vgreduce, vgcreate your new vg01, and build lvols in it.


Pete



Pete
Massimo Bianchi
Honored Contributor

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


lvol4 -> /tmp
you must go into maintenance mode, resize the lvol and newfs it. You will lose your data, but usually /tmp has nothing important; but first please check !
resize to 124 LE, so it will fit into first disks

lvol5 -> /home
If you can compress some data, or delete futile "core" or old things, we may go down to 50PE, that is the size of disk1 related lvol... sorry, i'm missing a coffee :)

we shall reduce home to the original size... with some copy in single user, if you can reclaim space, you can do. but you need to do some tiling work..

####

lvol9 -> /u01

lvol10 -> /u02

lvol13 -> /projects

These are harder.

What can we lose from this directory ? Are they shreddable (read: completely erasable ? ) If not, how much must we retain ?





Robert-Jan Goossens
Honored Contributor

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

Hi Babs,

How about buying an extra disk, have you got a budget for it ?

Copy data from vg00 into a new vg01.

Kind regards,

Robert-Jan.
Pete Randall
Outstanding Contributor

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

Along Robert-Jan's line of thinking: you could also buy a tape drive and go back to the Ignite route, but I think it would be cleaner to have the extra disk drive if you can afford it and your machine can contain it.


Pete



Pete
Babs_1
Frequent Advisor

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

Hi Pete;
Thanks for the reply,
Will see if I can do this and will let you know how it goes :)

Massimo;
I hope I am not the reason your missing a coffee!!! Go get it now!!!!
I will try Petes suggestion first as I can only access this machine from my Win2000 machine I do have Secure webconsole but have never gone into single user mode before :(
But thanks so much for all your help and advice :)

Robert;
Have just been pleading with my boss to get me another disk....we live in hope!!!!
Robert-Jan Goossens
Honored Contributor

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

Babs,

keeping my fingers crossed for you.

I'm on vacation for the next 2 weeks, but you are in very good hands with Pete, Massimo and the rest of the forummers.

Friendly salute,

Robert-Jan.

Italie here I come. (:-)))
Babs_1
Frequent Advisor

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

Thanks :)
Have a great time!!!