本节介绍了如何本地安装MindIO,使用ascend-deployer工具安装MindIO的方式请参见《ascend-deployer用户指南》。
unzip Ascend-mindxdl-mindio_{version}_linux-{arch}.zip
目录 |
目录内文件 |
说明 |
---|---|---|
install |
hand_out_deploy.py |
安装工具脚本。 |
host_ip_list |
IP地址配置文件。 |
|
memfs.conf |
MindIO配置文件。 |
|
scp_file.sh |
scp命令执行文件。 |
|
ssh_cmd.sh |
ssh命令执行文件。 |
|
Ascend-mindxdl-mindio_{version}_linux-{arch}.tar |
- |
Ascend-mindxdl-mindio软件安装包。 |
cd ./install
vim host_ip_list
192.168.0.1 192.168.0.2
vim memfs.conf
# configure file for memory filesystem # [memfs] 此标签不能删除!安装部署读取依赖此标签 [memfs] memfs.mount_path = /mnt/memfs memfs.data_block_pool_capacity_in_gb = 128 memfs.data_block_size_in_mb = 128 memfs.max_open_files = 4096 memfs.fuse_path = /usr/lib64/libfuse.so.2.9.2 memfs.write.parallel.enabled = false memfs.write.parallel.thread_num = 32 memfs.write.parallel.slice_in_mb = 16 # under fs underfs.count = 1 underfs.default = 1 underfs.1.type = pacific underfs.1.name = pacific01 underfs.1.mount_path = /mnt/dpc01 underfs.1.docker_map_path = # background background.backup.enabled = true background.backup.thread_num = 32 background.backup.ufs_name = pacific01 background.backup.failed_retry_times = 10 background.backup.failed_retry_max_interval_sec = 10 background.backup.failed_max_cnt_for_unserviceable = 10 background.backup.failed_auto_evict_file = false # ipc ipc.max_message_size_in_kb = 16 ipc.permit_super_user_access = false ipc.author.enabled = true ipc.author.encrypted = true ipc.author.file_path = /opt/mindio/conf/whitelist ipc.kmc.ksf.master = /opt/mindio/tools/pmt/master/ksfa ipc.kmc.ksf.standby = /opt/mindio/tools/pmt/standby/ksfb
参数 |
说明 |
取值范围 |
缺省值 |
---|---|---|---|
memfs.mount_path |
MindIO文件系统挂载路径,用户可以自定义挂载路径,方便用户查看MindIO内存缓存系统内文件。需确保此参数所指向的目录为空,MindIO安装时会重新创建该目录。 |
- |
/mnt/memfs |
memfs.data_block_pool_capacity_in_gb |
MindIO文件系统内存分配大小,单位:GB,根据服务器内存大小来配置,建议不超过系统总内存的25%。 |
1~1024 |
128 |
memfs.data_block_size_in_mb |
文件数据块分配最小粒度,单位:MB,根据使用场景中大多数文件的size决定配置,建议平均每个文件的数据块大小不超过128MB。 |
1~1024 |
128 |
memfs.max_open_files |
最大打开文件数。 |
1024~65536 |
4096 |
memfs.fuse_path |
本节点上FUSE动态链接库的地址,在安装时自动填入,非必填。 |
- |
- |
memfs.write.parallel.enabled |
MindIO并发写性能优化开关配置,用户需结合业务数据模型特征决定是否打开本配置。 |
|
false |
memfs.write.parallel.thread_num |
MindIO并发写性能优化并发数。 |
2~96 |
32 |
memfs.write.parallel.slice_in_mb |
MindIO并发写性能优化数据切分粒度,单位:MB。 |
1~1024 |
16 |
underfs.count |
对接后端存储实例数量,每个存储实例对应一个挂载好的本地目录。 |
1~32 |
1 |
underfs.default |
后端存储默认使用ID。 |
1~underfs.count |
1 |
underfs.<ID>.type |
指定第<ID>个后端存储的类型,目前只支持pacific。<ID>的取值范围:1~underfs.default。 |
- |
pacific |
underfs.<ID>.name |
第<ID>个后端存储的名称,每个后端存储名称要唯一。<ID>的取值范围:1~underfs.default。 |
- |
pacific01 |
underfs.<ID>.mount_path |
第<ID>个后端存储的挂载目录,需要用户完成Pacific后端存储对接并完成挂载。<ID>的取值范围:1~underfs.default。 |
- |
/mnt/dpc<ID> |
underfs.<ID>.docker_map_path |
第<ID>个后端存储的挂载目录在Docker内的映射目录,<ID>的取值范围:1~underfs.default。 后端存储在主机侧,用户在Docker中运行业务,且后端存储的挂载目录在Docker内的映射目录二者不相同时,用户需要设置本配置项。 |
- |
- |
background.backup.enabled |
是否开启备份。 |
|
true |
background.backup.thread_num |
备份线程数量。 |
1~256 |
32 |
background.backup.ufs_name |
备份指定后端存储名称。 |
- |
pacific01 |
background.backup.failed_retry_times |
失败重试次数。 |
10~60 |
10 |
background.backup.failed_retry_max_interval_sec |
失败重试间隔,单位:秒。 |
10~60 |
10 |
background.backup.failed_max_cnt_for_unserviceable |
备份失败次数达到该值后,触发停MindIO服务。 |
10~60 |
10 |
background.backup.failed_auto_evict_file |
备份文件到underfs失败后,是否要自动取消后台备份任务。 |
|
false |
ipc.max_message_size_in_kb |
最大消息长度,单位:KB。 |
4~1024 |
16 |
ipc.permit_super_user_access |
是否允许root用户通过MindIO SDK访问MindIO文件系统内的文件。
须知:
默认禁止root用户访问,若客户需要开启root访问权限,可能存在安全风险,请谨慎使用。 |
|
false |
ipc.author.enabled |
是否开启白名单校验。
须知:
关闭白名单校验可能存在风险,请谨慎使用。 |
|
true |
ipc.author.encrypted |
是否开启白名单加密。
须知:
关闭白名单加密可能存在风险,请谨慎使用。 |
|
true |
ipc.author.file_path |
白名单保存地址。 |
- |
/opt/mindio/security/authorization/whitelist |
ipc.kmc.ksf.master |
白名单主加密文件地址。 |
- |
/opt/mindio/tools/pmt/master/ksfa |
ipc.kmc.ksf.standby |
白名单备加密文件地址。 |
- |
/opt/mindio/tools/pmt/standby/ksfb |
“ipc.author.file_path”、“ipc.kmc.ksf.master”和“ipc.kmc.ksf.standby”在配置文件中的默认地址,是在使用默认安装路径(见表3)时才有效。如果在安装时指定了安装路径,请对其进行同步修改。
只有用户组ID在白名单内的用户,才能向MindIO文件系统读写文件。
vim whitelist
为了保证安装过程中whitelist文件安全性,建议安装用户设置whitelist权限为600。
[ { "user": "0", "allow": true }, { "user": "1", "allow": false } ]
python3 hand_out_deploy.py install 软件包上传路径/Ascend-mindxdl-mindio_{version}_linux-{arch}.tar user group install_path
参数 |
说明 |
---|---|
hand_out_deploy.py |
install目录下的自动化安装脚本。 |
install |
执行安装动作。 |
软件包上传路径/Ascend-mindxdl-mindio_{version}_linux-{arch}.tar |
软件包所在的路径。 |
user |
指定MindIO安装后文件的归属用户和启动MindIO服务的用户,如果不指定,默认用户为hwMindX。 |
group |
指定MindIO安装后文件的归属用户组和启动MindIO服务的用户组,如果不指定,默认用户组为HwHiAiUser。 |
install_path |
指定MindIO安装文件路径,如果不指定,默认安装路径为“/opt”。 |
user、group、install_path三个参数需要同时设定或取消,不支持设置部分参数。
input login user:<MindIO-install-user> input login password:密码
(1/6)----------check the configuration file. (2/6)----------send files to all nodes. (3/6)----------decompress files in all nodes. (4/6)----------install in all nodes. (5/6)----------start fs in all nodes. (6/6)----------success.
安装成功后,软件部署在“/opt/mindio”目录下,目录树如下所示:
├── bin │ ├── ockiod │ ├── seceasy_encrypt ├── ccae │ └── mindio_export.sh ├── conf │ ├── host_ip_list │ └── memfs.conf ├── lib │ ├── libbdm.so │ ├── libhse_authorization.so │ ├── libhse_cryption.so │ └── libsecurec.so ├── logs │ ├── audit.log │ ├── ockiod_audit.log │ ├── ockiod.log │ └── ockiod_start.log ├── scripts │ ├── install.sh │ └── node_start.sh ├── security │ └── authorization │ └── whitelist ├── tools │ └── pmt │ ├── master │ │ └── ksfa │ └── standby │ └── ksfb └── uds
日志存放在“/opt/mindio/logs”目录下,具体日志路径可参见表4。
日志路径 |
说明 |
---|---|
/opt/mindio/logs/audit.log |
加密工具审计日志路径。 |
/opt/mindio/logs/ockiod_audit.log |
审计日志路径。 |
/opt/mindio/logs/ockiod.log |
运行日志路径。 |
/opt/mindio/logs/ockiod_start.log |
MindIO SDK安装和启动服务日志路径。 |
/var/log/app_hand_out_py.log |
安装部署日志路径。 |
软件包上传节点通过app_hand_out_py.log日志记录安装部署脚本执行情况,卸载时需要手动删除。建议用户每次执行卸载操作时手动删除该日志文件,降低内存消耗。
rm -f whitelist
如不删除,可能会存在whitelist文件内容泄漏的风险。
rm -f Ascend-mindxdl-mindio_{version}_linux-{arch}.zip rm -f Ascend-mindxdl-mindio_{version}_linux-{arch}.tar
rm -rf install
删除install工具后,将不能使用install工具提供的start_fs、stop_fs、uninstall命令来批量启动、停止、卸载MindIO服务。
由于安装用户拥有较高权限,出于安全目的,建议安装后取消安装用户SSH远程登录服务器的权限(请参见SSH加固),以提升系统安全性。