Procedure
For the iSCSI initd script startup, set a session to "automatic" in /etc/iscsi/iscsid.conf:
node.startup = automatic
By default node.startup is set to:
automatic in Red Hat Enterprise Linux
manual in SUSE Linux Enterprise Server
Create the SendTargets record:
# iscsiadm --mode node --target <IQN> --portal 192.0.2.*:3260 -o new
Set the use_discoveryd setting for SendTargets record:
#iscsiadm --mode node --target <IQN> --portal 192.0.2.*:3260
-n discovery.sendtargets.use_discoveryd -v Yes
Set the polling interval:
#iscsiadm --mode node --target IQN --portal 192.0.2.*:3260
-n discovery.sendtargets.discoveryd_poll_inval -v 30
To make the new settings take effect, restart the iscsi service.
In Red Hat Enterprise Linux:
# /etc/init.d/iscsi restart
In SUSE Linux Enterprise Server:
# rcopen-iscsi restart
Now SCSI devices appear automatically after subsequent reboots.
Om universum är emot dig prova:
iscsiadm --mode node -l all
se om allt funkar
iscsiadm -m session -P3
🧙🏿 lsblk -- find sdb and sdc
🧙🏿 lsblk -f -- find LVM_m LVM on both
🧙 pvscan -- list all physical volymes
pvdisplay -- display Attributes of physical volumes
🧙🏿 multipath -ll
🧙🏿 multipath -v3
vid fel ingen information / vid korrekt massa information
Generally, you should start here:
systemctl status open-iscsi
iscsiadm -m discovery -t sendtargets -p <iSCSI_Target_IP>
A successful result will list the IQN of your target. For example:
192.168.1.100:3260,1 iqn.2005-10.org.freenas.ctl:target-01
If no targets are found, double-check the IP address and ensure the target is configured correctly.
iscsiadm -m session
root@radia:~# iscsiadm -m discovery
10.255.101.3:3260 via sendtargets
10.255.100.3:3260 via sendtargets
root@radia:~# iscsiadm -m discoverydb
10.255.101.3:3260 via sendtargets
10.255.100.3:3260 via sendtargets
root@radia:~# iscsiadm -m session
tcp: [1] 10.255.100.3:3260,0 iqn.2002-03.com.compellent:5000d310013d0c2a (non-flash)
tcp: [2] 10.255.100.3:3260,0 iqn.2002-03.com.compellent:5000d310013d0c2b (non-flash)
tcp: [3] 10.255.101.3:3260,0 iqn.2002-03.com.compellent:5000d310013d0c2e (non-flash)
tcp: [4] 10.255.101.3:3260,0 iqn.2002-03.com.compellent:5000d310013d0c2d (non-flash)
root@radia:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 14.9G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part /boot/efi
└─sda3 8:3 0 14.4G 0 part
├─pve-swap 252:0 0 1G 0 lvm [SWAP]
├─pve-root 252:1 0 6.7G 0 lvm /
├─pve-data_tmeta 252:2 0 1G 0 lvm
│ └─pve-data 252:4 0 4.7G 0 lvm
└─pve-data_tdata 252:3 0 4.7G 0 lvm
└─pve-data 252:4 0 4.7G 0 lvm
sdb 8:16 0 10T 0 disk
└─36000d310013d0c00000000000000005a 252:5 0 10T 0 mpath
└─sanvms-vm--100--disk--0 252:6 0 32G 0 lvm
sdc 8:32 0 10T 0 disk
└─36000d310013d0c00000000000000005a 252:5 0 10T 0 mpath
└─sanvms-vm--100--disk--0 252:6 0 32G 0 lvm
root@radia:~#
Note: There is no mount point when using "multipath"
root@radia:~# multipath -ll
36000d310013d0c00000000000000005a dm-5 COMPELNT,Compellent Vol
size=10T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
`-+- policy='service-time 0' prio=50 status=active
|- 12:0:0:1 sdb 8:16 active ready running
`- 13:0:0:1 sdc 8:32 active ready running
root@radia:~#
List physical volumes: The pvscan command will find all physical volumes on the system. You should see a physical volume created on your multipath device (e.g., /dev/mapper/mpatha).
root@radia:~# pvscan
PV /dev/mapper/36000d310013d0c00000000000000005a VG sanvms lvm2 [<10.00 TiB / <8.43 TiB free]
PV /dev/sda3 VG pve lvm2 [<14.42 GiB / 8.00 MiB free]
Total: 2 [10.01 TiB] / in use: 2 [10.01 TiB] / in no VG: 0 [0 ]
root@radia:~#
List volume groups: The vgscan command will scan for all volume groups.
root@radia:~# vgscan
Found volume group "sanvms" using metadata type lvm2
Found volume group "pve" using metadata type lvm2
root@radia:~#