Operating System - HP-UX
1753798 Members
7958 Online
108805 Solutions
New Discussion юеВ

Re: Moving extents on one disk to another disk

 
SOLVED
Go to solution
Danny Baldono
Frequent Advisor

Moving extents on one disk to another disk

I have two node cluster (HPUX-SG).
I need to remove two luns on a vg (cluster lock vg vgsapsys). The two luns are c9t2d0 and c9t2d1. The two luns are part of a vg (vgsapsys) comprises of ten luns. I want to remove these luns but these luns contain two lv's. I still need one of the lv's. The c9t2d0 contains lv's lvabap and lvabapvanman while the c9t2d1 has lvabap and lvabapsss. I still need the twoo lvabap's on the two luns. How can I transfer this to another lun in the same vg vgsapsys. Will it affect my data?
Don't fix a good machine or you will end up fixing it.
5 REPLIES 5
Pedro Cosmen
Valued Contributor

Re: Moving extents on one disk to another disk

Hello Danny,

The command pvmove will do this.

# pvmove -n /dev/vgsapsys/lvabap /dev/dsk/c9t2d0 /dev/dsk/lun_of destination.

And the same with c9t2d1.

Regards.
Mobeen_1
Esteemed Contributor

Re: Moving extents on one disk to another disk

Danny, please do the following

pvmove -n

regards
Mobeen
Danny Baldono
Frequent Advisor

Re: Moving extents on one disk to another disk

Remember this is on the Service Guard environment. I already done this, my concern is that this is in a cluster. Is there any other things to like vgexport/vgimport. If I pvmove the lv to another disk will it not affect my data. Do my application will run after this pvmove.
Don't fix a good machine or you will end up fixing it.
Danny Baldono
Frequent Advisor

Re: Moving extents on one disk to another disk

The primary reason for the pvmove is to free the two disks (c9t2d0 and c9t2d1)that I have.
Can I do the pvmove online without affecting my running application on which these two disks are on the same vg. Please check my procedure if this is correct.

1. cp - p /etc/lvmconf/vgsapsys.conf /etc/lvmconf/vgsapsys.conf.org. I am doing this in case the pvmove fails I still can go back to the old config.
2. pvmove -n /dev/vgsapsys/lvabap /dev/dsk/c9t2d0 /dev/dsk/c8t11d3
3. pvmove -n /dev/vgsapsys/lvabab /dev/dsk/c9t2d1 /dev/dsk/c8t11d3
4. lvremove -f /dev/vgsapsys/lvabapvanman
5. lvremove -f /dev/vgsapsys/lvabapsss
6. vgreduce /dev/vgsapsys /dev/dsk/c9t2d0
7. vgreduce /dev/vgsapsys /dev/dsk/c9t1d0




Don't fix a good machine or you will end up fixing it.
Pedro Cosmen
Valued Contributor
Solution

Re: Moving extents on one disk to another disk

Danny,

If this Vg is part of the cluster, you must reflect the changes in the rest of the nodes.

On the node you have made the pvmove:

# vgexport -p -m mapfile vgsapsys

Then copy the mapfile to the oher node(s)

On the other node(s):

# ll /dev/vgsapsys/group (to see the minor number)
# vgexport vgsapsys
# mkdir /dev/vgsapsys
# mknod /dev/vgsapsys/group c 64 0xNN0000 (where NN is the same that had before)
# vgimport -m mapfile /dev/vgsapsys /dev/dsk/... (the PV's of vgsapsys in each node)

Regards