next up previous contents
Next: NTP Up: ISCSI Previous: 安全機制   Contents

Client 端測試

  1. 遠端測試 iscsi 硬碟是否存在?
    [root@kvm8 ~]# iscsiadm -m discovery -t sendtargets -p deyu.wang:3260
    Starting iscsid:                                           [  OK  ]
    192.168.122.1:3260,1 iqn.2012-05.wang.deyu:deyudisk
    
  2. 遠端以 debug level 2 連上 iscsi
    [root@kvm8 ~]# iscsiadm -d2 -m node --login
    iscsiadm: Max file limits 1024 1024
    
    iscsiadm: default: Creating session 1/1
    Logging in to [iface: default, target: iqn.2012-05.wang.deyu:deyudisk, portal: 192.168.122.1,3260] (multiple)
    Login to [iface: default, target: iqn.2012-05.wang.deyu:deyudisk, portal: 192.168.122.1,3260] successful.
    
  3. 連上後可以看到 /dev/sda,視為一顆新的硬諜使用。
    [root@kvm8 ~]# ll /dev/sda
    brw-rw----. 1 root disk 8, 0 Aug 10 01:17 /dev/sda
    
  4. 遠端以 debug level 2 解開 iscsi
    [root@kvm8 ~]# iscsiadm -d2 -m node --logout
    iscsiadm: Max file limits 1024 1024
    
    Logging out of session [sid: 1, target: iqn.2012-05.wang.deyu:deyudisk, portal: 192.168.122.1,3260]
    Logout of [sid: 1, target: iqn.2012-05.wang.deyu:deyudisk, portal: 192.168.122.1,3260] successful.
    
  5. 解開後 /dev/sda 不見了。
    [root@kvm8 ~]# ll /dev/sda
    ls: cannot access /dev/sda: No such file or directory
    


2018-04-25