Detaching a datastore or storage device from multiple ESXi 5.0 hosts

本文介绍如何使用PowerCLI从多个ESXi 5.0主机上分离数据存储或存储设备。首先确保已卸载目标数据存储,然后通过PowerCLI列出所有数据存储及其挂载的主机。选择合适的数据存储并记录其名称,确认该数据存储在所有主机上的状态为未挂载。最后运行PowerCLI命令完成分离操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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:

    wKiom1hkt3qR2mkwAAC0XBZcr9o014.jpg-wh_50

  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

本文转自学海无涯博客51CTO博客,原文链接http://blog.51cto.com/549687/1887302如需转载请自行联系原作者


520feng2007

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值