iSCSI : iSCSI लक्ष्य कॉन्फ़िगर करें (tgt)2023/11/13 |
|
iSCSI के साथ स्टोरेज सर्वर कॉन्फ़िगर करें।
यह iSCSI लक्ष्य को scsi-target-utils के साथ कॉन्फ़िगर करने का उदाहरण है। (tgt)
नेटवर्क पर iSCSI के साथ स्टोरेज सर्वर को iSCSI टारगेट कहा जाता है, क्लाइंट होस्ट जो iSCSI टारगेट से जुड़ता है उसे iSCSI इनिशिएटर कहा जाता है।
यह उदाहरण निम्न प्रकार से पर्यावरण पर आधारित है। +----------------------+ | +----------------------+ | [ iSCSI Target ] |10.0.0.30 | 10.0.0.51| [ iSCSI Initiator ] | | dlp.srv.world +----------+----------+ node01.srv.world | | | | | +----------------------+ +----------------------+ |
| [1] | प्रशासन उपकरण स्थापित करें। |
|
[root@dlp ~]# dnf -y install scsi-target-utils
|
| [2] | iSCSI लक्ष्य कॉन्फ़िगर करें। उदाहरण के लिए, [/var/lib/iscsi_disks] निर्देशिका के अंतर्गत एक डिस्क-छवि बनाएं और इसे SCSI डिवाइस के रूप में सेट करें। |
|
# एक डिस्क छवि बनाएं [root@dlp ~]# mkdir /var/lib/iscsi_disks [root@dlp ~]# dd if=/dev/zero of=/var/lib/iscsi_disks/disk01.img count=0 bs=1 seek=10G
[root@dlp ~]#
vi /etc/tgt/conf.d/target01.conf # नया निर्माण # यदि आप कुछ डिवाइस सेट करते हैं, तो <target>-</target> और निम्न प्रकार से उसी प्रकार सेट करें # नामकरण नियम : [ iqn.(year)-(month).(डोमेन नाम का उल्टा):(कोई भी नाम जो आपको पसंद हो) ]
<target iqn.2023-11.world.srv:dlp.target01>
# iSCSI लक्ष्य के रूप में उपकरण प्रदान किया गया
backing-store /var/lib/iscsi_disks/disk01.img
# iSCSI आरंभकर्ता का IQN आपको कनेक्ट करने की अनुमति देता है
initiator-name iqn.2023-11.world.srv:node01.initiator01
# प्रमाणीकरण जानकारी ("उपयोगकर्ता नाम", "पासवर्ड" के लिए अपनी पसंद का कोई भी व्यक्ति सेट करें)
incominguser username password
</target>
|
| [3] | यदि SELinux सक्षम है, तो SELinux प्रसंग बदलें। |
|
[root@dlp ~]#
[root@dlp ~]# dnf -y install policycoreutils-python-utils
chcon -R -t tgtd_var_lib_t /var/lib/iscsi_disks [root@dlp ~]# semanage fcontext -a -t tgtd_var_lib_t /var/lib/iscsi_disks |
| [4] | यदि Firewalld चल रहा है, तो iSCSI लक्ष्य सेवा की अनुमति दें। |
|
[root@dlp ~]# firewall-cmd --add-service=iscsi-target success [root@dlp ~]# firewall-cmd --runtime-to-permanent success |
| [5] | tgtd प्रारंभ करें और स्थिति सत्यापित करें। |
|
[root@dlp ~]#
systemctl enable --now tgtd # स्थिति दिखाओ [root@dlp ~]# tgtadm --mode target --op show
Target 1: iqn.2023-11.world.srv:dlp.target01
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: rdwr
Backing store path: /var/lib/iscsi_disks/disk01.img
Backing store flags:
Account information:
username
ACL information:
ALL
iqn.2023-11.world.srv:node01.initiator01
|
| Sponsored Link |
|
|