Computer System/Storage

[스토리지] tcmu (tcmu-runner) - LIO + Glusterfs back-end API (gfapi)

해리팍 2017. 8. 16. 15:22
반응형

안녕하세요.


지난 포스팅 (http://harryp.tistory.com/648) 에서 리눅스 iSCSI 데몬인 LIO에 대해 알아보았는데요.


이번 포스팅에서는 glusterfs와 LIO를 함께 사용 시 성능을 높여주는 tcmu-runner에 대해 알아보겠습니다.


tcmu-runner는 gluster back-end api (gfapi)를 사용하여 FUSE를 통하지 않고 I/O를 가능하게 해줍니다.



1. Architecture



(출처 - https://github.com/gluster/gluster-block)





1.1. tcmu-runner 미사용시 vs tcmu-runner 사용 시





(출처 - https://lalatendu.org/2014/04/20/glusterfs-vfs-plugin-for-samba/)



2. tcmu-runner 설치


(1) git clone & 디렉토리 이동


# git clone https://github.com/open-iscsi/tcmu-runner.git


# cd tcmu-runner


(2) 사전 패키지 설치


먼저 yum update를 해줍니다.


# yum update


tcmu-runner에서는 사전 패키지 설치 스크립트를 제공합니다.


# ./extra/install_dep.sh


(3) cmake


  - Fedora : cmake .


  - CentOS : cmake . -DSUPPORT_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr



(4) make & Install


# make all


# make install



(5) 설정파일 복사


# cp tcmu-runner.conf /etc/dbus-1/system.d/


# cp org.kernel.TCMUService1.service /usr/share/dbus-1/system-services/


# cp tcmu-runner.service /lib/systemd/system/



(6) 부팅 시 데몬 실행 등록 및 데몬 실행


# systemctl enable tcmu-runner


# systemctl start tcmu-runner


# systemctl status tcmu-runner



4. 설치 확인

설치가 정상적으로 완료되고, 정상 동작할 경우 targetcli의 backstores 에 'user:glfs'와 'user:qcow'가 리스트업 되어 있음.


# targetcli 

targetcli shell version 2.1.fb43

Copyright 2011-2013 by Datera, Inc and others.

For help on commands, type 'help'.


You are not root, disabling privileged commands.


/> ls

o- / ............................................................................................................... [...]

  o- backstores .................................................................................................... [...]

  | o- block ........................................................................................ [Storage Objects: 0]

  | o- fileio .................................................................................... [Storage Objects: 0]

  | o- pscsi ............................................................................ [Storage Objects: 0]

  | o- ramdisk ................................................................. [Storage Objects: 0]

  | o- user:glfs .................................................................... [Storage Objects: 0]

  | o- user:qcow ...................................................................... [Storage Objects: 0]

  o- iscsi ................................................................ [Targets: 0]

  o- loopback ................................................................. [Targets: 0]

  o- vhost ................................................................... [Targets: 0]




4. user:glfs 형태의 backstore 생성 방법


다음 명령어를 사용하여 user:glfs 형태의 backstore를 생성 가능합니다.


# targetcli

/> /backstores/user:glfs create BACKSTORE명 IMG용량 GLUSTER볼륨명@BRICK_IP/ISCSI이미지명


ex) /backstores/user:glfs create glfs_test 100GB test_vol@192.168.0.10/iscsi.img



이후 작업은 iSCSI Target 설정과 동일하게 해주시면 됩니다.

반응형