OpenStack是云计算服务解决方案中发展较早的一个体系性产品,但它的组件多而复杂,个组件间的关系藕断丝连,整个平台的搭建部署、使用维护均存在较高的技术门槛,不是一般的非技术性组织能够驾驭的了的。榆次相似的产品还有Ctrix贡献给Apache的CloudStack。二者都能够提供较好的云计算管理服务,甚至在某些方面可以和亚马逊公司的商业产品AWS一较高下,但较高水准的技术门槛使得绝大部分非专业人士望而却步。此外,由于OpenStack并非一个完整的软件产品,这导致它在产品产品稳定性方面较差,且不能实现新旧版本间的平滑升级,并不具备产品级的软件使用价值。
目前中国大陆的云计算服务解决方案供应商的软件产品或方案几乎都是在开源产品OpenStack做的换皮式包装,这就继承了OpenStack的天生缺陷,但供应商的做法是进行软件和硬件的绑定,进行定制化维保,这虽然一定解决了“要不要随着新版本升级”的问题,但并没有从根本上解决OpenStack的产品稳定性与安全性问题。这类典型供应商有华为、中兴、深信服等,他们的商业营销噱头是“提供超融合服务”或者“提供超融合解决方案”。
另一类云计算服务供应商侧重于提供基于OpenStack的本土化服务,绝大部分最终沦为了人力资源外包服务项目,对承接的维保项目进行驻点维护。目前在这方面做得比较受认可、且被央企收购的产品是易捷行云的EasyStack,还有红帽公司二次封装的Red_Hat_Enterprise_Linux_OpenStack_Platform,这二者都提供了商业收费的技术支持服务,但使用和维护这类产品依旧存在较大技术成本。
国大陆的云计算服务解决方案市场上还有一类侧重于产品技术推进的供应商,他们把云计算服务的软件体系封装了成稳定产品,提供普惠性的产品级的销售服务和售后服务,典型的厂商是ZStack。尽管ZStack一再宣称并非基于OpenStack深度定制,但ZStack的总设计师张鑫曾长期服务于CloudStack项目和Ctrix的虚拟化项目,而这二者又和OpenStack的关系讳莫如深,难免在技术方向和设计思路上有点儿藕断丝连。所幸ZStack也是一个开源项目,从目前产品的主要功能上看,有可能借鉴了AWS的思路,新版本中重点强调了它的计费服务功能。

以下展示如何通过搭建ZStack云计算平台连接iSCSI存储服务后构建成一个私有云环境的云计算服务平台。
首先搭建好一个可以对外提供存储服务的iSCSI存储服务器,能提供iSCSI服务的软件产品有很多,这里选择的是CentOS7系统中提供的iSCSI服务程序 scsi-target-utils。
其次,准备一台配置不低于4核心CPU、8GB内存、50GB硬盘的主机,用于部署ZStack平台。在对ZStack平台完成资源初始化后即可对外提供虚拟计算机服务,也就是阿里云或腾讯云针对个人提供的云主机服务。

以下是实验操作过程:

配置iSCSI存储服务器
CentOS71908安装配置iSCSI服务端

先执行OS初始化脚本完成对OS环境的初始化,初始化脚本如下:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.original
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum makecache
yum -y update
yum install -y ntpdate
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum localinstall -y google-chrome-stable_current_x86_64.rpm
ntpdate cn.ntp.org.cn
systemctl stop firewalld && systemctl disable firewalld
sed -i 's/^SELINUX=./SELINUX=disabled/' /etc/selinux/config && setenforce 0
wget https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-7.noarch.rpm
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
sed -i 's|^#baseurl=https://download.fedoraproject.org/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel

sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
yum clean all && yum makecache
yum -y update
yum install -y tree
init 6

