IBM Cloud Docs
Identificazione dei LUN

Identificazione dei LUN

Esistono diversi motivi per cui si desidera ricercare l'ID LUN dei volumi di memoria collegati sull'host di calcolo. Ad esempio, è possibile disporre di più periferiche di archiviazione montate sullo stesso host con le stesse dimensioni di volume. Vuoi staccare e disattivare uno di loro. Tuttavia, non si è sicuri di come correlare ciò che si vede sul proprio host Linux® con ciò che si vede nella console. Un altro esempio potrebbe essere quello di avere più volumi di un' Block Storage for Classic e collegati a un server ESXi. Vuoi espandere la dimensione del volume di uno dei LUN e devi conoscere l'ID LUN corretto della memoria per farlo.

Visualizzazione di un ID LUN in Linux®

  1. Nella riga comandi, eseguire multipath -ll ed esaminare l'output.

    root@server:~# multipath -l
    3600a098038303845372b4a5232346e35 dm-0 NETAPP ,LUN C-Mode
    size=12T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
    -+- policy='round-robin 0' prio=50 status=active
    - `1:0:0:0 sdc 8:32 active ready running`
    3600a098038304471562b4c4743384332 dm-1 NETAPP ,LUN C-Mode
    size=12T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
    -+- policy='round-robin 0' prio=10 status=active
    `- 3:0:0:1 sdd 8:48 active ready running`
    

    Nota "1:0:0:0" e "3:0:0:1". Le ultime cifre in ciascuno di questi campi "1:0: 0:0" e "3: 0:0:1", "0" e "1" sono numeri ID LUN iscsi dei tuoi dispositivi di archiviazione blocchi.

  2. Immetti i seguenti comandi della cli ibmcloud: ibmcloud sl block volume-list e ibmcloud sl block volume-detail per confrontare i loro output con le informazioni raccolte nel passo 1.

    $ ibmcloud sl block volume-list
    id       username          datacenter storage_type              capacity_gb bytes_used lunId
    20973781 IBM02SEL1575811-1 dal09      endurance_block_storage   100           -          3
    22030583 IBM02SEL1575811-3 dal12      endurance_block_storage   20            -          0
    23976093 IBM02SEL1575811-4 dal12      performance_block_storage 80            -          1
    24024217 IBM02SEL1575811-5 seo01      performance_block_storage 2000          -          2
    
    $ ibmcloud sl block volume-detail 22030583
    Name                       Value
    ID                         22030583
    User name                  IBM02SEL1575811-3
    Type                       endurance_block_storage
    Capacity (GB)              20
    LUN Id                     0
    Endurance Tier             READHEAVY_TIER
    Endurance Tier Per IOPS    2
    Datacenter                 dal12
    Target IP                  161.26.110.17
    Snapshot Size (GB)         5
    Snapshot Used (Bytes)      3325952
    # of Active Transactions   0
    Replicant Count            0
    

    L'output mostra il nome host della periferica di archiviazione, l'ID LUN e l'IP di destinazione:

    IBM02SEL1575811-3 lun id: 0 Target IP: 161.26.110.17
    IBM02SEL1575811-4 lun id: 1 Target IP: 161.26.110.43
    
  3. È possibile confermare ulteriormente queste informazioni utilizzando il seguente comando iscsiadm -m session -P 3.

    # iscsiadm -m session -P 3
    iSCSI Transport Class version 2.0-870
    version 6.2.0.874-7
    Target: iqn.1992-08.com.netapp:stfdal1201 (non-flash)
    Current Portal: 161.26.110.17:3260,1027 # match this target iscsi IP to the block storage device
    Persistent Portal: 161.26.110.17:3260,1027
    **********
    Interface:
    **********
    Iface Name: default
    Iface Transport: tcp
    Iface Initiatorname: iqn.2018-08.com.ibm:ibm02su1575811-i117305979
    Iface IPaddress: 10.74.10.67
    Iface HWaddress: <empty>
    Iface Netdev: <empty>
    SID: 1
    iSCSI Connection State: LOGGED IN
    iSCSI Session State: LOGGED_IN
    Internal iscsid Session State: NO CHANGE
    *********
    Timeouts:
    *********
    Recovery Timeout: 5
    Target Reset Timeout: 30
    LUN Reset Timeout: 30
    Abort Timeout: 15
    *****
    CHAP:
    *****
    username: IBM02SU1575811-I117305979
    password: ********
    username_in: <empty>
    password_in: ********
    ************************
    Negotiated iSCSI params:
    ************************
    HeaderDigest: None
    DataDigest: None
    MaxRecvDataSegmentLength: 262144
    MaxXmitDataSegmentLength: 65536
    FirstBurstLength: 65536
    MaxBurstLength: 65536
    ImmediateData: Yes
    InitialR2T: No
    MaxOutstandingR2T: 1
    ************************
    Attached SCSI devices:
    ************************
    Host Number: 1 State: running
    scsi1 Channel 00 Id 0 Lun: 0 # match the "Lun: 0" here to the LUN ID.
    Attached scsi disk sdc State: running
    
    Current Portal: 161.26.110.43:3260,1041 # match this target iscsi IP to the block storage device.
    Persistent Portal: 161.26.110.43:3260,1041
    **********
    Interface:
    **********
    Iface Name: default
    Iface Transport: tcp
    Iface Initiatorname: iqn.2018-08.com.ibm:ibm02su1575811-i11730597
    Iface IPaddress: 10.74.10.67
    Iface HWaddress: <empty>
    Iface Netdev: <empty>
    SID: 3
    iSCSI Connection State: LOGGED IN
    iSCSI Session State: LOGGED_IN
    Internal iscsid Session State: NO CHANGE
    *********
    Timeouts:
    *********
    Recovery Timeout: 5
    Target Reset Timeout: 30
    LUN Reset Timeout: 30
    Abort Timeout: 15
    *****
    CHAP:
    *****
    username: IBM02SU1575811-I117305979
    password: ********
    username_in: <empty>
    password_in: ********
    ************************
    Negotiated iSCSI params:
    ************************
    HeaderDigest: None
    DataDigest: None
    MaxRecvDataSegmentLength: 262144
    MaxXmitDataSegmentLength: 65536
    FirstBurstLength: 65536
    MaxBurstLength: 65536
    ImmediateData: Yes
    InitialR2T: No
    MaxOutstandingR2T: 1
    ************************
    Attached SCSI devices:
    ************************
    Host Number: 3 State: running
    scsi3 Channel 00 Id 0 Lun: 1 # match the "Lun: 1" here to the LUN ID.
    Attached scsi disk sdd State: running
    

