Operating System - HP-UX
1833770 Members
2706 Online
110063 Solutions
New Discussion

move vg00 to another disk (from c1t0d0 to c2t2d0)

 
SOLVED
Go to solution
erich hummel_1
Advisor

move vg00 to another disk (from c1t0d0 to c2t2d0)

Hi IT´s

my disk on c1t0d0 becomes any times critical errors an i would move the Vol´s form this disk to another.

FROM:
PV Name /dev/dsk/c1t0d0
PV Status available
Total PE 1085
Free PE 0
Autoswitch On

TO:
PV Name /dev/dsk/c2t2d0
PV Status available
Total PE 4374
Free PE 1245
Autoswitch On

Some Vol´s are distributed on all 3 disks on my system.
How can i move the vol´s from c1t0d0 to c2t2d0 ?
what are the commands to to this (command series)

Thanks, Eric
21 REPLIES 21
Luk Vandenbussche
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

What are the lvol on your disk c1t0d0

As long it is not /stand and / you can do it with mirror/UX

lvextend -m 1 lvol /dev/dsk/c2t2d0
lvreduce -m 0 lvol /dev/dsk/c1t0d0

If it contains boot partitions then you need to work with an Ignite/UX tape

RAC_1
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

We would need more information.

Do you want to move all lvols?? Remember that lvols-/stand, swap and / need to contigeous. For other lvols, you can just use pvmode and move extensts to new disk.

If you are looking at moveing all the lvols, and you have OnlineJFS, you will have to create a mirror copy on the desired disk and then make it primary and remove old if you want.
There is no substitute to HARDWORK
AwadheshPandey
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Eric, Try this:

vgcfgrestore -n vg00 -o /dev/dsk/c1t0d0 /dev/dsk/c2t2d0
man vgcfgrestore
Regards,

Awadhesh

It's kind of fun to do the impossible
Adisuria Wangsadinata_1
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Hi Eric,

It's better you use Ignite/UX features for this. Just backup the vg00 into a bootable tape > shutdown the system > boot from the tape > select the particular disk that you want to be work as vg00 > restore and that's it.

Ignite/UX is a free software, you can get it from this url below :

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=IGNITEUXB

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Devender Khatana
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Hi,

If you have Mirror-Ux installed it can be done easily. It requires following two conditions to be met.

1) If the new disk is part of vg00 allready it should be bootable ( pvcreate -B must have been used while creating PV)

2)Your disk shall not be allocated some extents initially which would be allocated to boot, swap and root LVOLs in continuation from the beginning.

Allthough the same also can be moved to other areas of the disk.

Post these outputs for finding out the feasibility.

#pvdisplay -v /dev/rdsk/cxtydz (For all three disks)

#vgdisplay -v /dev/vg00

#swlist |grep -i mirr

HTH,
Devender
Impossible itself mentions "I m possible"
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Command:
pvdisplay -v /dev/rdsk/c1t0d0

Reply:
pvdisplay: Physical volume "/dev/rdsk/c1t0d0" is not a block special file.
Usage: pvdisplay
[-v]
[-b BlockList]
PhysicalVolumePath...

Whats wrong ?
Muthukumar_5
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Execution of pvdisplay -v /dev/rdsk/c1t0d0 won't work. Just post vgdisplay -v informations.

hth.
Easy to suggest when don't know about the problem!
Devender Khatana
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

My appologies,

Please use dsk instead of rdsk i.e.

#pvdisplay -v /dev/dsk/cxtydz
Where /dev/dsk/cxtydz is the disk device file.

HTH,
Devender

Impossible itself mentions "I m possible"
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

output pvdisplay
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

output vgdisplay
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

This are the LV on the c1t0d0 (lvol6 is also on c2t0d0; lvol9 and lvol12 are on all 3 HD´s)

/dev/vg00/lvol3
/dev/vg00/lvol1 /stand
/dev/vg00/lvol7 /var
/dev/vg00/lvol6 /usr (on 2 HD´s)
/dev/vg00/lvol5 /tmp
/dev/vg00/lvol12 /tempspc (on all 3 HD´s)
/dev/vg00/lvol4 /opt
/dev/vg00/lvol8 /home
/dev/vg00/lvol9 /baan2 (on all 3 HD´s)
/dev/vg00/lvol10 /app

