【问题标题】:Softlayer: determine scsi disk Softlayer-ID using the dev mapper device idSoftlayer:使用 dev mapper 设备 id 确定 scsi 磁盘 Softlayer-ID
【发布时间】:2017-01-26 03:20:19
【问题描述】:

在连接到 Linux 主机的多个 iscsi 磁盘的设置中(LVM 池设置),我希望能够使用 Softlayer API 拍摄特定磁盘的快照。 如何从 Linux 设备名称中知道 iscsi 设备的 id 或 LUN 名称。

例如 - 从"/dev/mapper/YYYYYYYYYYYYYYp1" 获取"SLXXXXXXXXX-XX"

我尝试解析Iscsi目标IP,但可能不同的磁盘具有相同的目标IP,所以我必须找出不同的解决方案

【问题讨论】:

    标签: centos7 ibm-cloud-infrastructure lvm iscsi device-mapper


    【解决方案1】:

    使用这些 REST 请求,您可以检索设备及其父设备的 ISCSI id 和 LUN id,以获取具有任何这些的 BMS 和虚拟访客。

    https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getVirtualGuests.json?objectMask=mask[allowedNetworkStorage[lunId,parentVolume[lunId]]]&objectFilter={"virtualGuests":{"allowedNetworkStorage":{"nasType":{"operation":"ISCSI"}}}}
    

    方法:获取

    https://[username]:[apiKey]@api.softlayer.com/rest/v3/SoftLayer_Account/getHardware.json?objectMask=mask[allowedNetworkStorage[lunId,parentVolume[lunId]]]&objectFilter={"hardware":{"allowedNetworkStorage":{"nasType":{"operation":"ISCSI"}}}}
    

    方法:获取

    此链接可能会帮助您进一步实施: http://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_Storage_Iscsi http://sldn.softlayer.com/reference/services/SoftLayer_Network_Storage_Iscsi

    【讨论】:

    • “lunId”信息解决了我的问题,因为它是操作系统可见的 scsi 卷的唯一标识符。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多