跳到主要内容

为可靠消息传递配置外部磁盘阵列

本节描述了如何配置客户提供的外部磁盘存储阵列,以与使用保证消息传递的独立Solace PubSub+设备或使用保证消息传递的高可用性(HA)冗余Solace PubSub+设备对一起使用。有关如何配置外部块设备以与Solace PubSub+软件事件代理一起使用的信息,请参考管理软件事件代理存储。

使用保证消息传递的独立或冗余对Solace PubSub+设备需要客户供应的外部磁盘存储阵列。设备还必须安装有物理ADB和物理HBA。

  • 阵列要求

  • 第1步:在外部阵列中注册设备HBA

  • 第2步:在LUN上配置文件系统

  • 第3步:配置消息池以使用外部磁盘

  • 第4步:验证保证消息池配置

  • 外部磁盘存储阵列本身的配置和供应超出了本文档的范围,因为它取决于为使用选择的磁盘制造商。因此,正确配置外部磁盘存储阵列是客户的责任,本节不进行描述。如果需要,请联系Solace以获得协助。

  • 如果您使用的是HA对冗余Solace PubSub+设备上的保证消息传递,必须首先成功完成HA配置中的设备的配置程序,然后执行本节中的程序。

阵列要求

设备HBA必须连接到外部磁盘存储阵列。每个HBA应该有光纤通道链接路径连接到两个磁盘阵列控制器。

HBA上的两个光纤通道端口允许通过配备LC型光连接器的标准多模光纤电缆,通过冗余光纤通道电缆链接到外部磁盘存储阵列。

当使用一对处于Active/Standby冗余的PubSub+设备时,ADB链接必须直接连接在一起。

要使用ADB及其相关HBA的外部磁盘存储阵列,外部磁盘存储阵列必须具备:

  • 至少四个磁盘的RAID 1+0。
  • 最多15太字节(TiB)的LUN。
  • 允许访问HBA端口。当使用HA冗余时,提供对冗余设备对上两个HBA端口的访问。
  • 光纤通道连接。

联系Solace以获取:

  • 获取Solace PubSub+设备的根访问权限
  • 有关将其他磁盘存储阵列模型或产品与ADB和HBA一起使用的信息

从Solace PubSub+设备版本8.2.0开始,声明只能由根执行的操作,现在也可以由系统管理员用户执行。有关配置系统管理员用户的信息,请参考配置多个Linux Shell用户。

第1步:在外部阵列中注册设备HBA

Solace PubSub+设备使用的HBA的WWN可以在设备交付时提供的装箱单上找到。它们也可以应请求由Solace提供。

您可以使用show hardware detail用户执行CLI命令来显示设备的HBA端口和节点名称。例如:

solace> show hardware detail

. . .

Slot 1/3: Host Bus Adapter Blade
Product #: HBA-0204FC-02-A
Serial #: M54687
Model Name: QLE2462
Model Description: PCI-Express to 4Gb FC, Dual Channel
Driver Version: 8.01.07-k1

Fibre-Channel 1
State: Link Up - F_Port (fabric via point-to-point)
Speed: 2 Gbit
Port Id: 0x031f00
Port Name: 0x210000e08b931f25
Port Type: NPort (fabric via point-to-point)
Node Name: 0x200000e08b931f25

第2步:在LUN上配置文件系统

要配置文件系统,建议运行Solace提供的脚本provision-lun-for-ad,以自动配置和供应独立设备上的LUN。如果您使用的是HA冗余设备对,只需在其中一个设备上运行脚本——Config-Sync设施将把配置的文件系统应用到其配对设备上。(参考使用自动化脚本在LUN上配置文件系统。)

或者,如果脚本未能成功配置文件系统,您可以使用GDisk实用程序手动配置和供应LUN上的分区。(参考使用GDisk在LUN上配置文件系统。)

  • 配置文件系统的过程,无论是使用Solace提供的脚本还是通过GDisk实用程序,都只应用于没有现有、已配置分区的LUN。
  • 运行软件版本7.1或更高版本的Solace PubSub+设备支持ext3和ext4文件系统。然而,任何新创建的分区都应该使用ext4文件系统。

