linux配置连接freenas的iscsi

[root@localhost ~]# yum -y install iscsi-initiator-utils  
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
base                                                                                                                                                                                                                  | 3.7 kB     00:00     
base/primary_db                                                                                                                                                                                                       | 4.7 MB     00:30     
extras                                                                                                                                                                                                                | 3.4 kB     00:00     
extras/primary_db                                                                                                                                                                                                     |  29 kB     00:00     
updates                                                                                                                                                                                                               | 3.4 kB     00:00     
updates/primary_db                                                                                                                                                                                                    | 3.7 MB     01:35     
Resolving Dependencies
--> Running transaction check
---> Package iscsi-initiator-utils.x86_64 0:6.2.0.873-27.el6_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                           Arch                                               Version                                                         Repository                                        Size
=============================================================================================================================================================================================================================================
Installing:
 iscsi-initiator-utils                                             x86_64                                             6.2.0.873-27.el6_9                                              base                                             732 k

Transaction Summary
=============================================================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 732 k
Installed size: 2.5 M
Downloading Packages:
iscsi-initiator-utils-6.2.0.873-27.el6_9.x86_64.rpm                                                                                                                                                                   | 732 kB     00:04     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
 Userid : CentOS-6 Key (CentOS 6 Official Signing Key)
 Package: centos-release-6-10.el6.centos.12.3.x86_64 (@anaconda-CentOS-201806291108.x86_64/6.10)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : iscsi-initiator-utils-6.2.0.873-27.el6_9.x86_64                                                                                                                                                                           1/1 
  Verifying  : iscsi-initiator-utils-6.2.0.873-27.el6_9.x86_64                                                                                                                                                                           1/1 

Installed:
  iscsi-initiator-utils.x86_64 0:6.2.0.873-27.el6_9                                                                                                                                                                                          

Complete!
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]#  service iscsid start   
[root@localhost ~]# chkconfig iscsid on
[root@localhost ~]# chkconfig iscsid --list
iscsid          0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@localhost ~]# iscsiadm -m discovery -t sendtargets -p 192.168.52.133
[  OK  ] iscsid: [  OK  ]
192.168.52.133:3260,1 iqn.2005-10.org.freenas.ctl:rac
[root@localhost ~]# iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:rac -p 192.168.52.133:3260 -l
Logging in to [iface: default, target: iqn.2005-10.org.freenas.ctl:rac, portal: 192.168.52.133,3260] (multiple)
Login to [iface: default, target: iqn.2005-10.org.freenas.ctl:rac, portal: 192.168.52.133,3260] successful.

[root@localhost ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003ca48

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          39      307200   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              39         430     3145728   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             430        3917    28003328   83  Linux

Disk /dev/sdb: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdc: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdd: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sde: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdf: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdh: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdg: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdi: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdj: 53.7 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000

[root@localhost ~]# pwd
/root
[root@localhost ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003ca48

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          39      307200   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              39         430     3145728   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3             430        3917    28003328   83  Linux

Disk /dev/sdb: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdc: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdd: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sde: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdf: 5368 MB, 5368709120 bytes
166 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10292 * 512 = 5269504 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdh: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdg: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdi: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000


Disk /dev/sdj: 53.7 GB, 53687091200 bytes
64 heads, 32 sectors/track, 51200 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 131072 bytes
Disk identifier: 0x00000000

 

[root@localhost ~]# 

http://www.cnblogs.com/nulige/p/7877725.html

OS Version:

FreeNAS-11.2-U4

(Build Date: May 7, 2019 0:46)

Processor:

Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (2 cores)

Memory:

2 GiB

HostName:

freenas.local

Uptime:

1:55AM up 14 mins, 0 users

linux配置连接freenas的iscsi_第1张图片

linux配置连接freenas的iscsi_第2张图片linux配置连接freenas的iscsi_第3张图片linux配置连接freenas的iscsi_第4张图片linux配置连接freenas的iscsi_第5张图片linux配置连接freenas的iscsi_第6张图片linux配置连接freenas的iscsi_第7张图片linux配置连接freenas的iscsi_第8张图片

你可能感兴趣的:(linux)