Link to home
Start Free TrialLog in
Avatar of virgo0880
virgo0880

asked on

Removing Storage from AIX Lpar and VIO server

Hi All,

We have certain lpars which needs to be decommissioned. These lpars are allocated storage from NetApp SAN to the VIO server and then to the lpar. I want to remove the storage from the lpar as well as from the VIO server. kindly let me know how this can be done without any outage or disturbing other lpars or disks on VIO server. It would be helpful if somebody can provide a step by step commands for the same.

Thanks
Virgo
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of virgo0880
virgo0880

ASKER

Thanks for the steps. But can I have more detailed steps on LPAR as wells as VIO? Let me know if this are ok?

On LPAR:

1. Delete LV and VG.
2. Reduce VG
3. Remove the disks using rmdev.

On VIO, I am little bit confused on :

How to identify which disks on VIO corresponds the disks on LPAR, can you give me the steps for the same. Once it is identified I can use above VIO commands to remove. Also, once I delete the disks, how can I remove the lpar profile?

--Virgo
0) If you're going to remove the whole LPAR including all disks just proceed to step (3) below. The first two steps are not required in this case.

1) To empty a single disk hdiskx on the LPAR:

migratepv hdiskx

This will move the contents of hdiskx to other disks in the VG.

2) Take hdiskx out of the VG vgname with

reducevg vgname hdiskx

3) Find  out to which disk on VIOS the LPAR disk hdiskx corresponds:

On the LPAR run

lspv | grep hdiskx

Note the PVid in the second column, something like "00cfc23dfb9bced8" (Example!!)

Now on the VIOS run

lspv |grep PVid

where PVid is the string you found on the LPAR with "lspv | grep hdiskx".

You will find the hdisk's name in the first column.

If you're going to delete the whole LPAR repeat this for all hdisks and go to step (5) below.

4) Remove the single disk hdiskx from the LPAR with

rmdev -dl hdiskx

Attention: Do not run step (4) before step (3), otherwise you will not be able to find the PVid on the LPAR!

5) Assuming that the disk you found on the VIOS in step (3) above was hdisky, run on VIOS as "padmin":

rmvdev -f -vdev hdisky

If you're going to delete the whole LPAR repeat this for all hdisks.

6a) To remove the whole partition lparname from the server server:

Shut down the LPAR lparname and run on the HMC:

rmsyscfg -r lpar -m server -n lparname

6b) To just remove the profile profile from  partition lparname on the server server:

Run on the HMC:

rmsyscfg -r prof -m server -p lparname -n profile
Thanks Wmp, I was able to remove the storage from lpar and VIO server using the instructions above. As of now we have decided not to delete the lpar.

So, I just want to know whats the difference between deleting the lpar and deleting the lpar profile. If I delete lpar profile, whether I can start the lpar again if required?

--virgo
If it's the only profile (an LPAR can have several, alternate profiles) all LPAR settings will be gone, and all that remains is the pure definition (name, number, ...).

You can't start an LPAR which does not have any profile, because starting an LPAR basically means "activate its profile".

Also, I'm not quite sure whether the HMC will allow deletion of the last/only profile of an LPAR, but I think it will.

Just keep the LPAR inactive, don't remove the profile. It will not consume any resource.

By the way, if I understood correctly your LPAR does no longer have any disks, so starting it in this condition wouldn't actually make sense, would it?
Well, my lpar does have boot disks which I haven't deleted yet.  I have only removed the other disks that was hosting database. So, I think I should just shut down the lpar and keep it as it is, so if incase if I need that lpar sometime later, I can just start that. Does this make sense?

Thanks
virgo
Yes, makes sense.

Moreover, individual disks are not in the LPAR's profile, they only live in the VIOS (where you already deleted them).
The profile contains the virtual SCSI adapter to establish the connection to the VIOS,
that's all.

And if the boot disks are still present you can start up the LPAR at any time, that's true.