1752273 Members
4712 Online
108786 Solutions
New Discussion юеВ

LV remove from a disk

 
SOLVED
Go to solution
HP UX Admin
Advisor

LV remove from a disk

Hi,

I have a LV in disk 'A' with 2 mirror copies in other disks.I want the LV to be removed from the disk 'A '.

mirrored LV should be available in other disks .

Pls help me on this....
8 REPLIES 8
Torsten.
Acclaimed Contributor
Solution

Re: LV remove from a disk

Use

# lvreduce -m 0 /dev/vg12/lvol4 /dev/dsk/c0t1d0

to remove the lvol4 of vg12 from disk c0t1d0.

If you have more mirrors, adjust the "-m x" value.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
HP UX Admin
Advisor

Re: LV remove from a disk

Hi Torsten,

Thanks for your valuable reply.

I will try the command and will let you know.
HP UX Admin
Advisor

Re: LV remove from a disk

Hi,

Should i follow any commands after lvreduce ?
Will it be available in mirrored disks?

will the lvdisplay show the LE on mirrored disks?



Torsten.
Acclaimed Contributor

Re: LV remove from a disk

You can use "pvdisplay" and "lvdisplay" to get more information.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Bijeesh
Respected Contributor

Re: LV remove from a disk

hi,
You have to use

#lvreduce -m 1 /dev/vgnn/lvnn /dev/dsk/diskA

This will remains no:of mirror copies to 1.
ie.The LV is available in two disks(One original and one mirror copy).

note Torsten's comment
"If you have more mirrors, adjust the "-m x" value"
Which command you have applied?
HP UX Admin
Advisor

Re: LV remove from a disk

Hi Bijeesh,

I want to remove the original copy and need to use the disk for other VG.


Bijeesh
Respected Contributor

Re: LV remove from a disk

#lvreduce -m 1 /dev/vgnn/lvnn /dev/dsk/diskA
This will remove the LV,(/dev/vgnn/lvnn) from the disk,/dev/dsk/diskA .

Do the same for all the LVs belongs to that PV.
Verify with lvdisplay and pvdisplay.
If everything OK, remove the disk from the VG.

#vgreduce /dev/vgnn /dev/dsk/diskA.

Verify with vgdisplay and #strings /etc/lvmtab.

It is better you keep a backup of lvmtab and vgnn.conf before doing this.
#cp /etc/lvmtab /etc/lvmtab.bak
#cp /etc/lvmconf/vgnn.conf /etc/lvmconf/vgnn.conf.bak


P Arumugavel
Respected Contributor

Re: LV remove from a disk

Hi,

Best practice in my suggestion is do the complete breaking mirror and do pvmove to move the physical extents for logical volume /dev/vgxx/lvolx that are currently on /dev/dsk/cxtxdx to /dev/dsk/cytydy. Then u mirror it from here as you desire to keep the mirrors.

Cool...