메뉴 건너뛰기

Korea Oracle User Group

OS

iscsi 서버/클라이언트 설정하기

 

0. 시스템 사양

cpu : 4 core

RAM: 4G

Storage : 30G HDD / 400G HDD

OS : CentOS 7.4  

 

1. 패키지 설치 여부 확인

1) targetcli 패키지 설치 확인

[root@kwanst ~]# dnf list targetcli
Last metadata expiration check: 0:22:30 ago on Sat 14 Nov 2020 11:56:29 PM KST.
Installed Packages
targetcli.noarch                                        2.1.51-2.el7                                         @System
[root@kwanst ~]# 

 

2. iscsi Server를 구성한 OS에 스토리지 LVM으로 구성하기

아래 게시물 참조

Linux에서 LVM 사용

 

3. targetcli로 서버 구성하기

targetcli 수행하고 현재 상태 확인하기

[root@kwanst ~]# targetcli
Warning: Could not load preferences file /root/.targetcli/prefs.bin.
targetcli shell version 2.1.51
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/> 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- iscsi .................................................................................................... [Targets: 0]
  o- loopback ................................................................................................. [Targets: 0]
/> 
 

 

1) block device 생성

사전에 생성한 LV를 사용하여 block device 생성한다.

/> cd backstores
/backstores> ls
o- backstores ........................................................................................................ [...]
  o- block ............................................................................................ [Storage Objects: 0]
  o- fileio ........................................................................................... [Storage Objects: 0]
  o- pscsi ............................................................................................ [Storage Objects: 0]
  o- ramdisk .......................................................................................... [Storage Objects: 0]
/backstores> cd block
/backstores/block> create crs1 /dev/vgrac/crs1
Created block storage object crs1 using /dev/vgrac/crs1.
/backstores/block> create crs2 /dev/vgrac/crs2 
Created block storage object crs2 using /dev/vgrac/crs2.
/backstores/block> create crs3 /dev/vgrac/crs3
Created block storage object crs3 using /dev/vgrac/crs3.
/backstores/block> create fra /dev/vgrac/fra
Created block storage object fra using /dev/vgrac/fra.
/backstores/block> create data /dev/vgrac/data
Created block storage object data using /dev/vgrac/data.
/backstores/block> ls
o- block .............................................................................................. [Storage Objects: 5]
  o- crs1 ................................................................ [/dev/vgrac/crs1 (5.0GiB) write-thru deactivated]
  | o- alua ............................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ................................................................... [ALUA state: Active/optimized]
  o- crs2 ................................................................ [/dev/vgrac/crs2 (5.0GiB) write-thru deactivated]
  | o- alua ............................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ................................................................... [ALUA state: Active/optimized]
  o- crs3 ................................................................ [/dev/vgrac/crs3 (5.0GiB) write-thru deactivated]
  | o- alua ............................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ................................................................... [ALUA state: Active/optimized]
  o- data ............................................................... [/dev/vgrac/data (50.0GiB) write-thru deactivated]
  | o- alua ............................................................................................... [ALUA Groups: 1]
  |   o- default_tg_pt_gp ................................................................... [ALUA state: Active/optimized]
  o- fra ................................................................. [/dev/vgrac/fra (50.0GiB) write-thru deactivated]
    o- alua ............................................................................................... [ALUA Groups: 1]
      o- default_tg_pt_gp ................................................................... [ALUA state: Active/optimized]
/backstores/block> 

 

2) 서버용 iqn 생성

/backstores/block> cd ../../iscsi 
/iscsi> ls
o- iscsi ...................................................................................................... [Targets: 0]
/iscsi> create iqn.2020-11.kwanst.localdomain:server
Created target iqn.2020-11.kwanst.localdomain:server.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/iscsi> ls
o- iscsi ...................................................................................................... [Targets: 1]
  o- iqn.2020-11.kwanst.localdomain:server ....................................................................... [TPGs: 1]
    o- tpg1 ......................................................................................... [no-gen-acls, no-auth]
      o- acls .................................................................................................... [ACLs: 0]
      o- luns .................................................................................................... [LUNs: 0]
      o- portals .............................................................................................. [Portals: 1]
        o- 0.0.0.0:3260 ............................................................................................... [OK]
/iscsi> 

 

3) lun 생성