How can i move the vol´s form c1t0d0 to c2t2d0 ?
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

vgcfgrestore -n /dev/vg00 -l
Volume Group Configuration information in "/etc/lvmconf/vg00.conf"
VG Name /dev/vg00
---- Physical volumes : 3 ----
/dev/rdsk/c1t0d0 (Bootable)
/dev/rdsk/c2t0d0 (Non-bootable)
/dev/rdsk/c2t2d0 (Non-bootable)

when the vgcfgrestore move c1t0d0 to c2t2d0, how can i make the c2t2d0 BOOTABLE ?
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

the output form swlist

swlist | grep -i mirr
B2491BA B.11.11 MirrorDisk/UX
Mark Nieuwboer
Esteemed Contributor
Solution

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Hi eric,

You can't move all the lvol's because they other 2 disks aren't bootble disk.
so first you have to make one disk also bootable.
This means recreate the disk with pvremove /dev/rdsk/c2t2d0 and then pvcreate -B /dev/rdsk/c2t2d0
all of your data on that disk is lost if you want this to be preserved.

First
mirror the other lvol lvol13 and lvol14 to /dev/dsk/c2t0d0
with lvextend m 1 /dev/vg00/lvol13 /dev/dsk/c2t0d0 and lvextend m 1 /dev/vg00/lvol14 /dev/dsk/c2t0d0

then

lvreduce -m 1 /dev/vg00/lvol9 /dev/dsk/c2t2d0
vgreduce vg00 /dev/dsk/c2t2d0
pvremove /dev/rdsk/c2t2d0
pvcreate -f -B /dev/rdsk/c2t2d0
vgextend /dev/vg00 /dev/dsk/c2t2d0
mkboot /dev/rdsk/c2t2d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t2d0
mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t2d0

for i in 1 2 3 4 5 6 7 8 9 10 12
do
lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c2t2d0
done

make sure you have a good backup of your files.

to make sure you also can boot from these disk.
do a setboot see the man pages for this.
after this try to reboot your server
from the alternive node.

grtz. Mark
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Thank you MARK, i will try it in the afternoon or tomorrow.
Mark Nieuwboer
Esteemed Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

i have missed the - option so its

lvextend -m 1 /dev/vg00/lvol13 /dev/dsk/c2t0d0 and lvextend -m 1 /dev/vg00/lvol14 /dev/dsk/c2t0d0.

if this give the solution let us know.
Artyom Voronchihin
Respected Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

You also can use pvmove(1m) command, that moves allocated physical extents from one PV to other.
Example:
# pvmove /dev/dsk/c1t0d0 /dev/dsk/c2t2d0
"Intel inside" is not a label, it's a warning.
Gerrit_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Hi,

vgextend vg00 /dev/dsk/c2t2d0
pvmove /dev/dsk/c1t0d0 /dev/dsk/c2t2d0
vgreduce /dev/vg00 /dev/dsk/c1t0d0

Greetz.
I have a vision...... a television
Devender Khatana
Honored Contributor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

Hi,

The allocation seems to be very unplanned and there is no protection as well. ( Mirroring etc).

If you could spare one extra disk for some time then this could be possible without interuptions online. Allthough as in the present scenario the free space is very less, you need to sacrify one LVOL atleast for some time and afterwards restore backup for the same. By removing one LVOL for time being you will get enough space across all disks to move LVOLs here and there so that not more than two or three LVOLs are spread across more than one disk.

Removing the LVOL11 will do this for you. But after recreating this you need to restore backup.

HTH,
Devender
Impossible itself mentions "I m possible"
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

I do the follow way:

strings /etc/lvmtab
pvcreate -B /dev/rdsk/c1t2d0
mkboot -l dev/dsk/c1t2d0
vgextend /dev/vg00 /dev/dsk/c1t2d0

and then i moved "pvmove ...." the vol´s on then new harddisk.

Thanks all, Eric
erich hummel_1
Advisor

Re: move vg00 to another disk (from c1t0d0 to c2t2d0)

strings /etc/lvmtab
pvcreate -B /dev/rdsk/c1t2d0
mkboot -l dev/dsk/c1t2d0
vgextend /dev/vg00 /dev/dsk/c1t2d0