Visualizzazione dell'ID LUN in Windows

  1. In PowerShell, impartire il comando iscsicli SessionList| findstr /c:"Device Number" /c:"Location" /c:"Target Portal". L'output mostra l'indirizzo IP e l'ID LUN. Nell'esempio, l'indirizzo IP è 10.201.174.123 e l'ID LUN è LUN 0.

    C:\Users\Adminisitrator>iscsicli SessionList| findstr /c:"Device Number" /c:"Location"  /c:"Target Portal"
       Target Portal    : 10.201.174.124/3260
       Device Number    : 3
       Location         : Bus Number 0, Target Id O, LUN 0
       Target Portal    : 10.201.174.123/3260
       Device Number    : 4
       Location:        : Bus Number 0, Target ID 1, LUN 0
    
  2. Immetti quindi i seguenti comandi ibmcloud cli: ibmcloud sl block volume-list e ibmcloud sl block volume-detail per confrontare i loro output con le informazioni raccolte nel passo 1.

    $ ibmcloud sl block volume-list
    id        username           datacenter storage_type            capacity_gb bytes_used lunId
    333280508 SL02SEL1160157-221 dal10      endurance_block_storage 200         -          0
    333506786 SL02SEL1160157-222 tok02      endurance_block_storage 200         -          0
    
    $ ibmcloud sl block volume-detail 333506786
    Name                       Value
    ID                         333506786
    User name                  SL02SEL1160157-222
    Type                       endurance_block_storage
    Capacity (GB)              200
    LUN Id                     0
    Endurance Tier             READHEAVY_TIER
    Endurance Tier Per IOPS    2
    Datacenter                 tok02
    Target IP                  10.201.174.123
    # of Active Transactions   0
    Replicant Count            0
    

