안녕하세요. 썬구루입니다. 이 게시물에서 mhVTL를 설치한 CentOS 가상머신을 iSCSI Target으로 구성하고 Tape Drive와 Changer(Robot)을 iSCSI 디바이스로 구성하여 윈도우 서버에서 이를 끌어다 사용하는 방법에 대해 간단하게 설명드리도록 하겠습니다.
이 게시물은 백업 엔지니어 분들에게 굉장히 유용할 것입니다. 진심으로.. ㅎㅎㅎ..
저는 테이프 라이브러리(오토로더 아님)를 가지고 있지만 시끄럽고 전기세 많이 나가기 때문에 Backup Exec와 NetBackup을 테스트할 때 이 방법을 사용하였습니다.
외국 친구들도 이 방법을 사용하여 Legato Networker, NetVault 등을 테스트하고 있습니다.
■ mhVTL 설치한 CentOS 6.4 가상머신을 iSCSI Target으로 구성
CentOS 6.4를 설치한 가상머신에 mhVTL 패키지를 설치합니다. 그리고 아래와 같이 mhVTL에 관련된 device.conf 파일을 수정하여 디바이스를 줄입니다. 그리고 mhVTL 서비스를 재시작합니다.
[root@mhvtl01 ~]# cd /etc/mhvtl
[root@mhvtl01 mhvtl]# ls device.conf library_contents.10 library_contents.30 mhvtl.conf [root@mhvtl01 mhvtl]# [root@mhvtl01 mhvtl]# vi device.conf VERSION: 5 # VPD page format: # <page #> <Length> <x> <x+1>... <x+n> # NAA format is an 8 hex byte value seperated by ':' # Note: NAA is part of inquiry VPD 0x83 # # Each 'record' is separated by one (or more) blank lines. # Each 'record' starts at column 1 # Serial num max len is 10. # Compression: factor X enabled 0|1 # Where X is zlib compression factor 1 = Fastest compression # 9 = Best compression # enabled 0 == off, 1 == on # # fifo: /var/tmp/mhvtl # If enabled, data must be read from fifo, otherwise daemon will block # trying to write. # e.g. cat /var/tmp/mhvtl (in another terminal) Library: 10 CHANNEL: 00 TARGET: 00 LUN: 00 Vendor identification: STK Product identification: L700 Unit serial number: XYZZY_A NAA: 10:22:33:44:ab:00:00:00 Home directory: /opt/mhvtl PERSIST: False Backoff: 400 # fifo: /var/tmp/mhvtl Drive: 11 CHANNEL: 00 TARGET: 01 LUN: 00 Library ID: 10 Slot: 01 Vendor identification: IBM Product identification: ULT3580-TD5 Unit serial number: XYZZY_A1 NAA: 10:22:33:44:ab:00:01:00 Compression: factor 1 enabled 1 Compression type: lzo Backoff: 400 # fifo: /var/tmp/mhvtl Drive: 12 CHANNEL: 00 TARGET: 02 LUN: 00 Library ID: 10 Slot: 02 Vendor identification: IBM Product identification: ULT3580-TD5 Unit serial number: XYZZY_A2 NAA: 10:22:33:44:ab:00:02:00 Compression: factor 1 enabled 1 Compression type: lzo Backoff: 400 # fifo: /var/tmp/mhvtl Drive: 13 CHANNEL: 00 TARGET: 03 LUN: 00 Library ID: 10 Slot: 03 Vendor identification: IBM Product identification: ULT3580-TD4 Unit serial number: XYZZY_A3 NAA: 10:22:33:44:ab:00:03:00 Compression: factor 1 enabled 1 Compression type: lzo Backoff: 400 # fifo: /var/tmp/mhvtl Drive: 14 CHANNEL: 00 TARGET: 04 LUN: 00 Library ID: 10 Slot: 04 Vendor identification: IBM Product identification: ULT3580-TD4 Unit serial number: XYZZY_A4 NAA: 10:22:33:44:ab:00:04:00 Compression: factor 1 enabled 1 Compression type: lzo Backoff: 400 # fifo: /var/tmp/mhvtl [root@mhvtl01 mhvtl]# [root@mhvtl01 mhvtl]# service mhvtl stop [root@mhvtl01 mhvtl]# [root@mhvtl01 mhvtl]# service mhvtl start You should think updating the kernel module for these daemons to 0.18.15. Please see https://sites.google.com/site/linuxvtl2/home?pli=1#mhvtl-kernel-module mhvtl already running... [root@mhvtl01 mhvtl]# [root@mhvtl01 mhvtl]# lsscsi -g [1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0 /dev/sg0 [2:0:0:0] disk VMware, VMware Virtual S 1.0 /dev/sda /dev/sg1 [3:0:8:0] mediumx STK L80 0105 /dev/sch1 /dev/sg11 [3:0:9:0] tape STK T10000B 0105 /dev/st4 /dev/sg6 [3:0:10:0] tape STK T10000B 0105 /dev/st7 /dev/sg9 [3:0:11:0] tape STK T10000B 0105 /dev/st5 /dev/sg7 [3:0:12:0] tape STK T10000B 0105 /dev/st6 /dev/sg8 [root@mhvtl01 mhvtl]# |
CentOS 6.4 1번 DVD ISO 파일을 가상머신에 연결하여 아래와 같이 iSCSI Target에 관련된 패키지를 설치합니다.
[root@mhvtl01 mhvtl]# cd /media/CentOS_6.4_Final/Packages/
[root@mhvtl01 Packages]# [root@mhvtl01 Packages]# rpm -ivh libibverbs-1.1.6-5.el6.x86_64.rpm warning: libibverbs-1.1.6-5.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Preparing... ########################################### [100%] 1:libibverbs ########################################### [100%] [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# rpm -ivh librdmacm-1.0.17-0.git4b5c1aa.el6.x86_64.rpm warning: librdmacm-1.0.17-0.git4b5c1aa.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Preparing... ########################################### [100%] 1:librdmacm ########################################### [100%] [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# rpm -ivh perl-Config-General-2.44-1.el6.noarch.rpm warning: perl-Config-General-2.44-1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY Preparing... ########################################### [100%] 1:perl-Config-General ########################################### [100%] [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# rpm -ivh rdma-3.6-1.el6.noarch.rpm warning: rdma-3.6-1.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Preparing... ########################################### [100%] 1:rdma ########################################### [100%] [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# rpm -ivh sg3_utils-1.28-4.el6.x86_64.rpm warning: sg3_utils-1.28-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Preparing... ########################################### [100%] package sg3_utils-1.28-4.el6.x86_64 is already installed [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# rpm -ivh scsi-target-utils-1.0.24-2.el6.x86_64.rpm warning: scsi-target-utils-1.0.24-2.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY Preparing... ########################################### [100%] 1:scsi-target-utils ########################################### [100%] [root@mhvtl01 Packages]# |
iSCSI에 관련된 target.conf 파일을 아래와 같이 수정한 후 관련 서비스를 시작합니다.
[root@mhvtl01 Packages]# vi /etc/tgt/targets.conf
[root@mhvtl01 Packages]# <target iqn.localdcv.com.sunguru:mhvtl01-changer> <backing-store /dev/sg6> device-type pt bs-type sg lun 1 </backing-store> <backing-store /dev/sg7> device-type pt bs-type sg lun 2 </backing-store> <backing-store /dev/sg8> device-type pt bs-type sg lun 3 </backing-store> <backing-store /dev/sg9> device-type pt bs-type sg lun 4 </backing-store> <backing-store /dev/sg11> device-type pt bs-type sg lun 5 </backing-store> </target> initiator-address 192.168.80.192 [root@mhvtl01 Packages]# |
■ iSCSI Target 추가 설정
아래와 같이 SELinux 설정을 permissive로 그리고 iSCSI 서비스 포트 3260을 iptables 방화벽에서 열어줍니다.
[root@mhvtl01 Packages]# setenforce permissive
[root@mhvtl01 Packages]# [root@mhvtl01 Packages]# vi /etc/sysconfig/selinux SELINUX=permissive [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# iptables -I INPUT -p tcp -m tcp --dport 3260 -j ACCEPT [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] [root@mhvtl01 Packages]# |
■ iSCSI Target 서비스 시작
[root@mhvtl01 Packages]# service tgtd start
Starting SCSI target daemon: [ OK ] [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# tgtadm --lld iscsi --op show --mode target Target 1: iqn.localdcv.com.sunguru:mhvtl01-changer1 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 Backing store type: null Backing store path: None Backing store flags: LUN: 1 Type: passthrough SCSI ID: IET 00010001 SCSI SN: beaf11 Size: 0 MB, Block size: 1 Online: Yes Removable media: No Prevent removal: No Readonly: No Backing store type: sg Backing store path: /dev/sg6 Backing store flags: LUN: 2 Type: passthrough SCSI ID: IET 00010002 SCSI SN: beaf12 Size: 0 MB, Block size: 1 Online: Yes Removable media: No Prevent removal: No Readonly: No Backing store type: sg Backing store path: /dev/sg7 Backing store flags: LUN: 3 Type: passthrough SCSI ID: IET 00010003 SCSI SN: beaf13 Size: 0 MB, Block size: 1 Online: Yes Removable media: No Prevent removal: No Readonly: No Backing store type: sg Backing store path: /dev/sg8 Backing store flags: LUN: 4 Type: passthrough SCSI ID: IET 00010004 SCSI SN: beaf14 Size: 0 MB, Block size: 1 Online: Yes Removable media: No Prevent removal: No Readonly: No Backing store type: sg Backing store path: /dev/sg9 Backing store flags: LUN: 5 Type: passthrough SCSI ID: IET 00010005 SCSI SN: beaf15 Size: 0 MB, Block size: 1 Online: Yes Removable media: No Prevent removal: No Readonly: No Backing store type: sg Backing store path: /dev/sg11 Backing store flags: Account information: ACL information: ALL [root@mhvtl01 Packages]# [root@mhvtl01 Packages]# chkconfig mhvtl on [root@mhvtl01 Packages]# chkconfig tgtd on [root@mhvtl01 Packages]# |
■ Windows Server 2008 R2에서 iSCSI Initiator 구성
이전 게시물을 참고하여 iSCSI Initiator로 구성합니다.
iSCSI Initiator 구성을 완료하면 작업표시줄에 있는 서버 관리자(Server Manager) 아이콘을 실행합니다. 그리고 Device Manager을 선택하여 디바이스를 확인하면 Changer와 Tape Drive 가 연결된 것을 확인할 수 있습니다.
백업 솔루션 프로그램을 설치하면 프로그램 내에 있는 디바이스 드라이버를 사용하여 관련된 디바이스 모델을 정확하게 알 수 있습니다. 이를 통해 Veritas NetBackup, EMC Legato Networker 등 백업 솔루션 테스트를 해볼 수 있습니다. 전에도 언급했듯이 백업 솔루션 엔지니어에게는 테이프 라이브러리를 다루는 것이 매우 중요하거든요. 그럼 이 게시물은 여기까지 설명드리도록 하겠습니다.
No comments:
Post a Comment