Operating System - HP-UX
1828217 Members
2145 Online
109975 Solutions
New Discussion

Adding disk to current Mirrored VG00

 
Felix_23
Occasional Contributor

Adding disk to current Mirrored VG00

Currently I had two disk, A and B. A and B are both under VG00 and mirrored. Each disk size is 36GB. As my data grow over the year, I need to expand the size of VG00. I had two new 36GB harddisk. What is the proper step to add in these two harddisk as I want them to be mirrored also. I need to extend my /var over to the new disk after adding the new disk and it also had to be mirror.
6 REPLIES 6
RAC_1
Honored Contributor

Re: Adding disk to current Mirrored VG00

while you can add more disks in vg00(also controlled by max pvs setting for vg) a good practise should be putting system related data in vg00 and using seperate vg for applications/databases etc.

This would help in management and backups also.

You can extend the mirror onto a particular disk as follows.
Add the disks to vg
pvcreate on disks and then
vgextend /dev/vg00 /dev/dsk/cxtxdx

lvextend -m 1 /dev/vg00/lvolx /dev/dsk/cxtxdx

Also do you have seperate FS for var, I prefer putting /var, /var/opt/perf, /var/stm, /var/adm/sw seperate FS.

Anil
Anil
There is no substitute to HARDWORK
Felix_23
Occasional Contributor

Re: Adding disk to current Mirrored VG00

Adding the new disk to the Mirrored VG00 is not a problem. The main problem is how am I going to extend /var over to the new disk and make them mirrored to each other in the new disk. At the end of the day I had two disk and it is mirrored to the other two.
Rick Garland
Honored Contributor

Re: Adding disk to current Mirrored VG00

You can move some (or all) of the stuff from var to the new disk, make a sym link from the old var location pointing to the new location, go through your mirror process using the new disk values.
Felix_23
Occasional Contributor

Re: Adding disk to current Mirrored VG00

Maybe this pic will explain what I really want. I had A and B under VG00. How am I going to add in C and D so that A will mirrored to B and C will mirrored to D.
So if I want to extend /var over from A over to C, do I need to break the mirror copy?

Rick Garland
Honored Contributor

Re: Adding disk to current Mirrored VG00

Add the new disks, C & D and vgextend vg00 to include the new disks. Move (copy) the var stuff to the new C disk. Break the mirroe on A/B and then recreate, without the var lvol. Create the mirror on C/D with the var lvol.
Tom Danzig
Honored Contributor

Re: Adding disk to current Mirrored VG00

If you simply extend the two disks into vg00, you should be fine. Assuming that /var lv allocation is strict (the default) and it is mirrored already, if /var is extended past the boundries of disk A/B, it will continue to C/D without any intervention on your part.

If you go ahead and do the lvextend on /var and the do an lvdisplay -v on /var, this is what you should see.