• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 13213
  • Last Modified:

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?
  • 3
  • 3
3 Solutions
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.


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.

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now