ISCSI package install
apt를 이용해 아래와 같이 설치를 진행한다.
sudo apt-get install open-iscsi
데몬으로 iscsi를 등록한다.
systemctl enable --now iscsi
다음으로 로그인 정보에 대한 설정을 자동으로 설정한다
(기본 설정은 수동으로 설정하는 것으로 되어있다.)
nano /etc/iscsi/iscsid.conf
아래와 같이 기본설정을 주석처리하고 automatic부분의 주석을 제거한다.
#*****************
# Startup settings
#*****************
# To request that the iscsi service scripts startup a session, use "automatic":
node.startup = automatic
#
# To manually startup the session, use "manual". The default is manual.
#node.startup = manual
그리고 저장 후 systemctl을 이용해 iscsi를 재시작한다.
ISCSI InitiatorName setting
아래 파일에 Target 주소를 사전 입력해 저장
nano /etc/iscsi/initiatorname.iscsi
InitiatorName={iqn}
ISCSI Target Search and Login
아래 명령어를 통해 Target에 대한 검색을 진행
iscsiadm -m discovery -t st -p 주소
다음 명령어를 통해 로그인을 진행
iscsiadm -m node -T {iqn} -p {타겟주소} -l
Check Disk
추가된 디스크를 아래 명령어를 통해 확인한다.
fdisk -l