Operating System - HP-UX
1820236 Members
2824 Online
109620 Solutions
New Discussion юеВ

"lvchange -s g -D f" online execute?

 
SOLVED
Go to solution
SUN WEIFENG
Trusted Contributor

"lvchange -s g -D f" online execute?

Customer want to migrate data,they will use mirror lv from one storage to another storage.

Vg01 has created pvg01 and most of lv use distribution(lvcreate -s g -D y). But one of lv( name lvdt27)hasn't used "-s g -D y".But customer hope to change lvdt27 to pvg-strict/distribution after mirror .

My action plan:
vgextend /dev/vg01 -g pvg_new ...
lvextend -m 1 "another lv"
lvchange -s g -D f /dev/vg01/lvdt27
lvextend -m 1 /dev/vg01/lvdt27 pvg_new
lvreduce -m 0 /dev/vg01/lvdt27 ...
vgreduce ...

My question:
My action is right?
I can execute command "lvchange -s g -D f /dev/vg01/lvdt27" online, cann't I?
5 REPLIES 5
Johnson Punniyalingam
Honored Contributor

Re: "lvchange -s g -D f" online execute?

Hi SUN,

All steps looks ok , except

>>lvchange -s g -D f /dev/vg01/lvdt27<<

Above command to change the PVG-Strict or Distributed allocation policies.

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Eric SAUBIGNAC
Honored Contributor
Solution

Re: "lvchange -s g -D f" online execute?

Bonsoir,

Did something like this a few days ago, and it worked pretty well for me. My problem what that someone created a mirrored LV without distributing LE against disks ...

After "lvchange -s g -D f /dev/vg01/lvdt27" or "lvextend -m 1 /dev/vg01/lvdt27 pvg_new" you will see that /dev/vg01/lvdt27 is "PVG-Strict/partially-distributed"

After "lvreduce -m 0 /dev/vg01/lvdt27 ..." you will see that lvdt27 will become "PVG-Strict/distributed". That's because there will be no more contiguous extend in the LV.

Just be aware that when you will "lvreduce -m 0 dev/vg01/lvdt27 disk1 disk2 ...", you will have to specify all the disks that are in the old pvg01

Eric
SUN WEIFENG
Trusted Contributor

Re: "lvchange -s g -D f" online execute?

hi Eric:
Thanks for your reply.

I can execute command "lvchange -s g -D f /dev/vg01/lvdt27" online, cann't I?
Eric SAUBIGNAC
Honored Contributor

Re: "lvchange -s g -D f" online execute?

Sorry SUN, late answer : out of office.

Yes you can do lvchange on line.

Eric
SUN WEIFENG
Trusted Contributor

Re: "lvchange -s g -D f" online execute?

hi eric:
Thank you very much.



Sun WeiFeng