Visualizzazione dell'ID LUN in VMWare ®

  1. Eseguire il comando esxcli storage vmfs extent list. L'output include il nome volume iscsi-datastore e il rispettivo identificativo naa(Network Addressing Authority) univoco. Questo numero è garantito per essere unico per quel LUN.

    Volume Name     VMFS UUID                           Extent Device Name                     Partition
                                                        Number
    --------------- ----------------------------------- ------ ------------------------------------ ----
    datastore1      5f69774e-f1031e44-7bdb-ac1f6bc4b812      0 naa.600062b2049d040026fc1e4b2f305682    3
    iscsi-datastore 621f425f-0dc2da8a-927b-ac1f6bc4b812      0 naa.600a098038305674695d51694b427849    1
    
  2. Quindi, immettere il comando esxcfg-mpath -b. L'output contiene lo stesso numero naa, l'ID LUN e il PortalTag.

    naa.600a098038305674695d51694b427849 : NETAPP iSCSI Disk (naa.600a098038305674695d51694b427849)
       vmhba64:C0:T1:L0 LUN:0 state:active iscsi Adapter: iqn.2020-10.com.ibm:sl02su1160157-h1907004
       Target: IQN=iqn.1992-08.com.netapp:stfdal1007 Alias= Session=00023d000001 PortalTag=1034
       vmhba64:C1:T1:L0 LUN:0 state:active iscsi Adapter: iqn.2020-10.com.ibm:sl02su1160157-h1907004
       Target: IQN=iqn.1992-08.com.netapp:stfdal1007 Alias= Session=00023d000002 PortalTag=1030
    

    Nell'esempio, la stringa LUN:0 indica che l'ID LUN è 0.

  3. Immettere il comando esxcli iscsi adapter target portal list. Dall'output, prendi nota dell'indirizzo IP e del valore Tpgt che corrispondono alla tag del portale.

    Adapter  Target                             IP             Port  Tpgt
    -------  ---------------------------------  -------------  ----  ----
    vmhba64  iqn.1992-08.com.netapp:stfdal1007  161.26.99.155  3260  1034
    vmhba64  iqn.1992-08.com.netapp:stfdal1007  161.26.99.152  3260  1030
    

    Nell'esempio, l'indirizzo IP "161.26.99.155" è l'indirizzo IP di destinazione del tuo Block Storage for Classic e "1034" è il PortalTag.

  4. Successivamente, utilizza il comando IBMCLOUD CLI ibmcloud sl block volume-list. L'output contiene l'ID del volume, il nome host del dispositivo di archiviazione, la posizione DC, il tipo di archiviazione, la capacità, la quantità di spazio già utilizzato e l'ID LUN.

    $ ibmcloud sl block volume-list
    id        username           datacenter storage_type            capacity_gb bytes_used lunId
    221426384 SL02SEL1160157-195 che01      endurance_block_storage 1500         -          2
    332299016 SL02SEL1160157-220 dal13      endurance_block_storage 20           -          2
    333280508 SL02SEL1160157-221 dal10      endurance_block_storage 200          -          0
    

    Nell'esempio, la stringa "333280508" è l'ID volume e "0" è l'ID LUN del tuo LUN Block Storage for Classic.

    Immettere il comando ibmcloud sl block volume-detail per ottenere informazioni più dettagliate sul volume di memoria.

    $ ibmcloud sl block volume-detail 333280508
    Name                       Value
    ID                         333280508
    User name                  SL02SEL1160157-221
    Type                       endurance_block_storage
    Capacity (GB)              200
    LUN Id                     0
    Endurance Tier             READHEAVY_TIER
    Endurance Tier Per IOPS    2
    Datacenter                 dal10
    Target IP                  161.26.99.155
    # of Active Transactions   0
    Replicant Count            0
    

    Quindi puoi associare l'ID LUN iscsi al nome host del dispositivo di blocco:

    SL02SEL1160157-221  lun id: 0  Target IP: 161.26.99.155
    

Visualizzazione dell'ID LUN nella console

È inoltre possibile raccogliere l'ID LUN, l'indirizzo IP di destinazione e il nome host del Block Storage for Classic dispositivo nella pagina Dettagli volume nella console.

La pagina Dettagli volume nella console fornisce informazioni dettagliate sul LUN. Il nome del volume di memoria è indicato sull'etichetta del nome. L'indirizzo IP di destinazione è etichettato come Indirizzo di destinazione. L'ID LUN viene visualizzato come ID volume.
La pagina Volume Details della console fornisce informazioni dettagliate sul LUN.