使用自动化脚本在LUN上配置文件系统

  1. 在设备上输入show hardware detail用户执行CLI命令,以确认新的外部磁盘LUN根据新的WWN可用。

示例:

solace> show hardware detail

. . .

Slot 1/2: Host Bus Adapter Blade
Product #: HBA-0204FC-01-A
Serial #: H64544
Model Name: QLA2462
Model Description: PCI-X 2.0 to 4Gb FC, Dual Channel
Driver Version: 8.01.07-k1

. . .

Attached devices
LUN 0
State: Ready
Size: 80G
WWN: 60:06:01:60:e8:60:1c:00:c6:3e:7b:a8:ad:53:e3:11
LUN 1
State: Ready
Size: 800G
WWN: 60:06:01:60:e8:60:1c:00:2c:42:35:c1:ad:53:e3:11
  1. 如果现有的LUN配置有所更改,或添加了新的LUN,可以通过执行以下脚本来在PubSub+设备上注册:

    • rescan-scsi-bus.sh --nosynch -f -r -m脚本
    • rescan-scsi-bus.sh -a脚本
    • 如果前两个脚本失败,则执行rescan-scsi-bus.sh -i-i选项会导致所有外部磁盘的链接断开,如果PubSub+缓存在此节点上运行,将会影响PubSub+缓存)

如果新的LUN没有出现:

  • 您可以确认SAN配置正确
  • 您可以确认HBA端口已为新的LUN注册
  • 重新发行rescan-scsi-bus.sh --nosync -arescan-scsi-bus.sh --nosync -f -r -mrescan-scsi-bus.sh -a脚本。
  • 如果新的LUN仍然没有出现,则需要重新加载。

重新启动Solace PubSub+设备将导致服务中断。

  1. 运行Solace提供的脚本。 如果您没有root权限,使用"support"用户账户,您可以使用Linux shell中的"sudo"来配置和供应Solace提供的provision-lun-for-ad脚本的LUN。

示例:

[support@solace ~]# sudo provision-lun-for-ad --lun=3600140590e5103e56f3436d97032e61e
Script : /usr/sw/loads/soltr_7.1.0.1523/supported/provision-lun-for-ad
User : root@solace Jan 20 15 15:21:06
Logfile : /usr/sw/jail/diags/support.provision-lun-for-ad.2015-01-20,15.21.06

List of visible LUNs:
36001405f6bd73860d76412eab3a4a006
3600140590e5103e56f3436d97032e61e

mke4fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
10491008 inodes, 1953234688 blocks
97661734 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
59608 block groups
32768 blocks per group, 32768 fragments per group
176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune4fs -c or -i to override.
mke4fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
10491008 inodes, 1953234683 blocks
97661734 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
59608 block groups
32768 blocks per group, 32768 fragments per group
176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or 180 days, whichever comes first. Use tune4fs -c or -i to override.
LUN 3600140590e5103e56f3436d97032e61e has been provisioned for Assured Delivery.

--lun标志接受您正在供应的LUN的WWN。

  1. 如果您使用的是Solace PubSub+设备的冗余对,重新启动未执行第3步的设备。

使用GDisk在LUN上配置文件系统

要使用GDisk实用程序配置和供应LUN,需要对Solace PubSub+设备具有root访问权限。

要手动配置和供应LUN上的文件系统,请在独立设备或HA冗余对中的一个设备上执行以下步骤:

  1. 计算2048扇区分区边界。

要计算两个分区的扇区边界,首先确定磁盘上的扇区数。使用gdisk命令在LUN的/dev/mapper条目上确定扇区数。使用"p"命令打印详细信息。

在以下示例中,3600140590e5103e56f3436d97032e61e是指LUN的WWN。

示例:

