Iscsi: Difference between revisions
From DWIKI
mNo edit summary |
m (→FAQ) |
||
Line 15: | Line 15: | ||
==ISCSI client== | ==ISCSI client== | ||
iscsi_discovery 192.168.100.32 | iscsi_discovery 192.168.100.32 | ||
===List connected targets=== | |||
iscsiadm -m session | |||
==List targets== | ===List targets=== | ||
iscsiadm -m discovery -t sendtargets -p 192.168.100.32 | iscsiadm -m discovery -t sendtargets -p 192.168.100.32 | ||
==Connect to target== | ===Connect to target=== | ||
iscsiadm -m node --targetname="iqn.2018-5.mynet:drbd0" --portal "192.168.100.32" --login | iscsiadm -m node --targetname="iqn.2018-5.mynet:drbd0" --portal "192.168.100.32" --login | ||
Line 42: | Line 31: | ||
iscsiadm --mode node -l all | iscsiadm --mode node -l all | ||
==Disconnect from target== | ===Disconnect from target=== | ||
iscsiadm -m node -T iqn.2018-5.mynet:drbd0 -p 192.168.100.32 -u | iscsiadm -m node -T iqn.2018-5.mynet:drbd0 -p 192.168.100.32 -u | ||
==Show new size of target== | ===Show new size of target=== | ||
iscsiadm -m node --targetname="foo.bar" -R | iscsiadm -m node --targetname="foo.bar" -R | ||
==On server== | |||
===list targets=== | |||
tgtadm --lld iscsi --mode target --op show | |||
And disconnect target: | |||
tgtadm --lld iscsi --op delete --mode conn --tid 1 --sid 2 --cid 0 | |||
===Reload tgtd=== | |||
tgt-admin --update ALL | |||
===Show tgdt config=== | |||
tgt-admin --dump | |||
==The disk contains an unclean file system (0, 0).== | ==The disk contains an unclean file system (0, 0).== |
Revision as of 14:45, 4 April 2019
Deamonns:
- tgtd (used by ocf:heartbeat:iSCSITarget)
- iscsid
Links
- http://nil.uniza.sk/linux-howto/linux-mint-mouting-freenas-iscsi-disk
- iscsiadm command examples
- Scsi-target-utils Quickstart Guide
- https://wiki.archlinux.org/index.php/TGT_iSCSI_Target
FAQ
ISCSI client
iscsi_discovery 192.168.100.32
List connected targets
iscsiadm -m session
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
On server
list targets
tgtadm --lld iscsi --mode target --op show
And disconnect target:
tgtadm --lld iscsi --op delete --mode conn --tid 1 --sid 2 --cid 0
Reload tgtd
tgt-admin --update ALL
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