查看防火墙与SELinux状态:
[googlebigtable@localhost ~]$ su - root
Password:
Last login: Sun Jun 7 16:08:45 CST 2020 on pts/0
[root@localhost ~]# ls -F
anaconda-ks.cfg initial-setup-ks.cfg
[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
[root@localhost ~]# sestatus
SELinux status: disabled
[root@localhost ~]#
[root@localhost ~]# yum -y install targetcli
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    Package targetcli-2.1.fb49-1.el7.noarch already installed and latest version
    Nothing to do
    [root@localhost ~]# mkdir -p /root/iscsishare
    [root@localhost ~]# yum install -y tree
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package tree.x86_64 0:1.6.0-10.el7 will be installed
    --> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================
Package Arch Version Repository Size

Installing:
tree x86_64 1.6.0-10.el7 base 46 k

Transaction Summary

Install 1 Package

Total download size: 46 k
Installed size: 87 k
Downloading packages:
tree-1.6.0-10.el7.x86_64.rpm | 46 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : tree-1.6.0-10.el7.x86_64 1/1
Verifying : tree-1.6.0-10.el7.x86_64 1/1

Installed:
tree.x86_64 0:1.6.0-10.el7

Complete!
[root@localhost ~]# tree /root/
/root/
├── anaconda-ks.cfg
├── initial-setup-ks.cfg
└── iscsishare

1 directory, 2 files
[root@localhost ~]# yum install -y scsi-target-utils
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package scsi-target-utils.x86_64 0:1.0.55-4.el7 will be installed
    --> Processing Dependency: perl(Config::General) for package: scsi-target-utils-1.0.55-4.el7.x86_64
    --> Running transaction check
    ---> Package perl-Config-General.noarch 0:2.61-1.el7 will be installed
    --> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================
Package Arch Version Repository Size

Installing:
scsi-target-utils x86_64 1.0.55-4.el7 epel 209 k
Installing for dependencies:
perl-Config-General noarch 2.61-1.el7 epel 75 k

Transaction Summary

Install 1 Package (+1 Dependent package)

Total download size: 283 k
Installed size: 697 k
Downloading packages:
(1/2): perl-Config-General-2.61-1.el7.noarch.rpm | 75 kB 00:00:01
(2/2): scsi-target-utils-1.0.55-4.el7.x86_64.rpm | 209 kB 00:00:01

Total 241 kB/s | 283 kB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : perl-Config-General-2.61-1.el7.noarch 1/2
Installing : scsi-target-utils-1.0.55-4.el7.x86_64 2/2
Verifying : perl-Config-General-2.61-1.el7.noarch 1/2
Verifying : scsi-target-utils-1.0.55-4.el7.x86_64 2/2

Installed:
scsi-target-utils.x86_64 0:1.0.55-4.el7

Dependency Installed:
perl-Config-General.noarch 0:2.61-1.el7

Complete!
[root@localhost ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 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 label type: dos
Disk identifier: 0x00013359

Device Boot Start End Blocks Id System
/dev/sda1 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM
Disk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 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/centos-swap: 2147 MB, 2147483648 bytes, 4194304 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@localhost ~]#
添加一块新硬盘到服务器

[googlebigtable@localhost ~]$ su - root
Password:
Last login: Sun Jun 7 17:07:22 CST 2020 on pts/0
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─centos-root 253:0 0 17G 0 lvm /
└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
sr0 11:0 1 1024M 0 rom
[root@localhost ~]# fdisk -l /dev/sda

Disk /dev/sda: 21.5 GB, 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 label type: dos
Disk identifier: 0x00013359

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM
[root@localhost ~]# fdisk -l

Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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/sda: 21.5 GB, 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 label type: dos
Disk identifier: 0x00013359

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM

Disk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 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/centos-swap: 2147 MB, 2147483648 bytes, 4194304 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@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 13M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root 17G 5.8G 12G 35% /
/dev/sda1 1014M 237M 778M 24% /boot
tmpfs 378M 24K 378M 1% /run/user/1000
[root@localhost ~]#
在sdb设备上创建分区
[root@localhost ~]# fdisk -l

Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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/sda: 21.5 GB, 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 label type: dos
Disk identifier: 0x00013359

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM

Disk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 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/centos-swap: 2147 MB, 2147483648 bytes, 4194304 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@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x4360a56d.

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x3c8e6b8d.

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): 2500m
Partition 1 of type Linux and of size 226.5 KiB is set

Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p):
Using default response p
Partition number (2-4, default 2):
First sector (2501-20971519, default 4096):
Using default value 4096
Last sector, +sectors or +size{K,M,G} (4096-20971519, default 20971519):
Using default value 20971519
Partition 2 of type Linux and of size 10 GiB is set

Command (m for help): p

Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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 label type: dos
Disk identifier: 0x3c8e6b8d