[root@solace mapper]# gdisk /dev/mapper/3600140590e5103e56f3436d97032e61e
GPT fdisk (gdisk) version 0.8.9

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk 3600140590e5103e56f3436d97032e61e: 31251759104 sectors, 14.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): D96B0E77-9E54-41D2-88F3-7A8C89A7DDB6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31251759070
Partitions will be aligned on 2048-sector boundaries
Total free space is 31251759037 sectors (14.6 TiB)

. . .

一旦您确定了磁盘上的扇区数(上述示例中的LUN有31251759037个扇区),然后可以确定每个分区的大小为2048扇区的倍数:

总扇区数减去204831251759037 – 2048 = 31251756989
除以231251756989 / 2 = 15625878494.5
向下取整到最近的整数15625878494
除以204815625878494 / 2048 = 7629823.4833
向下取整到最近的整数7629823
乘以20487629823 * 2048 = 15625877504

当您知道了每个分区的大小(以扇区为单位,15625877504),并且知道第一个分区的第一个扇区始终是2048,然后可以确定每个分区的起始和结束扇区:

第一个分区起始扇区:2048
第一个分区结束扇区:分区大小 + 2047 = 15625879551
第二个分区起始扇区:15625879551 + 1 = 15625879552
第二个分区结束扇区:15625879551 + 15625877504 = 31251757055

使用上述数字,然后可以使用GDisk实用程序创建分区。

  1. 在活动且准备好的磁盘阵列上,运行GDisk实用程序以在设备上创建两个与2048扇区分区边界对齐的分区。

    • 对于独立设备,创建的第二个分区可以更小(小至100MB)。
    • 对于冗余对设备,需要两个等大小的分区。分区可以高达7.5 TiB(总计15 TiB)。然而,所需的分区大小取决于使用max-spool-usage消息池VPN CONFIG命令配置的最大磁盘空间。当使用冗余对设备时,每个分区应该是最大池使用量的1.1倍。
    1. 在提示符下输入以下内容:
gdisk /dev/mapper/<device>

示例:

[root@solace ~]# gdisk /dev/mapper/3600140590e5103e56f3436d97032e61e
  1. 要创建新的分区表,请输入"n"命令,然后输入"1"作为第一个分区。

  2. 要将分区表与2048扇区边界对齐,请执行以下操作:

    • 对于第一个分区,在"First sector..."提示符下输入"2048",然后在"Last sector..."提示符下输入您在步骤1中计算的第一个扇区结束值。
    • 对于第二个分区,在该分区的"First sector..."提示符下输入您在步骤1中计算的起始扇区值,然后在"Last sector..."提示符下输入您在步骤1中计算的第二个扇区结束值。
  3. 输入"w"命令以保存生成的分区表。

以下示例为冗余对设备创建了两个等大小的分区:

[root@solace mapper]# gdisk /dev/mapper/3600140590e5103e56f3436d97032e61e
GPT fdisk (gdisk) version 0.8.9

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk 3600140590e5103e56f3436d97032e61e: 31251759104 sectors, 14.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): D96B0E77-9E54-41D2-88F3-7A8C89A7DDB6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31251759070
Partitions will be aligned on 2048-sector boundaries
Total free space is 4028 sectors (2.0 MiB)

Number Start (sector) End (sector) Size Code Name

Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-31251759070, default = 2048) or {+-}size{KMGTP}: 2048
Last sector (2048-31251759070, default = 31251759070) or {+-}size{KMGTP}: 15625879551
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8300
Changed type of partition to 'Linux filesystem'

Command (? for help): n
Partition number (2-128, default 2): 2
First sector (34-31251759070, default = 15625879552) or {+-}size{KMGTP}: 15625879552
Last sector (15625879552-31251759070, default = 31251759070) or {+-}size{KMGTP}: 31251757055
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8300
Changed type of partition to 'Linux filesystem'

Command (? for help): p
Disk 3600140590e5103e56f3436d97032e61e: 31251759104 sectors, 14.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): D96B0E77-9E54-41D2-88F3-7A8C89A7DDB6
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31251759070
Partitions will be aligned on 2048-sector boundaries
Total free space is 4028 sectors (2.0 MiB)

