码迷,mamicode.com
首页 > 系统相关 > 详细

linux起源

时间:2019-07-20 00:09:07      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:hit   imm   OLE   -name   cti   lis   文件配置   egrep   pad   

linux起源

存储安装配置

1. 存储侧安装配置

1. show iscsi-parameters (查看iscsi口配置参数)

2. 给iscsi口设置ip地址
set iscsi-parameters -port 0000 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA0Port0 -ip 192.168.152.201 -netmask 255.255.255.0 -gateway 192.168.152.254
set iscsi-parameters -port 0001 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA0Port1 -ip 192.168.152.202 -netmask 255.255.255.0 -gateway 192.168.152.254
set iscsi-parameters -port 0010 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA1Port0 -ip 192.168.152.203 -netmask 255.255.255.0 -gateway 192.168.152.254
set iscsi-parameters -port 0011 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA1Port1 -ip 192.168.152.204 -netmask 255.255.255.0 -gateway 192.168.152.254
set iscsi-parameters -port 0100 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM1CA0Port0 -ip 192.168.152.205 -netmask 255.255.255.0 -gateway 192.168.152.254
set iscsi-parameters -port 0101 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM1CA0Port1 -ip 192.168.152.206 -netmask 255.255.255.0 -gateway 192.168.152.254
set iscsi-parameters -port 0110 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM1CA1Port0 -ip 192.168.152.207 -netmask 255.255.255.0 -gateway 192.168.152.254
set iscsi-parameters -port 0111 -iscsi-name iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM1CA1Port1 -ip 192.168.152.208 -netmask 255.255.255.0 -gateway 192.168.152.254

show  iscsi-parameters

3. 创建端口组
create port-group -name PortGroup#01 -port  0000,0101,0010,0111
create port-group -name PortGroup#02 -port  0001,0100,0011,0110

4. 设置热备盘(目前是每个柜子的最后一块盘为热备盘)
set global-spare -disks 0023,0423,0823,0C23

5. 设置TPP池,第一个池为DX_TPP001,第二个池子为DX_TPP002

创建第一个TPP池,池名称为DX_TPP001
create thin-pro-pool -name DX_TPP001 -attribute online -level 5 -warning 90 -attention 75 -rg-mode manual -disks 0000,0400,0800,0C00

扩容DX_TPP001池
expand thin-pro-pool -pool-name DX_TPP001 -rg-mode manual -disks 0002,0402,0802,0C02
expand thin-pro-pool -pool-name DX_TPP001 -rg-mode manual -disks 0003,0403,0803,0C03
expand thin-pro-pool -pool-name DX_TPP001 -rg-mode manual -disks 0004,0404,0804,0C04
expand thin-pro-pool -pool-name DX_TPP001 -rg-mode manual -disks 0005,0405,0805,0C05
expand thin-pro-pool -pool-name DX_TPP001 -rg-mode manual -disks 0006,0406,0806,0C06
expand thin-pro-pool -pool-name DX_TPP001 -rg-mode manual -disks 0007,0407,0807,0C07


创建第二个TPP池,池名称为DX_TPP002
create thin-pro-pool -name DX_TPP002 -attribute online -level 5 -warning 90 -attention 75 -rg-mode manual -disks 0001,0401,0801,0C01

扩容DX_TPP002池
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0008,0408,0808,0C08
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0009,0409,0809,0C09
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0010,0410,0810,0C10
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0011,0411,0811,0C11	
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0012,0412,0812,0C12
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0013,0413,0813,0C13
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0014,0414,0814,0C14
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0015,0415,0815,0C15
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0016,0416,0816,0C16
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0017,0417,0817,0C17
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0018,0418,0818,0C18
expand thin-pro-pool -pool-name DX_TPP002 -rg-mode manual -disks 0019,0419,0819,0C19

CLI> show thin-pro-pools
Thin Pro             Disk         RAID     Status             Total       Provisioned         Used        Used      Warn-  Atten-  Chunk
No. Name             Attribute    Level                       Capacity    Capacity    Rate(%) Capacity    Status    ing(%) tion(%) Size(MB)
--- ---------------- ------------ -------- ------------------ ----------- ----------- ------- ----------- --------- ------ ------- --------
  0 DX_TPP001        Online       RAID5    Available          22.41 TB    0.00 MB           0 0.00 MB     Normal        90      75       21
  1 DX_TPP002        Online       RAID5    Available          41.63 TB    0.00 MB           0 0.00 MB     Normal        90      75       21


6. 硬盘列表及分配情况如下

CE#0                                                                                
RG00 slot00         3.2T    0000,0400,0800,0C00 #TPP01             RG13 slot13        3.2T    0013,0413,0813,0C13  #TPP02
RG01 slot01         3.2T    0001,0401,0801,0C01 #TPP02             RG14 slot14        3.2T    0014,0414,0814,0C14  #TPP02
RG02 slot02         3.2T    0002,0402,0802,0C02 #TPP01             RG15 slot15        3.2T    0015,0415,0815,0C15  #TPP02
RG03 slot03         3.2T    0003,0403,0803,0C03 #TPP01             RG16 slot16        3.2T    0016,0416,0816,0C16  #TPP02
RG04 slot04         3.2T    0004,0404,0804,0C04 #TPP01             RG17 slot17        3.2T    0017,0417,0817,0C17  #TPP02
RG05 slot05         3.2T    0005,0405,0805,0C05	#TPP01             RG18 slot18        3.2T    0018,0418,0818,0C18  #TPP02
RG06 slot06         3.2T    0006,0406,0806,0C06 #TPP01             RG19 slot19        3.2T    0019,0419,0819,0C19  #TPP02
RG07 slot07         3.2T    0007,0407,0807,0C07 #TPP01             RG20 slot20        3.2T    0020,0420,0820,0C20  #unused
RG08 slot08         3.2T    0008,0408,0808,0C08 #TPP02             RG21 slot21        3.2T    0021,0421,0821,0C21  #unused
RG09 slot09         3.2T    0009,0409,0809,0C09	#TPP02             RG22 slot22        3.2T    0022,0422,0822,0C22  #unused
RG10 slot10         3.2T    0010,0410,0810,0C10	#TPP02	           global-spare slot23        0023,0423,0823,0C23
RG11 slot11         3.2T    0011,0411,0811,0C11	#TPP02                                                                                                      
RG12 slot12         3.2T    0012,0412,0812,0C12 #TPP02