Device Boot Start End Blocks Id System
/dev/sdb1 2048 2500 226+ 83 Linux
/dev/sdb2 4096 20971519 10483712 83 Linux

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# fdisk -l

Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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 label type: dos
Disk identifier: 0x3c8e6b8d

Device Boot Start End Blocks Id System
/dev/sdb1 2048 2500 226+ 83 Linux
/dev/sdb2 4096 20971519 10483712 83 Linux

Disk /dev/sda: 21.5 GB, 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 label type: dos
Disk identifier: 0x00013359

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM

Disk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 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/centos-swap: 2147 MB, 2147483648 bytes, 4194304 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@localhost ~]#
[root@localhost ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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 label type: dos
Disk identifier: 0x3c8e6b8d

Device Boot Start End Blocks Id System
/dev/sdb1 2048 2500 226+ 83 Linux
/dev/sdb2 4096 20971519 10483712 83 Linux
[root@localhost ~]#
[root@localhost ~]# rpm -qa | grep target
selinux-policy-targeted-3.13.1-266.el7.noarch
targetcli-2.1.fb49-1.el7.noarch
scsi-target-utils-1.0.55-4.el7.x86_64
[root@localhost ~]# rpm -ql targetcli-2.1.fb49-1.el7.noarch
/etc/target
/etc/target/backup
/usr/bin/targetcli
/usr/lib/python2.7/site-packages/targetcli
/usr/lib/python2.7/site-packages/targetcli/init.py
/usr/lib/python2.7/site-packages/targetcli/init.pyc
/usr/lib/python2.7/site-packages/targetcli/init.pyo
/usr/lib/python2.7/site-packages/targetcli/ui_backstore.py
/usr/lib/python2.7/site-packages/targetcli/ui_backstore.pyc
/usr/lib/python2.7/site-packages/targetcli/ui_backstore.pyo
/usr/lib/python2.7/site-packages/targetcli/ui_node.py
/usr/lib/python2.7/site-packages/targetcli/ui_node.pyc
/usr/lib/python2.7/site-packages/targetcli/ui_node.pyo
/usr/lib/python2.7/site-packages/targetcli/ui_root.py
/usr/lib/python2.7/site-packages/targetcli/ui_root.pyc
/usr/lib/python2.7/site-packages/targetcli/ui_root.pyo
/usr/lib/python2.7/site-packages/targetcli/ui_target.py
/usr/lib/python2.7/site-packages/targetcli/ui_target.pyc
/usr/lib/python2.7/site-packages/targetcli/ui_target.pyo
/usr/lib/python2.7/site-packages/targetcli/version.py
/usr/lib/python2.7/site-packages/targetcli/version.pyc
/usr/lib/python2.7/site-packages/targetcli/version.pyo
/usr/lib/python2.7/site-packages/targetcli_fb-2.1.fb49-py2.7.egg-info
/usr/lib/python2.7/site-packages/targetcli_fb-2.1.fb49-py2.7.egg-info/PKG-INFO
/usr/lib/python2.7/site-packages/targetcli_fb-2.1.fb49-py2.7.egg-info/SOURCES.txt
/usr/lib/python2.7/site-packages/targetcli_fb-2.1.fb49-py2.7.egg-info/dependency_links.txt
/usr/lib/python2.7/site-packages/targetcli_fb-2.1.fb49-py2.7.egg-info/top_level.txt
/usr/share/doc/targetcli-2.1.fb49
/usr/share/doc/targetcli-2.1.fb49/COPYING
/usr/share/doc/targetcli-2.1.fb49/README.md
/usr/share/man/man8/targetcli.8.gz
[root@localhost ~]# rpm -ql scsi-target-utils-1.0.55-4.el7.x86_64
/etc/sysconfig/tgtd
/etc/tgt/conf.d/sample.conf
/etc/tgt/targets.conf
/etc/tgt/tgtd.conf
/usr/lib/systemd/system/tgtd.service
/usr/sbin/tgt-admin
/usr/sbin/tgt-setup-lun
/usr/sbin/tgtadm
/usr/sbin/tgtd
/usr/sbin/tgtimg
/usr/share/doc/scsi-target-utils-1.0.55
/usr/share/doc/scsi-target-utils-1.0.55/README
/usr/share/doc/scsi-target-utils-1.0.55/README.iscsi
/usr/share/doc/scsi-target-utils-1.0.55/README.iser
/usr/share/doc/scsi-target-utils-1.0.55/README.lu_configuration
/usr/share/doc/scsi-target-utils-1.0.55/README.mmc
/usr/share/doc/scsi-target-utils-1.0.55/README.ssc
/usr/share/man/man5/targets.conf.5.gz
/usr/share/man/man8/tgt-admin.8.gz
/usr/share/man/man8/tgt-setup-lun.8.gz
/usr/share/man/man8/tgtadm.8.gz
[root@localhost ~]#
[root@localhost ~]# cat -n /etc/tgt/targets.conf
1 # This is a sample config file for tgt-admin.
2 #
3 # The "#" symbol disables the processing of a line.
4
5 # Set the driver. If not specified, defaults to "iscsi".
6 default-driver iscsi
7
8 # Set iSNS parameters, if needed
9 #iSNSServerIP 192.168.111.222
10 #iSNSServerPort 3205
11 #iSNSAccessControl On
12 #iSNS On
13
14 # Continue if tgtadm exits with non-zero code (equivalent of
15 # --ignore-errors command line option)
16 #ignore-errors yes
17
[root@localhost ~]# cp /etc/tgt/targets.conf{,.original}
[root@localhost ~]# ls -F /etc/tgt/
conf.d/ targets.conf targets.conf.original tgtd.conf
[root@localhost ~]# gedit /etc/tgt/targets.conf

(gedit:3637): WARNING : 17:42:45.454: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported

(gedit:3637): WARNING : 17:42:45.454: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported

(gedit:3637): WARNING : 17:42:47.990: Set document metadata failed: Setting attribute metadata::gedit-position not supported
[root@localhost ~]# cat -n /etc/tgt/targets.conf
1 # This is a sample config file for tgt-admin.
2 #
3 # The "#" symbol disables the processing of a line.
4
5 # Set the driver. If not specified, defaults to "iscsi".
6 default-driver iscsi
7
8 # Set iSNS parameters, if needed
9 #iSNSServerIP 192.168.111.222
10 #iSNSServerPort 3205
11 #iSNSAccessControl On
12 #iSNS On
13
14 # Continue if tgtadm exits with non-zero code (equivalent of
15 # --ignore-errors command line option)
16 #ignore-errors yes
17
18 <target iqn.2020-06.com.zstack:iscsitest>
19 backing-store /dev/sdb2
20 initiator-address 192.168.207.0/24
21 write-cache off
22 </target>
[root@localhost ~]# systemctl status tgtd
● tgtd.service - tgtd iSCSI target daemon
Loaded: loaded (/usr/lib/systemd/system/tgtd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[root@localhost ~]#
[root@localhost ~]# systemctl start tgtd
[root@localhost ~]# systemctl status tgtd
● tgtd.service - tgtd iSCSI target daemon
Loaded: loaded (/usr/lib/systemd/system/tgtd.service; disabled; vendor preset: disabled)
Active: active (running) since Sun 2020-06-07 17:45:21 CST; 3s ago
Process: 3746 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v ready (code=exited, status=0/SUCCESS)
Process: 3738 ExecStartPost=/usr/sbin/tgt-admin -e -c $TGTD_CONFIG (code=exited, status=0/SUCCESS)
Process: 3737 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS)
Process: 3731 ExecStartPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
Main PID: 3730 (tgtd)
Tasks: 1
CGroup: /system.slice/tgtd.service
└─3730 /usr/sbin/tgtd -f

Jun 07 17:45:16 localhost.localdomain systemd[1]: Starting tgtd iSCSI target daemon...
Jun 07 17:45:16 localhost.localdomain tgtd[3730]: tgtd: iser_ib_init(3436) Failed to initialize RDMA; load kernel modules?
Jun 07 17:45:16 localhost.localdomain tgtd[3730]: tgtd: work_timer_start(146) use timer_fd based scheduler
Jun 07 17:45:16 localhost.localdomain tgtd[3730]: tgtd: bs_init_signalfd(267) could not open backing-store module directory /usr/lib64/tgt/backing-store
Jun 07 17:45:16 localhost.localdomain tgtd[3730]: tgtd: bs_init(386) use signalfd notification
Jun 07 17:45:21 localhost.localdomain systemd[1]: Started tgtd iSCSI target daemon.
[root@localhost ~]# systemctl enable tgtd
Created symlink from /etc/systemd/system/multi-user.target.wants/tgtd.service to /usr/lib/systemd/system/tgtd.service.
[root@localhost ~]# netstat -tlunp | grep tgt
tcp 0 0 0.0.0.0:3260 0.0.0.0: LISTEN 3730/tgtd
tcp6 0 0 :::3260 :::
 LISTEN 3730/tgtd
[root@localhost ~]#
[root@localhost ~]# partprobe
[root@localhost ~]# systemctl restart tgtd
[root@localhost ~]# systemctl status tgtd
● tgtd.service - tgtd iSCSI target daemon
Loaded: loaded (/usr/lib/systemd/system/tgtd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-06-07 18:18:37 CST; 5s ago
Process: 4468 ExecStop=/usr/sbin/tgtadm --op delete --mode system (code=exited, status=0/SUCCESS)
Process: 4460 ExecStop=/usr/sbin/tgt-admin --update ALL -c /dev/null (code=exited, status=0/SUCCESS)
Process: 4457 ExecStop=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS)
Process: 4503 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v ready (code=exited, status=0/SUCCESS)
Process: 4475 ExecStartPost=/usr/sbin/tgt-admin -e -c $TGTD_CONFIG (code=exited, status=0/SUCCESS)
Process: 4473 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS)
Process: 4471 ExecStartPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
Main PID: 4470 (tgtd)
Tasks: 17
CGroup: /system.slice/tgtd.service
└─4470 /usr/sbin/tgtd -f