/iscsi> cd iqn.2020-11.kwanst.localdomain:server/tpg1/luns
/iscsi/iqn.20...ver/tpg1/luns> create /backstores/block/crs1
Created LUN 0.
/iscsi/iqn.20...ver/tpg1/luns> create /backstores/block/crs2
Created LUN 1.
/iscsi/iqn.20...ver/tpg1/luns> create /backstores/block/crs3
Created LUN 2.
/iscsi/iqn.20...ver/tpg1/luns> create /backstores/block/data
Created LUN 3.
/iscsi/iqn.20...ver/tpg1/luns> create /backstores/block/fra
Created LUN 4.
/iscsi/iqn.20...ver/tpg1/luns> ls
o- luns .......................................................................................................... [LUNs: 5]
  o- lun0 ................................................................ [block/crs1 (/dev/vgrac/crs1) (default_tg_pt_gp)]
  o- lun1 ................................................................ [block/crs2 (/dev/vgrac/crs2) (default_tg_pt_gp)]
  o- lun2 ................................................................ [block/crs3 (/dev/vgrac/crs3) (default_tg_pt_gp)]
  o- lun3 ................................................................ [block/data (/dev/vgrac/data) (default_tg_pt_gp)]
  o- lun4 .................................................................. [block/fra (/dev/vgrac/fra) (default_tg_pt_gp)]
/iscsi/iqn.20...ver/tpg1/luns> 

 

4) iSCSI Initiator 생성

/iscsi/iqn.20...ver/tpg1/luns> cd ../acls 
/iscsi/iqn.20...ver/tpg1/acls> create iqn.2020-11.kwanst.localdomain:rac
Created Node ACL for iqn.2020-11.kwanst.localdomain:rac
Created mapped LUN 4.
Created mapped LUN 3.
Created mapped LUN 2.
Created mapped LUN 1.
Created mapped LUN 0.
/iscsi/iqn.20...ver/tpg1/acls> ls
o- acls .......................................................................................................... [ACLs: 1]
  o- iqn.2020-11.kwanst.localdomain:rac ................................................................... [Mapped LUNs: 5]
    o- mapped_lun0 .................................................................................. [lun0 block/crs1 (rw)]
    o- mapped_lun1 .................................................................................. [lun1 block/crs2 (rw)]
    o- mapped_lun2 .................................................................................. [lun2 block/crs3 (rw)]
    o- mapped_lun3 .................................................................................. [lun3 block/data (rw)]
    o- mapped_lun4 ................................................................................... [lun4 block/fra (rw)]
/iscsi/iqn.20...ver/tpg1/acls> 

 

5) 설정한 내용 확인

/iscsi/iqn.20...ver/tpg1/acls> cd /
/> ls
o- / ................................................................................................................. [...]
  o- backstores ...................................................................................................... [...]
  | o- block .......................................................................................... [Storage Objects: 5]
  | | o- crs1 .............................................................. [/dev/vgrac/crs1 (5.0GiB) write-thru activated]
  | | | o- alua ........................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ............................................................... [ALUA state: Active/optimized]
  | | o- crs2 .............................................................. [/dev/vgrac/crs2 (5.0GiB) write-thru activated]
  | | | o- alua ........................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ............................................................... [ALUA state: Active/optimized]
  | | o- crs3 .............................................................. [/dev/vgrac/crs3 (5.0GiB) write-thru activated]
  | | | o- alua ........................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ............................................................... [ALUA state: Active/optimized]
  | | o- data ............................................................. [/dev/vgrac/data (50.0GiB) write-thru activated]
  | | | o- alua ........................................................................................... [ALUA Groups: 1]
  | | |   o- default_tg_pt_gp ............................................................... [ALUA state: Active/optimized]
  | | o- fra ............................................................... [/dev/vgrac/fra (50.0GiB) write-thru activated]
  | |   o- alua ........................................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ............................................................... [ALUA state: Active/optimized]
  | o- fileio ......................................................................................... [Storage Objects: 0]
  | o- pscsi .......................................................................................... [Storage Objects: 0]
  | o- ramdisk ........................................................................................ [Storage Objects: 0]
  o- iscsi .................................................................................................... [Targets: 1]
  | o- iqn.2020-11.kwanst.localdomain:server ..................................................................... [TPGs: 1]
  |   o- tpg1 ....................................................................................... [no-gen-acls, no-auth]
  |     o- acls .................................................................................................. [ACLs: 1]
  |     | o- iqn.2020-11.kwanst.localdomain:rac ........................................................... [Mapped LUNs: 5]
  |     |   o- mapped_lun0 .......................................................................... [lun0 block/crs1 (rw)]
  |     |   o- mapped_lun1 .......................................................................... [lun1 block/crs2 (rw)]
  |     |   o- mapped_lun2 .......................................................................... [lun2 block/crs3 (rw)]
  |     |   o- mapped_lun3 .......................................................................... [lun3 block/data (rw)]
  |     |   o- mapped_lun4 ........................................................................... [lun4 block/fra (rw)]
  |     o- luns .................................................................................................. [LUNs: 5]
  |     | o- lun0 ........................................................ [block/crs1 (/dev/vgrac/crs1) (default_tg_pt_gp)]
  |     | o- lun1 ........................................................ [block/crs2 (/dev/vgrac/crs2) (default_tg_pt_gp)]
  |     | o- lun2 ........................................................ [block/crs3 (/dev/vgrac/crs3) (default_tg_pt_gp)]
  |     | o- lun3 ........................................................ [block/data (/dev/vgrac/data) (default_tg_pt_gp)]
  |     | o- lun4 .......................................................... [block/fra (/dev/vgrac/fra) (default_tg_pt_gp)]
  |     o- portals ............................................................................................ [Portals: 1]
  |       o- 0.0.0.0:3260 ............................................................................................. [OK]
  o- loopback ................................................................................................. [Targets: 0]
