VMware Cloud Community
sibsbt
Enthusiast
Enthusiast

how to remove shared datastore from the esx hosts

how to remove shared datastore(ibm san ) from the esx hosts?

And what is the best practices

Tags (1)
0 Kudos
4 Replies
Mouhamad
Expert
Expert

http://kb.vmware.com/kb/1015084

To unpresent a LUN containing a datastore from an ESX/ESXi 4.x host:
Note: These steps must be performed using the VMware ESX service console or the vSphere command line. These steps cannot be performed using the Manage Paths dialog in vSphere Client.
  1. Stop using the datastore:
    1. Unregister all objects (such as virtual machines and templates) stored on the datastore from the inventory.

    2. Ensure there are no 3rd party scripts or utilities running on service console which could access the LUN in question.

  2. Follow the steps in Masking a LUN from ESX and ESXi 4.x using the MASK_PATH plug-in (1009449) for every host that has visibility to the datastore.

  3. When the LUN is masked from all the hosts, unpresent the LUN. For more information, contact your storage array vendor.

    Note: Ensure that the correct LUN is unpresented by verifying the naa id on the host and the array.


  4. Perform a rescan on all of the ESX hosts that had visibility to the LUN. If all of the hosts are in a cluster, right-click on the cluster and click Rescan for Datastores.

  5. Perform the following steps for every host that had visibility to the LUN:
    1. Remove the rule created in step 2 with the command:

      # esxcli corestorage claimrule delete --rule 192

    2. Run the following command to list the existing claimrules:

      # esxcli corestorage claimrule list

      For example:

      # esxcli corestorage claimrule list
      Rule Class Type Plugin Matches
      0 runtime transport NMP transport=usb
      1 runtime transport NMP transport=sata
      2 runtime transport NMP transport=ide
      3 runtime transport NMP transport=block
      4 runtime transport NMP transport=unknown
      101 runtime vendor MASK_PATH vendor=DELL model=Universal Xport
      101 file vendor MASK_PATH vendor=DELL model=Universal Xport
      192 runtime location MASK_PATH adapter=vmhba33 channel=0 target=* lun=0
      65535 runtime vendor NMP vendor=* model=*

    3. Reload the claim rules with the command:

      # esxcli corestorage claimrule load

    4. Verify that the created rule is totally deleted.

      # esxcli corestorage claimrule list

      For example:

      # esxcli corestorage claimrule list
      Rule Class Type Plugin Matches
      0 runtime transport NMP transport=usb
      1 runtime transport NMP transport=sata
      2 runtime transport NMP transport=ide
      3 runtime transport NMP transport=block
      4 runtime transport NMP transport=unknown
      101 runtime vendor MASK_PATH vendor=DELL model=Universal Xport
      101 file vendor MASK_PATH vendor=DELL model=Universal Xport
      65535 runtime vendor NMP vendor=* model=*


    5. Run this command to unclaim each path to the masked device:

      # esxcli corestorage claiming unclaim -t location -A vmhba0 -C 0 -T 0 -L 2

      This ensures that all paths to the device are unclaimed successfully before running the claim. Update vmhba, controller, target and LUN number as required. Unclaiming dissociates the paths from MASK_PATH and have them associated to NMP.

      Note: The esxcli corestorage claiming unclaim --type location vmhba1 command to unclaim paths might result in issues if the unclaim for one of the paths times out. Therefore, VMware recommends you to use the esxcli corestorage claiming unclaim --type plugin --plugin MASK_PATH command to unclaim paths.


    6. Perform a rescan on all of the ESX hosts that had visibility to the LUN. If all of the hosts are in a cluster, right-click the cluster and click Rescan for Datastores. Previously masked LUNs should now be accessible to the ESX host.

VCP-DCV, VCP-DT, VCAP-DCD, VSP, VTSP
0 Kudos
UmeshAhuja
Commander
Commander

Hi,

Go with the below links


http://kb.vmware.com/kb/1015084

http://kb.vmware.com/kb/1009449

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
0 Kudos
sibsbt
Enthusiast
Enthusiast

" Ensure there are no 3rd party scripts or utilities running on service console which could access the LUN in question."

How can i make sure that there is any scripts running

0 Kudos
MauroBonder
VMware Employee
VMware Employee

you too have option of do it directly via manager of your Storage.

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
0 Kudos