Number Start (sector) End (sector) Size Code Name
1 2048 15625879551 7.3 TiB 8300 Linux filesystem
2 15625879552 31251757055 7.3 TiB 8300 Linux filesystem

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to 3600140590e5103e56f3436d97032e61e.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
  1. 创建分区后,将它们添加到设备映射中。为此,确定外部磁盘的设备映射:
[root@solace ~]# ls -l /dev/mapper
total 0
brw 1 root root 252, 0 Jan 20 14:07 3600140590e5103e56f3436d97032e61e
crw-rw 1 root root 10, 236 Jan 20 06:05 control
  1. 重新读取分区表,并为新创建的分区创建设备映射:
[[root@solace ~]# kpartx -a -p p /dev/mapper/3600140590e5103e56f3436d97032e61e

两个分区在/dev/mapper中被列为p1p2

[[root@solace ~]# ls -l /dev/mapper/
total 0
brw------- 1 root root 252, 0 Jan 20 14:07 3600140590e5103e56f3436d97032e61e
brw------- 1 root root 252, 1 Jan 20 11:05 3600140590e5103e56f3436d97032e61ep1
brw------- 1 root root 252, 2 Jan 20 11:05 3600140590e5103e56f3436d97032e61ep2
crw-rw---- 1 root root 10, 236 Jan 20 06:05 control
  1. 使用mkfs.ext4命令在每个分区上创建ext4文件系统,每个分区都在/dev/mapper列表中:

如果磁盘大于200 GB,则应使用-N 10000000选项限制inode数量并加快格式化速度。

[[root@solace ~]# mkfs.ext4 -N 10000000 /dev/mapper/3600140590e5103e56f3436d97032e61ep1
mke4fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
10491008 inodes, 1953234688 blocks
97661734 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
59608 block groups
32768 blocks per group, 32768 fragments per group
176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune4fs -c or -i to override.
[root@solace ~]# mkfs.ext4 -N 10000000 /dev/mapper/3600140590e5103e56f3436d97032e61ep2
mke4fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
10491008 inodes, 1953234688 blocks
97661734 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
59608 block groups
32768 blocks per group, 32768 fragments per group
176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or 180 days, whichever comes first. Use tune4fs -c or -i to override.
  1. 如果您使用的是冗余对设备,重新启动未执行上述步骤的设备。

第3步:配置消息池以使用外部磁盘

Config-Sync不会自动同步此对象或属性。因此,如果事件代理在高可用性(HA)冗余配置中使用,或在复制站点中使用,您必须手动在每个配对事件代理或复制消息VPN上配置此对象/属性。

要确定对象/属性是否由Config-Sync同步,请在CLI命令参考中查找用于配置对象/属性的命令,或在Solace CLI中输入命令,以"?"结尾。帮助列表将显示对象/属性是否已同步。

要为独立设备或冗余对中的主要设备启用使用外部磁盘存储阵列的保证消息池,请执行以下步骤:

  1. 输入用户执行CLI命令以显示哪些外部磁盘可用:
solace1> show hardware detail

. . .

Slot 1/2: Host Bus Adapter Blade
Product #: HBA-0204FC-01-A
Serial #: H64544
Model Name: QLA2462
Model Description: PCI-X 2.0 to 4Gb FC, Dual Channel
Driver Version: 8.01.07-k1

. . .

Attached devices
LUN 0
State: Ready
Size: 80 GB
WWN: 60:06:01:60:e8:60:1c:00:ec:7b:6d:3f:5c:db:de:11
  1. 根据其WWN配置保证消息池以使用外部磁盘:
solace1(configure/hardware/message-spool)# disk-array wwn <wwn #>

其中:

<wwn #>show hardware detail命令输出中显示的WWN。

  1. 在主要设备上启用保证消息池:
solace1(configure/hardware/message-spool)# no shutdown primary

要为冗余对中的备份设备启用使用外部磁盘存储阵列的保证消息池,请执行以下步骤:

有关配置冗余设备的更多信息,请参考HA配置中的设备。

  1. 输入以下CLI命令以显示哪些外部磁盘可用:
solace2> show hardware detail

. . .

Slot 1/2: Host Bus Adapter Blade
Product #: HBA-0204FC-01-A
Serial #: H64544
Model Name: QLA2462
Model Description: PCI-X 2.0 to 4Gb FC, Dual Channel
Driver Version: 8.01.07-k1

. . .

Attached devices
LUN 0
State: Ready
Size: 80 GB
WWN: 60:06:01:60:e8:60:1c:00:ec:7b:6d:3f:5c:db:de:11
  1. 根据其WWN配置保证消息池以使用外部磁盘:
solace2(configure)# hardware message-spool
solace2(configure/hardware/message-spool)# disk-array wwn <wwn #>

其中:

<wwn #>show hardware detail命令输出中显示的WWN。

  1. 在备份设备上启用保证消息池:
solace2(configure/hardware/message-spool)# no shutdown backup

第4步:验证保证消息池配置

对于独立设备,请执行以下步骤:

  1. 输入show message-spool用户执行CLI命令以验证消息池是否正确配置。设备应显示配置状态为"Enabled (Primary)",操作状态为"AD-Active",数据路径状态为"Up"。

示例:

solace1> show message-spool

Config Status: Enabled (Primary)

Maximum Spool Usage: 60000 MB
Spool While Charging: No
Spool Without Flash Card: No
Using Internal Disk: No
Disk Array WWN: 60:06:01:60:e8:60:1c:00:ec:7b:6d:3f:5c:db:de:11

Operational Status: AD-Active
Datapath Status: Up

. . .

ADB Disk Total
Current Persistent Store Usage (MB) 0.0000 0.0000 0.0000
Number of Messages Currently Spooled 0 0 0
  1. 如果任一输出未显示正确的状态,请输入show message-spool detail用户执行CLI命令以查看系统详细信息,以帮助故障排除。

对于一对冗余设备,请执行以下步骤:

  1. 在主设备上输入show message-spool用户执行CLI命令以验证其消息池是否正确配置。它应显示配置状态为"Enabled (Primary)",操作状态为"AD‑Active",数据路径状态为"Up"。

示例:

solace1> show message-spool

Config Status: Enabled (Primary)

Maximum Spool Usage: 60000 MB
Spool While Charging: No
Spool Without Flash Card: No
Using Internal Disk: No
Disk Array WWN: 60:06:01:60:e8:60:1c:00:ec:7b:6d:3f:5c:db:de:11

Operational Status: AD-Active
Datapath Status: Up

. . .

ADB Disk Total
Current Persistent Store Usage (MB) 0.0000 0.0000 0.0000
Number of Messages Currently Spooled 0 0 0
  1. 在备份设备上输入show message-spool用户执行CLI命令以验证其消息池是否正确配置。它应显示配置状态为"Enabled (Backup)",操作状态为"AD‑Standby",数据路径状态为"Down"。

示例:

solace2> show message-spool

Config Status: Enabled (Backup)

Maximum Spool Usage: 60000 MB
Spool While Charging: No
Spool Without Flash Card: No
Using Internal Disk: No
Disk Array WWN: 60:06:01:60:e8:60:1c:00:ec:7b:6d:3f:5c:db:de:11

Operational Status: AD-Standby
Datapath Status: Down

. . .

ADB Disk Total
Current Persistent Store Usage (MB) 0.0000 0.0000 0.0000
Number of Messages Currently Spooled 0 0 0
  1. 如果主设备或备份设备未显示正确的状态,请输入show message-spool detail用户执行CLI命令以查看系统详细信息,以帮助故障排除。
  2. 一旦主设备和备份设备上的消息池显示正确的状态,输入release-activity冗余CONFIG CLI命令在主设备上放弃活动,并验证备份设备可以接管活动。
  3. 一旦确认备份设备已接管活动,输入no release-activity冗余CONFIG CLI命令在主设备上再次启用活动。
  4. 如果禁用了自动恢复,输入revert-activity冗余ADMIN CLI命令在备份设备上将活动恢复到主设备。