👿iSCSI Initiator on CentOS 7

หลังจากที่ลองต่อ iSCSI บน Windows และ Linux กันไปแล้ว เราจะมาลองต่อ iSCSI บน CentOS ซึ่งการติดตั้งก็จะคล้าย ๆ กัน แต่หลังจากที่ต่อ iSCSI ได้แล้ว หากต้องการจะ Mount Volume บน CentOS จะไม่ได้ใช้ LVM แต่จะใช้ ZFS แทน ซึ่งจะเขียนในบทความต่อไป

Get Started

  • ทำการ Update และ Upgrade

#
yum update && yum upgrade -y
  • ทำการติดตั้ง Package

#
yum install iscsi-initiator-utils -y
  • แก้ไขไฟล์ /etc/iscsi/iscsid.conf

#
vi /etc/iscsi/iscsid.conf
node.startup = automatic
  • ตรวจสอบ Target ของ Storage โดย Default Port เป็น 3260

#
iscsiadm -m discovery -t st -p 1.1.1.2
10.10.10.2:3260,1 iqn.2004-08.jp.buffalo.8857eeb78f4f.rsync
1.1.1.2:3260,1 iqn.2004-08.jp.buffalo.8857eeb78f4f.rsync
  • หากกำหนด Authentication ไว้

#
vi /etc/iscsi/iscsid.conf
node.session.auth.username = username
node.session.auth.password = password
  • ทำการ Login

  • ในกรณีที่ไม่ต้อง Connect แล้ว ให้ทำการ Logout

  • ตรวจสอบ New Disk จาก Log ที่อยู่บน Kernel Messages

  • ตรวจสอบ New Disk จากการ Scan

  • ตรวจสอบ Connection ที่ต่อ iSCSI อยู่

Last updated

Was this helpful?