/> exit
Global pref auto_save_on_exit=true
Configuration saved to /etc/target/saveconfig.json
[root@kwanst ~]# 

 

6) 방화벽 활성화

[root@kwanst ~]# firewall-cmd --permanent --add-port=3260/tcp
success
[root@kwanst ~]# firewall-cmd --reload
success
[root@kwanst ~]#

 

7) iscsi target 서비스 활성화

[root@kwanst ~]# systemctl start target.service 
[root@kwanst ~]# systemctl enable target.service 
Created symlink from /etc/systemd/system/multi-user.target.wants/target.service to /usr/lib/systemd/system/target.service.
[root@kwanst ~]# systemctl status target.service 
● target.service - Restore LIO kernel target configuration
   Loaded: loaded (/usr/lib/systemd/system/target.service; enabled; vendor preset: disabled)
   Active: active (exited) since Sun 2020-11-15 12:47:19 KST; 3min 26s ago
 Main PID: 23736 (code=exited, status=0/SUCCESS)

Nov 15 12:47:19 kwanst.localdomain systemd[1]: Starting Restore LIO kernel target configuration...
Nov 15 12:47:19 kwanst.localdomain systemd[1]: Started Restore LIO kernel target configuration.
[root@kwanst ~]# 

 

4. iscsi client 설정

1) 클라이언트 설정 확인 및 수정

[root@mprac1 ~]# ls -al /etc/iscsi/iscsid.conf 
-rw-------. 1 root root 13187 Nov  6 23:25 /etc/iscsi/iscsid.conf
[root@mprac1 ~]# ls -al /etc/iscsi/initiatorname.iscsi 
-rw-r--r--. 1 root root 52 Nov 15 12:59 /etc/iscsi/initiatorname.iscsi
[root@mprac1 ~]# vi /etc/iscsi/initiatorname.iscsi 
InitiatorName=iqn.2020-11.kwanst.localdomain:rac

 

2) 서비스 데몬 확인