7. 创建存储用户
create user -name huawei -role Software -function enable
huawei@123

2. cinder节点侧配置

1. 客户dokcer安装1.5.0版本driver接入,docker覆盖安装(红帽的人安装,红帽的下载docker镜像文件然后驱动运行)

2. 编辑xml文件(BACKEND1为客户自己命名的文件)
vim /etc/cinder/BACKEND1.xml 
<?xml version=‘1.0‘ encoding=‘UTF-8‘?>
<FUJITSU>
<EternusIP>10.230.2.239</EternusIP> 
<EternusPort>5988</EternusPort>命名 
<EternusISCSIIP>192.168.251.203</EternusISCSIIP>
<EternusISCSIIP>192.168.251.204</EternusISCSIIP>
<EternusISCSIIP>192.168.251.205</EternusISCSIIP>
<EternusISCSIIP>192.168.251.206</EternusISCSIIP>
<EternusISCSIIP>192.168.251.207</EternusISCSIIP>
<EternusISCSIIP>192.168.251.208</EternusISCSIIP>
<EternusPool>DX_TPP001</EternusPool>
<EternusPool>DX_TPP002</EternusPool>
</FUJITSU>

注意 10.230.2.239为存储的管理ip,5988为端口号,192.168.251.203为存储的iscsi口IP

3. /etc/cinder/cinder.conf后加入

enabled_backends=BACKEND1

[BACKEND1]
volume_driver = cinder.volume.drivers.fujitsu.eternus_dx.eternus_dx_iscsi.FJDXISCSIDriver
cinder_eternus_config_file = /etc/cinder/BACKEND1.xml
volume_backend_name = BACKEND1
passwordless = False


4. 重启服务
service openstack-cinder-volume restart

重启容器
重启完成以后看下版本号
cinder get-pools --detail

5. 多路径安装
rpm -qa device-mapper-multipath
yum install -y device-mapper-multipath device-mapper

6. 保存多路径配置文件

mpathconf --enable
ls -l /etc/multipath.conf
cp /etc/multipath.conf /etc/multipath.conf.bak
egrep -v "[#|^$]" /etc/multipath.conf.bak > /etc/multipath.conf

若/etc/上没多路径的配置文件则手动创建一个
cp /usr/share/doc/device-mapper-multipath-X.X.X/multipath.conf /etc/
mpathconf --enable

7. 在多路径文件上增加存储的信息
defaults {
       user_friendly_names yes
       queue_without_daemon no
#     find_multipaths yes
}
devices {
       device {
              vendor                    "FUJITSU"
              product                   "ETERNUS_DXH"
              prio                      alua
              path_grouping_policy      group_by_prio
              path_selector             "round-robin 0"
              failback                  immediate
              no_path_retry             0
              path_checker              "tur"
              dev_loss_tmo              2097151
              fast_io_fail_tmo          1
       }
}

8. 重启服务,重新载入服务
systemctl start multipathd.service
systemctl reload multipathd.service

9. 重启物理节点
shutdown -r now

10. 查看多路径输出

ls -l /dev/mapper
multipath -ll

11. 安装iscsi服务

yum -y install iscsi-initiator-utils

systemctl start iscsi && systemctl enable iscsi

echo "node.conn[0].startup = automatic" >>/etc/iscsi/iscsid.conf
确认:
 tail -2  /etc/iscsi/iscsid.conf
node.session.scan = auto
node.conn[0].startup = automatic

12. 
iscsiadm -m discovery -t sendtargets -p 192.168.251.201:3260
iscsiadm -m discovery -t sendtargets -p 192.168.251.203:3260
iscsiadm -m discovery -t sendtargets -p 192.168.251.206:3260
iscsiadm -m discovery -t sendtargets -p 192.168.251.208:3260

13. 
iscsiadm -m node -T iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA0Port0 -p 192.168.251.201:3260 -l
iscsiadm -m node -T iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA0Port1 -p 192.168.251.202:3260 -l
iscsiadm -m node -T iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA1Port0 -p 192.168.251.203:3260 -l
iscsiadm -m node -T iqn.2000-09.com.fujitsu:storage-system.eternus-dxh:002b2:CE0CM0CA1Port1 -p 192.168.251.204:3260 -l

3. 公钥的上传

ls -l 
确认当前目录是否有eternus.itef文件,如果没有执行以下命令
① ssh-keygen -t rsa -N "" -f  /root/.ssh/eternus (生成公钥私钥)
② ssh-keygen -e -f /root/.ssh/eternus.pub  >  ./eternus.itef (读取公钥文件并生成eternus.ietf(存储可识别))
③ 将上述itef文件上传到存储对应的用户
④ 将上述文件配置到cinder.conf相应的后端配置中 (RHOSP13中需要将密钥文件映射到docker中)

linux起源

标签:hit   imm   OLE   -name   cti   lis   文件配置   egrep   pad   

原文地址:https://www.cnblogs.com/chacha51/p/11216200.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!