วิธีสร้าง iSCSI Target บน Windows Server 2022 แบบละเอียด
iSCSI Target เป็นหนึ่งในฟีเจอร์สำคัญของ Windows Server 2022 ที่ช่วยให้ Server สามารถแชร์พื้นที่จัดเก็บข้อมูลผ่านเครือข่ายได้เสมือนเป็นฮาร์ดดิสก์จริง เหมาะสำหรับการสร้าง Storage Server, Hyper-V Storage, Backup Server และระบบ SAN ภายในองค์กร
ข้อดีคือไม่ต้องลงทุนซื้อ SAN Appliance ราคาแพง เพราะสามารถใช้ Windows Server 2022 สร้าง iSCSI Storage ได้ทันที
บทความนี้จะอธิบายวิธีสร้าง iSCSI Target บน Windows Server 2022 อย่างละเอียด พร้อมแนวทางใช้งานจริงในองค์กร
iSCSI Target คืออะไร
iSCSI ย่อมาจาก
Internet Small Computer System Interface
เป็นเทคโนโลยีที่ส่ง Storage ผ่านเครือข่าย TCP/IP
ทำให้เครื่อง Client มองเห็นพื้นที่ Storage ราวกับเป็นฮาร์ดดิสก์ที่ต่ออยู่กับเครื่องโดยตรง
iSCSI Target และ iSCSI Initiator
ระบบ iSCSI มี 2 ส่วน
iSCSI Target
เครื่องที่แชร์ Storage
ตัวอย่าง
Windows Server 2022
iSCSI Initiator
เครื่องที่เชื่อมต่อเข้ามา
ตัวอย่าง
Hyper-V Server
Backup Server
Application Server
ประโยชน์ของ iSCSI Target
สร้าง SAN แบบประหยัด
แชร์ Storage ผ่าน Network
ใช้กับ Hyper-V
ใช้กับ Cluster
ใช้กับ Backup Server
ขยาย Storage ได้ง่าย
ทีมงาน comsiam นิยมใช้ iSCSI Target สำหรับระบบ Hyper-V Lab และ Backup Repository
สิ่งที่ต้องเตรียม
Windows Server 2022
พื้นที่ Storage ว่าง
IP Address แบบ Static
Network Gigabit หรือสูงกว่า
แนะนำ
10 GbE
หากใช้งานจริงในองค์กร
ติดตั้ง iSCSI Target Server
เปิด
Server Manager
↓
Add Roles and Features
↓
File and Storage Services
↓
File and iSCSI Services
เลือก
iSCSI Target Server
กด
Install
สร้าง iSCSI Virtual Disk
เปิด
Server Manager
↓
File and Storage Services
↓
iSCSI
เลือก
Tasks
↓
New iSCSI Virtual Disk
กำหนดตำแหน่งไฟล์
ตัวอย่าง
D:\iSCSI
ตั้งชื่อ Virtual Disk
ตัวอย่าง
HyperVStorage.vhdx
หรือ
BackupStorage.vhdx
กำหนดขนาด
ตัวอย่าง
2 TB
หรือ
5 TB
สร้าง iSCSI Target
เลือก
New iSCSI Target
กำหนดชื่อ
HyperVTarget
เพิ่ม Initiator
เลือก
Add
ใส่
IP Address
หรือ
IQN
ของเครื่อง Client
ตัวอย่าง IQN
iqn.2025-01.local.hyperv01
เปิด Authentication (ถ้าต้องการ)
รองรับ
CHAP
เพื่อเพิ่มความปลอดภัย
ตรวจสอบ iSCSI Target
PowerShell
Get-IscsiServerTarget
ดู Virtual Disk
Get-IscsiVirtualDisk
สร้าง iSCSI Target ด้วย PowerShell
สร้าง Virtual Disk
New-IscsiVirtualDisk `
-Path "D:\iSCSI\HyperVStorage.vhdx" `
-Size 2TB
สร้าง Target
New-IscsiServerTarget `
-TargetName "HyperVTarget"
เชื่อม Virtual Disk เข้ากับ Target
Add-IscsiVirtualDiskTargetMapping `
-TargetName "HyperVTarget" `
-Path "D:\iSCSI\HyperVStorage.vhdx"
ตรวจสอบสถานะ
Get-IscsiServerTarget
ตรวจสอบ Firewall
เปิด Rule
iSCSI Service
หรือ
TCP 3260
พอร์ตที่ iSCSI ใช้
TCP 3260
ต้องเปิดระหว่าง Server และ Client
การใช้งานจริง
Hyper-V Storage
★★★★★
Backup Repository
★★★★★
Cluster Shared Storage
★★★★★
File Server
★★★★☆
ปัญหาที่พบบ่อย
Client มองไม่เห็น Target
ตรวจสอบ
TCP 3260
และ Firewall
Target Online แต่ Connect ไม่ได้
ตรวจสอบ
IQN
และสิทธิ์ของ Initiator
Storage ช้า
ควรใช้
10 GbE
หรือแยก Network สำหรับ Storage
แนวทางความปลอดภัยที่แนะนำ
① ใช้ VLAN แยก Storage
② เปิด CHAP Authentication
③ ใช้ Static IP
④ จำกัด Initiator ที่อนุญาต
⑤ ใช้ UPS
⑥ สำรองข้อมูลสม่ำเสมอ
⑦ ตรวจสอบ Event Viewer
ทีมงาน comsiam แนะนำให้แยก Network สำหรับ iSCSI โดยเฉพาะ เพราะช่วยลด Latency และเพิ่มประสิทธิภาพของ Storage ได้อย่างชัดเจน
Best Practices สำหรับ Windows Server 2022
ใช้ 10GbE หากเป็น Production
ใช้ CHAP Authentication
แยก VLAN Storage
ใช้ SSD สำหรับ Workload สำคัญ
ตรวจสอบ Event Log สม่ำเสมอ
สำรองข้อมูลทุกวัน
ตรวจสอบ Capacity ทุกเดือน
สรุป
iSCSI Target บน Windows Server 2022 เป็นวิธีสร้างระบบ Storage แบบ SAN ที่คุ้มค่าและยืดหยุ่น โดยสามารถแชร์พื้นที่จัดเก็บข้อมูลผ่านเครือข่ายให้กับ Hyper-V, Backup Server และระบบองค์กรต่าง ๆ ได้อย่างมีประสิทธิภาพ
หากออกแบบเครือข่ายและ Storage อย่างเหมาะสม iSCSI สามารถเป็นหัวใจสำคัญของระบบจัดเก็บข้อมูลในองค์กรได้โดยไม่จำเป็นต้องลงทุนกับ SAN Appliance ราคาแพง