Shrink Volume in V7000

When we shrink one of the volume in our IBM Storwize V7000, upto 100GB its shrinks well on storage but the shrink space was not reflected on the volume group, it still shows the same space that it has before shrinking. Should I have to export/import the volume group.

You have to have the the system find out somehow that its hardware has changed. Have you let "cfgmgr" run?

I hope this helps.

bakunin

I perform following steps:
1- Varyoff the volume on host.
2- Unmap all the VIOS host attached with that volume on v7000 storage.
3- Shrink the volume upto 100GB
4- Remap the volume to VIOS
5- Run cfgmgr
6- Export/Import the Volume group

But result is still same. Is there any mistake in my above steps?

My experience is only with "growing" a LUN, but from memory the command is chvg and the flag is either -g or -G .

Michael

Yes growing a Lun is not an issue I have expanded the LUN many time & it expand easily after running chvg -g volumegroupname .

The issue is with shrinking the volume, I don't know why the shrinking doesn't work.

I would have to guess about issues with shrinking - and my best guess is that they have anticipated changes for "disks" that grow - in updating the VGDA structure, but that it is more difficult, or impossible for your current hdisk PV allocation to make he VGDA mapping smaller.

Maybe a reorgvg is needed to move "inner" partitions more to the edge - again I am guessing that a volume grows by getting a larger inner area.

So, maybe verify that the "inner" area is free with

# lspv -p hdisk0

Maybe this helps!?:wall:

Alas!! nothing helps at all.

I also check the article available at from IBM developer works:

http://www.ibm.com/developerworks/aix/library/au-aix-online-migration/au-aix-online-migration-pdf.pdf

It states that if you will go for shrink the PV you will be going to damage the data.:mad:

I think you did everything you could have done with your procedure. Sorry for asking, but this is not necessarily the case in all threads, so i had to make sure.

I am with MichaelFelt on this one: it is probably not possible, quite like the shrinking of LVs was not possible for a long time (while enlarging LVs was easy). You didn't tell us which AIX version you are using and i am not sure if shrinking a VG even should be possible according to the specs. In case it is i suggest opening a PMR.

I hope this helps.

bakunin

in my opinion, shrinking a lun without data loss can only be possible with additional software on the operating system, special drivers, that communicate with lvm

with the vio server in between, this is not an easy task I guess, because you are missing the direct mapping storage lun to aix pv, so you might need npiv

if you want to shrink luns online, you can use thin provisioned luns if your storage supports it
its not trivial, but possible to free space up after it has been claimed

The other, and perhaps easiest approach would be to:

  1. add a second disk aka LUN, (could include thin provisioning if available) at the desired size
  2. mirrorvg (rather than migratepv - personal preference)
  3. once the copy is complete, unmirrorvg the excessive LUN,
  4. reducevg - removing the excessive LUN
  5. rmdev -l hdiskX (to make it inactive)
  6. wait for SAN team to remove LUN accessibility
  7. rmdev -dl hdiskX to remove it from ODM

Hope this helps!

@bakunin

I am not complaining about forum, truly it is a great forum.
Thanks for all the support and guidance from everyone.

Our OSlevel is: 6100-08-02-1316