Iscsi: Difference between revisions

From DWIKI
Line 53: Line 53:
  tgtadm --lld iscsi --op delete --mode conn --tid 1 --sid 2 --cid 0
  tgtadm --lld iscsi --op delete --mode conn --tid 1 --sid 2 --cid 0


===Reload tgtd===
===Reload tgtd configuration===
  tgt-admin --update ALL
  tgt-admin --update ALL
   
or
  tgt-admin --update your.irqn.string
 
===Show tgdt config===
===Show tgdt config===
  tgt-admin --dump
  tgt-admin --dump

Revision as of 08:24, 14 August 2019

Links

FAQ

ISCSI client

iscsi_discovery 192.168.100.32

List connected targets

iscsiadm -m session

which seems to list only one, for multiple:

tgtadm --lld iscsi --op show --mode conn --tid 1

but that needs more work

List targets

iscsiadm -m discovery -t sendtargets -p 192.168.100.32

Connect to target

iscsiadm -m node --targetname="iqn.2018-5.mynet:drbd0" --portal "192.168.100.32" --login

if you get things like "iscsiadm: No records found" try a thing like

iscsiadm --mode node -l all

Disconnect from target

iscsiadm -m node -T iqn.2018-5.mynet:drbd0 -p 192.168.100.32 -u


Show new size of target

iscsiadm -m node --targetname="foo.bar" -R

Disconnect all targets

iscsiadm --mode node -u all


On server

list targets

tgtadm --lld iscsi --mode target --op show

list connected targets

tgtadm --lld iscsi --mode conn --op show --tid 1

And disconnect target:

tgtadm --lld iscsi --op delete --mode conn --tid 1 --sid 2 --cid 0

Reload tgtd configuration

tgt-admin --update ALL

or

tgt-admin --update your.irqn.string

Show tgdt config

tgt-admin --dump


The disk contains an unclean file system (0, 0).

Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
ntfsfix /dev/sdc1

On ESXi

esxcli storage core path list
storage core adapter rescan --adapter=vmhba
esxcli iscsi adapter discovery rediscover --adapter vmhba64
esxcli iscsi adapter param get -A vmhba64