1831919 Members
3396 Online
110031 Solutions
New Discussion

Removing Logical Volume

 
SOLVED
Go to solution
Cliff Lim Kok Hwee
Regular Advisor

Removing Logical Volume

Gd Day Forumers,

I need to mirror an existing lv and once mirror would like to remove the original copy.

New harddisk: /dev/rdsk/c8t5d6

Original copy: /dev/vg30/lvol1 residing in /dev/dsk/c7t5d0

I will be doing the following steps:
1)vgextend /dev/vg30 /dev/dsk/c8t5d6
2)lvextend -m 1 /dev/vg30/lvol1 /dev/rdsk/c8t5d6
3)lvreduce -m 0 /dev/vg30/lvol1 /dev/dsk/c7t5d0

Query: Will there be any impact to my above mentioned steps?

Thanks/cliff

11 REPLIES 11
Devender Khatana
Honored Contributor
Solution

Re: Removing Logical Volume

Hi,

There should not be any impact except that the access will be quite slow if you intend to do it online and either of two disks are in use.

HTH,
Devender
Impossible itself mentions "I m possible"
Sunil Sharma_1
Honored Contributor

Re: Removing Logical Volume

Cliff,

I think you want to remove old disk. You can use pvmove command. First add new disk to same Volume grou and then use pvmove command.

#pvmove


Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Cliff Lim Kok Hwee
Regular Advisor

Re: Removing Logical Volume

Hi Deva,

Will it be locking the primary harddisk while i try to perform lvreduce if it is writing to primary harddisk?

Thanks/cliff
Cliff Lim Kok Hwee
Regular Advisor

Re: Removing Logical Volume

Hi Sunil,

I need to keep existing data onto new disks. Therefore pvremove will not be appropriate.

Correct?cliff
Devender Khatana
Honored Contributor

Re: Removing Logical Volume

Hi,

No it does not lock any of the disks and read/writes to both will happen normally. The only impact will be slow performace as stated earlier.

Sunil,

pvmove will move all PE's of the disk to new disk which is not the intention here.

HTH,
Devender
Impossible itself mentions "I m possible"
Devender Khatana
Honored Contributor

Re: Removing Logical Volume

Hi,

If you want to remove the old disk having copy all its data to new disk then pvmove is the single command to achive that.

It is pvmove not pvremove. "man pvmove" for details.

It will be also run if you simple reduce the VG from the old disk after extending to the new disk.

HTH,
Devender
Impossible itself mentions "I m possible"
Cliff Lim Kok Hwee
Regular Advisor

Re: Removing Logical Volume

Hi Forumers,

Am I right to presume my mentioned steps are correct?

Thanks/cliff :)
Devender Khatana
Honored Contributor

Re: Removing Logical Volume

Hi,

Yes the steps are correct. You can go ahead.


HTH,
Devender
Impossible itself mentions "I m possible"
morganelan
Trusted Contributor

Re: Removing Logical Volume

I think you must using /dev/dsk/c8t5d6, not /dev/rdsk/c8t5d6 in lvextend command.I think after this, your commands are correct.
Kamal Mirdad
Adisuria Wangsadinata_1
Honored Contributor

Re: Removing Logical Volume

Hi Cliff,

You wanna move /dev/vg30/lvol1 from c7t5d0 into c8t5d6 with mirror, right ?

You can do the steps that wrote above, but the best way if there's no activity running on /dev/vg30/lvol1 when you want to lvreduce the one on c7t5d0 (either on the low peak or you shutdown the application that using this lvol).

The good way to do it if you have a downtime slot for it and make sure you have also a good backup.

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Cliff Lim Kok Hwee
Regular Advisor

Re: Removing Logical Volume

Yes guys,

Thanks for highlighting the EXTRA "r" in rdsk

You wanna move /dev/vg30/lvol1 from c7t5d0 into c8t5d6 with mirror, right ? YES correct.

Thanks/cliff :)