LVM and VxVM

Reduce distributed LV to lesser disks

 
Vishu
Trusted Contributor

Reduce distributed LV to lesser disks

Hi All,

 

I have one distributed LV across 13 disks on HP-UX 11.23, whose size is 650GB. i want to reduce this LV to 450GB and also free up 3 disks from it.

 

Is it possible to reduce this LV to make it as distributed across 10 disks? if so, please provide me with the steps to do it.

 

Thanks

Vishu 

4 REPLIES 4
Bill Hassell
Honored Contributor

Re: Reduce distributed LV to lesser disks

Distributed means that the data is staggered or striped across every disk. Removing even one disk destroys 100% of the entired volume. This is one of the major disadvantages of striped volumes. Your only choice is to backup all the data on the striped disks, unmount all the lvols, then lvremove all the lvols. Now rebuild the lvols, possibly rethinking the advantage versus disadvantage in using striping.



Bill Hassell, sysadmin
Vishu
Trusted Contributor

Re: Reduce distributed LV to lesser disks

Hi Bill,

Thanks for your reply.

 

i can understand that whether reducing the LV size wont free up the disks in this distributed LVs, but by any mean i can free up 3 disks from here and make this LV as distributed on 10 disks instead of 13 disks...either by pvmove or something.

 

Your help will be appreciated.

 

Thanks

Torsten.
Acclaimed Contributor

Re: Reduce distributed LV to lesser disks

IMHO you cannot. Do as advised, make a backup, rebuild the LVOL and restore the data.


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!   
Michael Leu
Honored Contributor

Re: Reduce distributed LV to lesser disks

If you have some spare capacity it is possible to do this with a mirror:

  1. add new temporary disks as a new PVG
  2. assign the current PVs into another PVG
  3. change all lvols to pvg-strict (lvchange -s g)
  4. mirror them to the new PVG (lvextend -m 1)
  5. break the mirror (lvreduce -m 0)
  6. remove the unwanted PVs from the VG
  7. mirror everything back
  8. cleanup...