[root@mprac1 ~]# systemctl status iscsi.service 
● iscsi.service - Login and scanning of iSCSI devices
   Loaded: loaded (/usr/lib/systemd/system/iscsi.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
Condition: start condition failed at Sun 2020-11-15 13:03:07 KST; 22s ago
           └─ ConditionDirectoryNotEmpty=/var/lib/iscsi/nodes was not met
     Docs: man:iscsiadm(8)
           man:iscsid(8)

Nov 14 23:49:53 mprac1.localdomain systemd[1]: iscsi.service: Unit cannot be reloaded because it is inactive.
Nov 14 23:49:54 mprac1.localdomain systemd[1]: iscsi.service: Unit cannot be reloaded because it is inactive.
Nov 14 23:49:55 mprac1.localdomain systemd[1]: iscsi.service: Unit cannot be reloaded because it is inactive.
Nov 14 23:49:56 mprac1.localdomain systemd[1]: iscsi.service: Unit cannot be reloaded because it is inactive.
[root@mprac1 ~]# systemctl status iscsid.service 
● iscsid.service - Open-iSCSI
   Loaded: loaded (/usr/lib/systemd/system/iscsid.service; disabled; vendor preset: disabled)
   Active: active (running) since Sat 2020-11-14 23:49:51 KST; 13h ago
     Docs: man:iscsid(8)
           man:iscsiuio(8)
           man:iscsiadm(8)
 Main PID: 1365 (iscsid)
   Status: "Ready to process requests"
    Tasks: 1 (limit: 48742)
   Memory: 4.0M
   CGroup: /system.slice/iscsid.service
           └─1365 /usr/sbin/iscsid -f -d2

Nov 14 23:49:50 mprac1.localdomain systemd[1]: Starting Open-iSCSI...
Nov 14 23:49:51 mprac1.localdomain iscsid[1365]: iscsid: InitiatorName=iqn.1988-12.com.oracle:4ec8ed78b6b
Nov 14 23:49:51 mprac1.localdomain iscsid[1365]: iscsid: InitiatorAlias=mprac1.localdomain
Nov 14 23:49:51 mprac1.localdomain iscsid[1365]: iscsid: Max file limits 1024 262144
Nov 14 23:49:51 mprac1.localdomain systemd[1]: Started Open-iSCSI.
[root@mprac1 ~]# systemctl enable iscsid.service 
Created symlink /etc/systemd/system/multi-user.target.wants/iscsid.service → /usr/lib/systemd/system/iscsid.service.
[root@mprac1 ~]# systemctl status iscsid.service 
● iscsid.service - Open-iSCSI
   Loaded: loaded (/usr/lib/systemd/system/iscsid.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2020-11-15 14:03:25 KST; 4min 45s ago
     Docs: man:iscsid(8)
           man:iscsiuio(8)
           man:iscsiadm(8)
 Main PID: 1368 (iscsid)
   Status: "Ready to process requests"
    Tasks: 1 (limit: 48742)
   Memory: 4.1M
   CGroup: /system.slice/iscsid.service
           └─1368 /usr/sbin/iscsid -f -d2

Nov 15 14:03:25 mprac1.localdomain systemd[1]: Starting Open-iSCSI...
Nov 15 14:03:25 mprac1.localdomain iscsid[1368]: iscsid: InitiatorName=iqn.2020-11.kwanst.localdomain:server
Nov 15 14:03:25 mprac1.localdomain iscsid[1368]: iscsid: InitiatorAlias=mprac1.localdomain
Nov 15 14:03:25 mprac1.localdomain iscsid[1368]: iscsid: Max file limits 1024 262144
Nov 15 14:03:25 mprac1.localdomain systemd[1]: Started Open-iSCSI.
[root@mprac1 ~]# 

 

iscsi.service 의 경우 discovery를 통해 node 정보를 구성해 놓지 않았기 때문에 현재 inactive 상태에 fail 로그를 확인할 수 있다.

 

3) iscsiadm을 통해 discovery 진행 후 node 모드로 접속 완료

[root@mprac1 ~]# cat /etc/iscsi/initiatorname.iscsi 
InitiatorName=iqn.2020-11.kwanst.localdomain:rac 
[root@mprac1 ~]# iscsiadm -m discovery -t st -p kwanst-priv
1.1.1.105:3260,1 iqn.2020-11.kwanst.localdomain:server
[root@mprac1 ~]# iscsiadm -m node -p kwanst-priv.localdomain --login
[root@mprac1 ~]# iscsiadm -m node --op update -n node.startup -v automatic
[root@mprac1 ~]# fdisk -l
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B0328A67-F234-4B44-8949-47911CAA957E

Device       Start       End   Sectors  Size Type
/dev/sda1     2048   1230847   1228800  600M EFI System
/dev/sda2  1230848   3327999   2097152    1G Linux filesystem
/dev/sda3  3328000 167770111 164442112 78.4G Linux LVM




Disk /dev/mapper/ol_mprac1-root: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol_mprac1-swap: 16 GiB, 17179869184 bytes, 33554432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol_mprac1-home: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33550336 bytes


Disk /dev/sdc: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33550336 bytes


Disk /dev/sdd: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33550336 bytes


Disk /dev/sde: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33550336 bytes


Disk /dev/sdf: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33550336 bytes

[root@mprac1 ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: VMware   Model: Virtual disk     Rev: 2.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 06
Host: scsi3 Channel: 00 Id: 00 Lun: 00
  Vendor: NECVMWar Model: VMware SATA CD00 Rev: 1.00
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi33 Channel: 00 Id: 00 Lun: 00
  Vendor: LIO-ORG  Model: crs1             Rev: 4.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi33 Channel: 00 Id: 00 Lun: 04
  Vendor: LIO-ORG  Model: fra              Rev: 4.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi33 Channel: 00 Id: 00 Lun: 03
  Vendor: LIO-ORG  Model: data             Rev: 4.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi33 Channel: 00 Id: 00 Lun: 02
  Vendor: LIO-ORG  Model: crs3             Rev: 4.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi33 Channel: 00 Id: 00 Lun: 01
  Vendor: LIO-ORG  Model: crs2             Rev: 4.0 
  Type:   Direct-Access                    ANSI  SCSI revision: 05
[root@mprac1 ~]# lsblk
NAME               MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                  8:0    0   80G  0 disk 
├─sda1               8:1    0  600M  0 part /boot/efi
├─sda2               8:2    0    1G  0 part /boot
└─sda3               8:3    0 78.4G  0 part 
  ├─ol_mprac1-root 252:0    0   40G  0 lvm  /
  ├─ol_mprac1-swap 252:1    0   16G  0 lvm  [SWAP]
  └─ol_mprac1-home 252:2    0   20G  0 lvm  /home
sdb                  8:16   0    5G  0 disk 
sdc                  8:32   0   50G  0 disk 
sdd                  8:48   0   50G  0 disk 
sde                  8:64   0    5G  0 disk 
sdf                  8:80   0    5G  0 disk 
sr0                 11:0    1 1024M  0 rom  

 

fdisk를 통해서 iscsi를 통해 추가된 sdb, sdc, sdd, sde, sdf Disk 를 확인할 수 있다.

iscsi 접속시 로그인 설정을 통해 id / password 를 적용할 수 있지만 테스트 구성이기 때문에 해당 내용을 생략하였다.

 

5, 기타 작업 방법

1) node에서 logout

[root@mprac1 ~]# iscsiadm -m node -p kwanst-priv --logout
Logging out of session [sid: 1, target: iqn.2020-11.kwanst.localdomain:server, portal: 1.1.1.105,3260]
Logout of [sid: 1, target: iqn.2020-11.kwanst.localdomain:server, portal: 1.1.1.105,3260] successful.
[root@mprac1 ~]# fdisk -l
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B0328A67-F234-4B44-8949-47911CAA957E

Device       Start       End   Sectors  Size Type
/dev/sda1     2048   1230847   1228800  600M EFI System
/dev/sda2  1230848   3327999   2097152    1G Linux filesystem
/dev/sda3  3328000 167770111 164442112 78.4G Linux LVM




Disk /dev/mapper/ol_mprac1-root: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol_mprac1-swap: 16 GiB, 17179869184 bytes, 33554432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol_mprac1-home: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@mprac1 ~]# 

 

