remove unmap disks from vio for vio client lpar in aix

Hello i am decommissioning an lpar

i have shutdown the lpar, now i need to unmap the disks to that lpar.

can someone tell me how i can unmap from vio for a vio client?
also how to remove vhost from vio?

Given that the lpar is down, do i need to delete the disk from lpar before unmapping it on vio?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi again,

if the LPAR is down and you don't plan to start it up again there is no need to delete the disks on the LPAR.

Just log in to your VIO server and issue

lsmap -vadapter vhostx

with vhostx being the virtual SCSI host adapter responsible for the LPAR.

Issue against each Backing device (hdiskx) which is displayed:

rmvdev -vdev Backing device -f

with Backing device being the name associated with the hdisk in question.
"-f" forces removal of the associated VTD.

When everything under the vhost is removed delete the hdisks from the OS.


rmdev -dev hdiskx

against every hdisk in question.

Now remove the vhost itself:

rmdev -dev vhostx

Finally, use your HMC or IVM to remove the host adapter definition from the VIO LPAR.

If desired remove the LUN attachment between the SAN box and your VIO server using the tools of your SAN device.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
assistunixAuthor Commented:
Hello wmp. been a while. hope you are doing well. :)

Thank you for your quick response, it was very clear and easy to understand as always.

However i am just curious for the following.
Please confirm if following is right.

Three ways to unmap the disk to lpar client.
rmvdev -vdev Backing device -f  
 f flag is equivalent to rmvdev -vtd vtscsiXX ??

if i chose to not use f flag, than would i have to use both commands to unmap the disk?
rmvdev -vdev Backing device
rmvdev -vtd vtscsiXX

if i use rmvdev -vtd vtscsiXX first, would i still need to run rmvdev -vdev Backing device afterwards to complete the unmapping process or would removal of VTD automatically remove backing device settings as well.

Also, can i skip the part of removing disk from os(vio), if i plan on keeping the disk within vio.

and just remove vhost after removing vtd/backend for that hdisk

Lastly, would i still have to remove the host adapter definition from the VIO LPAR within HMC, even if i am planning on removing the LPAR Profile in itself.

Thanks, Once Again. Hope you have a good weekend.
rmvdev -vtd ...
rmvdev -vdev ...

are in a way equivalent - both forms will remove the connection between the physical device and the respective virtual adapter.
This implies that you cannot use both of them against the same connection.

The "-f" flag must be used with "-vdev" if the physical device is connected to more than one virtual adapter (else an error will be returned). All these connections (represented by VTDs) must be removed at once when specifying "-vdev". To remove a particular connection only use "-vtd".
Connecting the same physical device to several adapters is not a very common setup (disk sharing should be done via different VIOs, not on the same VIO), but the "-f" flag will not do any harm if there is only one connection, so I suggested using it.

It should be more than obvious that you don't need to remove the disks from the OS if you plan to reuse them on the same VIO ...

Yes, you must remove the Virtual SCSI host adapter definition from the VIO LPAR (using HMC) even if you delete the client LPAR.
If you use IVM and its GUI (not CLI!) things are different - when removing an LPAR (there are no "profiles" under IVM) all references to it will be removed as well, including VIO host adapters.

Hope I could make things a bit clearer - this hardcore stuff is not easy to explain, after all.

Yep, let's hope the best for the weekend. All good wishes to you too.

Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

assistunixAuthor Commented:
Yes, thank you for that clarification.

Can you guide me in how to remove the Virtual SCSI host adapter definition from the VIO LPAR (using HMC) - do i go to VIO manage profile settings or LPAR profile manage profile setting ?
No need to touch the LPAR's profile - you're going to delete it, aren't you?

So log in to your HMC and remove the LPAR:

Systems Management - Servers - (expand managed system (+)) - check client LPAR - click ">>" - Operations - Delete - OK.

Now delete the SCSI Adapter from the VIO LPAR's profile:

Systems Management - Servers - (expand managed system (+)) - check VIO LPAR - click ">>" - Configuration - Manage Profiles - (select profile) - Actions (upper left) - Edit - (Tab "Virtual Adapters") - (check the appropriate Server SCSI Adapter) - Actions (upper left) - Delete - OK (bottom left).

Finally remove the SCSI Adapter dynamically from the VIO LPAR:

Systems Management - Servers - (expand managed system (+)) - check VIO LPAR - click ">>" - Dynamic Logical Partitioning - Virtual Adapters - (check the appropriate Server SCSI Adapter) - Actions (upper left) - Delete - OK ....

assistunixAuthor Commented:
Thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.