iSCSI initiator on Ubuntu 20.04 shows multiple devices

Discussion in 'HOWTO-Related Questions' started by unsichtbare, Apr 2, 2021.

  1. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Howdy!
    I have configured an iSCSI initiator on Ubuntu 20.04 and connected to an iSCSI target (a SAN) that has four configured ports:
    Code:
    root@initiator:~# iscsiadm -m session -o show
    tcp: [1] 192.168.89.6:3260,1 iqn.1995-03.com.dothill:01.array.00c0ff13ba29 (non-flash)
    tcp: [2] 192.168.89.7:3260,3 iqn.1995-03.com.dothill:01.array.00c0ff13ba29 (non-flash)
    tcp: [3] 192.168.89.9:3260,4 iqn.1995-03.com.dothill:01.array.00c0ff13ba29 (non-flash)
    tcp: [4] 192.168.89.8:3260,2 iqn.1995-03.com.dothill:01.array.00c0ff13ba29 (non-flash)
    root@initiator:~#
    
    Now, I have sdb, sdc, sdd, sde and dm-1 - all of which have the size (2TB) of the single LUN I carved on the SAN :
    Code:
    root@initiator:~# cat /proc/partitions
    major minor  #blocks  name
       7        0      56780 loop0
       7        1      71560 loop1
       7        2      72068 loop2
       7        3      31836 loop3
       7        4      56712 loop4
       7        5      33048 loop5
       8        0   41943040 sda
       8        1       1024 sda1
       8        2    1048576 sda2
       8        3   40891392 sda3
     253        0   20971520 dm-0
       8       16 1953124992 sdb
       8       32 1953124992 sdc
       8       64 1953124992 sde
       8       48 1953124992 sdd
     253        1 1953124992 dm-1
    root@initiator:~#
    
    How should I move forward to create and format a partition?
    THX,
    -John
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Are these devices used by anything else? If dm-1 showed up when the other devices appeared, I'd guess there is an existing dm there, either from some other system, or maybe even just needing to zero out the devices being presented. So I'd start with figuring out what is what, and ensure you don't wipe out any good data. What does lsbk show? Once you know what is what, you simply pick the device(s) you want to use and treat them just like a local disk, eg. partition (parted/fdisk/something) and mkfs or setup an lvm or whatever you intend.
     

Share This Page