2) discover 한 정보 혹은 node 정보를 를 삭제하기 

# node 모드의 정보를 삭제
iscsiadm -m node -o delete -T iqn.2020-11.kwanst.localdomain:server

# discovery를 통해 기록한 정보를 삭제
iscsiadm -m discoverydb -o delete -t st -p kwanst-priv

 

discovery 를 통해 발견한 정보는 /var/lib/iscsi 디렉토리 및에 저장되어 있다.

 

[root@mprac1 ~]# ls -al /var/lib/iscsi/
total 4
drwxr-xr-x.  8 root root   90 Nov  6 23:25 .
drwxr-xr-x. 68 root root 4096 Nov 14 22:59 ..
drwxr-xr-x.  2 root root    6 Nov  6 23:25 ifaces
drwxr-xr-x.  2 root root    6 Nov  6 23:25 isns
drwxr-xr-x.  3 root root   51 Nov 15 15:35 nodes
drwxr-xr-x.  3 root root   30 Nov 15 15:35 send_targets
drwxr-xr-x.  2 root root    6 Nov  6 23:25 slp
drwxr-xr-x.  2 root root    6 Nov  6 23:25 static
[root@mprac1 ~]# ls -al /var/lib/iscsi/nodes/
total 0
drwxr-xr-x. 3 root root 51 Nov 15 15:35 .
drwxr-xr-x. 8 root root 90 Nov  6 23:25 ..
drw-------. 3 root root 30 Nov 15 15:35 iqn.2020-11.kwanst.localdomain:server
[root@mprac1 ~]# ls -al /var/lib/iscsi/send_targets/
total 0
drwxr-xr-x. 3 root root 30 Nov 15 15:35 .
drwxr-xr-x. 8 root root 90 Nov  6 23:25 ..
drw-------. 2 root root 93 Nov 15 15:35 kwanst-priv,3260
[root@mprac1 ~]# 

 

 

 

 

 

 

위로