Jun 07 18:18:32 localhost.localdomain systemd[1]: Starting tgtd iSCSI target daemon...
Jun 07 18:18:32 localhost.localdomain tgtd[4470]: tgtd: iser_ib_init(3436) Failed to initialize RDMA; load kernel modules?
Jun 07 18:18:32 localhost.localdomain tgtd[4470]: tgtd: work_timer_start(146) use timer_fd based scheduler
Jun 07 18:18:32 localhost.localdomain tgtd[4470]: tgtd: bs_init_signalfd(267) could not open backing-store module directory /usr/lib64/tgt/backing-store
Jun 07 18:18:32 localhost.localdomain tgtd[4470]: tgtd: bs_init(386) use signalfd notification
Jun 07 18:18:37 localhost.localdomain tgtd[4470]: tgtd: device_mgmt(246) sz:15 params:path=/dev/sdb2
Jun 07 18:18:37 localhost.localdomain tgtd[4470]: tgtd: bs_thread_open(408) 16
Jun 07 18:18:37 localhost.localdomain systemd[1]: Started tgtd iSCSI target daemon.
[root@localhost ~]# netstat -tlunp | grep tgt
tcp 0 0 0.0.0.0:3260 0.0.0.0: LISTEN 4470/tgtd
tcp6 0 0 :::3260 :::
 LISTEN 4470/tgtd
