码迷,mamicode.com
首页 > 其他好文 > 详细

Detaching a datastore or storage device from multiple ESXi 5.0 hosts

时间:2016-12-29 20:45:14      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:datastore

Using the PowerCLI

To detach a storage device using PowerCLI:

  1. Review the VMware Contributed Sample Code disclaimer, and deploy the community-supported PowerCLI script available atAutomating Datastore/Storage Device Detachment in vSphere 5. 

  2. Ensure that you have already unmounted the desired datastore. For more information, see Unmount VMFS or NFS Datastoresin the vSphere 5 Documentation Center. 

  3. List all datastores and their attached hosts by running the command:

    Get-Datastore | Get-DatastoreMountInfo | Sort Datastore, VMHost | FT –AutoSize

    You see an output similar to:

    技术分享

  4. Select the appropriate Datastore and record the name beneath the Datastore column, and confirm that the Mountedcolumn contains the value False for all hosts. 

  5. Detach the devices from all hosts using the command:

    Get-Datastore datastore name| Detach-Datastore

    Where datastore name is the name of the Datastore recorded in Step 3.

    You see an output similar to:

    Detaching LUN naa.5000144f52145699 from host esx01.vmw.local...
    Detaching LUN naa.5000144f52145699 from host esx02.vmw.local...
    Detaching LUN naa.5000144f52145699 from host esx03.vmw.local...


https://www.247rack.com/dashboard/knowledgebase/44/Detaching-a-datastore-or-storage-device-from-multiple-ESXi-50-hosts.html

Detaching a datastore or storage device from multiple ESXi 5.0 hosts

标签:datastore

原文地址:http://549687.blog.51cto.com/539687/1887302

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!