1.安装ceph环境(略)
2.安装iscsi 启动器及目标器(略)
修改iscsi启动器地址为ceph集群块设备target,然后扫描并登陆启动器,挂载块设备
这里最好使用多路径(安装multipath服务),然后将块设备路径挂载在客户端(即sqlserver安装节点上、/mnt/sqlserver)
1)查看多路径,
[root@client-152 ~]# multipath -ll
36001405f091d90da55e450e8dd2d4a54 dm-0 ORCADT ,OrcaBlockDevice
size=1.0T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='queue-length 0' prio=130 status=active
| `- 36:0:0:0 sdb 8:16 active ready running
|-+- policy='queue-length 0' prio=10 status=enabled
| `- 37:0:0:0 sdd 8:48 active ready running
`-+- policy='queue-length 0' prio=10 status=enabled
`- 35:0:0:0 sdc 8:32 active ready running
2)查看块设备映射磁盘
[root@client-152 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 500M 0 part /boot
├─sda3 8:3 0 7.8G 0 part [SWAP]
└─sda4 8:4 0 923G 0 part /
sdb 8:16 0 1T 0 disk
└─36001405f091d90da55e450e8dd2d4a54 253:0 0 1T 0 mpath
sdc 8:32 0 1T 0 disk
└─36001405f091d90da55e450e8dd2d4a54 253:0 0 1T 0 mpath
sdd 8:48 0 1T 0 disk
└─36001405f091d90da55e450e8dd2d4a54 253:0 0 1T 0 mpath
3)创建挂载目录,格式化映射磁盘(此过程时间较长,至于格式化什么样文件系统 ,根据自己喜好)
[root@client-152 ~]# mkdir /mnt/sqlserver
[root@client-152 ~]# chmod 777 /mnt/sqlserver
[root@client-152 ~]# mkfs.xfs /dev/mapper/36001405f091d90da55e450e8dd2d4a54
meta-data=/dev/mapper/36001405f091d90da55e450e8dd2d4a54 isize=512 agcount=4, agsize=67108864 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=268435456, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=131072, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@client-152 ~]# mount /dev/mapper/36001405f091d90da55e450e8dd2d4a54 /mnt/sqlserver/ -o rw
[root@client-152 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda4 967378428 61627068 905751360 7% /
devtmpfs 8066888 0 8066888 0% /dev
tmpfs 8078752 0 8078752 0% /sys/fs/cgroup
/dev/sda2 487634 134096 323842 30% /boot
/dev/sda1 204580 9956 194624 5% /boot/efi
tmpfs 1615752 0 1615752 0% /run/user/0
/dev/mapper/36001405f091d90da55e450e8dd2d4a54 1073217536 32944 1073184592 1% /mnt/sqlserver
3.安装sql server服务
http://www.linuxidc.com/Linux/2017-12/149609.htm
系统需求:
Cen