[root@localhost ~]# tgtadm --mode target --op show
Target 1: iqn.2020-06.com.zstack:iscsitest
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 10735 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: rdwr
Backing store path: /dev/sdb2
Backing store flags:
Account information:
ACL information:
192.168.207.0/24
[root@localhost ~]#

安装部署ZStack云计算服务管理平台:

ZStack平台连接iSCSI存储构建云计算服务相关推荐

  1. linux 多路径重启,(linux多路径连接iScsi存储重启自动连接.docx

    (linux多路径连接iScsi存储重启自动连接 RHEL系统带有iSCSI initiator软件,下面描述如何配置iSCSI Initiator实现对ISCSI卷的访问Linux iscsi 介绍 ...

  2. 43个云平台通过云计算服务安全评估:阿里云、腾讯云、华为云、曙光云、新华云、金山云、电科云、浪潮云、紫光云、深信服等...

    公众号回复:干货,领取价值58元/套IT管理体系文档 公众号回复:ITIL教材,领取最新ITIL4中文教材 正文 近期,中共中央网络安全和信息化委员会办公室发布了<通过云计算服务安全评估的云平台 ...

  3. 蚂蚁课堂-第四期-基于springcloud构建微服务电商项目_阿里巴巴29个屌炸天的开源项目,你用过几个?附编程资料!!!...

    1. 分布式应用服务开发的一站式解决方案 Spring Cloud Alibaba Spring Cloud Alibaba 致力于提供分布式应用服务开发的一站式解决方案.此项目包含开发分布式应用服务 ...

  4. 《云计算服务安全能力要求》与《云计算服务安全指南》标准

    <信息安全技术 云计算服务安全能力要求>与<信息安全技术 云计算服务安全指南>构成了云计算服务安全管理的基础标准. <云计算服务安全指南>面向政府部门,提出了使用云 ...

  5. 安全可信 | 增强级认定!天翼云政务云通过云计算服务安全评估!

    近日,天翼云与中国电信安徽分公司联合承建的安徽省省级政务云平台顺利通过云计算服务安全评估(增强级)认证.这标志着天翼云的政务云安全水平和成熟度已经通过国家权威机构认证,能够满足政府政务应用上云的高安全 ...

  6. iSCSI存储技术全攻略【存储部落】云存储|云计算|云服务

    iSCSI存储技术全攻略 什么是iSCSI iSCSI(iSCSI = internet Small Computer System Interface )是由IEETF开发的网络存储标准,目的是为了 ...

  7. 四、Zstack云平台功能概述(ZCCT云计算认证)

    四.Zstack云平台功能概述(ZCCT云计算认证) 一.首页 概览 包含如下项目: 产品与服务 区域 大屏展示 工单 告警信息 最近操作 个人中心 二.资源中心 1.云资源池 云主机 运行在物理机上 ...

  8. K8S 快速入门(一)虚拟化、容器化构建云计算平台的基本概念及原理解析

    本章主题 1.认识kubernetes (k8s) 在企业中应用场景? ----- 为什么要学习K8s?? 2.云技术(云计算平台) - 虚拟化及虚拟化基本概念及原理 3.云技术(云计算平台) - 容 ...

  9. 利用ISCSI存储技术构建IP存储网络(概念篇)

    一.iSCSI的概念iSCSI是一种在Internet协议上,特别是以太网上进行数据块传输的标准,它是一种基于IP Storage理论的新型存储技术,该技术是将存储行业广泛应用的SCSI接口技术与IP ...

最新文章

  1. 在Ubuntu 16.04.5 LTS上使用python第三方库QRCode 6.0生成二维码实录
  2. wordpress短代码转php,WordPress中的shortcode短代码功能使用详解
  3. Centos6.5搭建java开发环境
  4. docker 卸载镜像_Centos7 安装 Docker
  5. getTrackbarPos函数
  6. Java队列 Queue
  7. 腾讯数平精准推荐 | 横扫ICDAR 2019,斩获七项冠军
  8. api接口怎么对接_系统对接项目管理方面怎么做?从一次项目接口对接说起
  9. 【多题合集】网络流24题练习(更新至魔术球问题)
  10. 浅谈如何管理测试团队
  11. ASP.NET MVC Pager Helper Extensions
  12. 概率统计学习笔记(9)——连续型:均匀分布、指数分布
  13. 巴西龟饲养日志----七月底巴西龟状况
  14. linux开组态软件,基于嵌入式Linux的组态软件实时数据库的设计
  15. 如何建立师资库_HR们如何建立人才库?
  16. 在下拉列表框中实现placeholder
  17. linux 系统黑洞简单使用案例
  18. 《系统架构设计师教程》 第一章:绪论
  19. 第十三章 半监督学习
  20. [博学谷学习记录]超强总结,用心分享|第16节 集合续-----笔记篇

热门文章

  1. [597]Oracle插入或修改报ORA-01704: 文字字符串太长
  2. 基于ESP32学习MicroPython(三): 流水灯案例
  3. 考研数学——Python绘制极坐标图,画笛卡尔心形线、玫瑰线、阿基米德螺线、伯努利双纽线(加深图像理解)
  4. 传智健康——七牛云技术用于图片存储
  5. wait等待和超时处理
  6. 开机弹出网页msftconnecttest com/redirect解决方法
  7. 安卓10省电还是费电_手机真实耗电原因已确认,1小时吞10%电量,原来是这个功能没关!...
  8. tzc 台州学院 1423------hdu 2084
  9. js金额价格四舍五入保留2位小数demo效果(整理)
  10. 修改office2007序列号