@@ -110,7 +110,7 @@ slurmdbd 是其他守护进程访问数据库的代理,可以避免在配置
110110
111111slurmdbd 需要单独安装,并提供 [ ` /etc/slurm/slurmdbd.conf ` ] [ slurmdbd.conf.5 ] 配置文件,指定数据库的连接信息和认证方式。此文件只需要保留在运行 slurmdbd 的结点上,不需要复制到其他结点,并且文件权限必须为 ` 600 ` 。
112112
113- ```
113+ ``` shell
114114touch /etc/slurm/slurmdbd.conf # 填入相关配置
115115apt-get install -y slurmdbd
116116systemctl enable --now slurmdbd
@@ -122,7 +122,7 @@ systemctl enable --now slurmdbd
122122
123123在管理结点上安装并启用 Slurm 控制守护进程:
124124
125- ```
125+ ``` shell
126126touch /etc/slurm/slurm.conf # 填入相关配置
127127apt-get install -y slurmctld slurm-client
128128systemctl enable --now slurmctld
@@ -132,7 +132,7 @@ systemctl enable --now slurmctld
132132
133133### 计算结点:slurmd
134134
135- ```
135+ ``` shell
136136apt-get install -y slurmd
137137systemctl enable --now slurmd
138138```
@@ -141,7 +141,7 @@ systemctl enable --now slurmd
141141
142142如果需要使用 Slurm 管理硬件,则需要保证 ` gres.conf ` 中提及的设备文件在 slurmd 启动前已经存在,否则 slurmd 会因为找不到设备而无法启动。一个缓解办法是,让 ` slurmd.service ` 依赖 ` systemd-modules-load.service ` ,即执行 ` systemctl edit slurmd ` ,增加:
143143
144- ```
144+ ``` ini
145145[Unit]
146146After =systemd-modules-load.service
147147```
@@ -169,7 +169,7 @@ Slurm 的权限管理依赖于其账户数据库,因此需要 slurmdbd 的支
169169
170170 下面是作者在管理的某个 Slurm 课程集群上运行 `sacctmgr show qos` 的输出,展示了三个 QoS 分组的配置情况:
171171
172- ```
172+ ```text
173173 Name Priority GraceTime Preempt PreemptExemptTime PreemptMode Flags UsageThres UsageFactor GrpTRES GrpTRESMins GrpTRESRunMin GrpJobs GrpSubmit GrpWall MaxTRES MaxTRESPerNode MaxTRESMins MaxWall MaxTRESPU MaxJobsPU MaxSubmitPU MaxTRESPA MaxJobsPA MaxSubmitPA MinTRES
174174 ---------- ---------- ---------- ---------- ------------------- ----------- ---------------------------------------- ---------- ----------- ------------- ------------- ------------- ------- --------- ----------- ------------- -------------- ------------- ----------- ------------- --------- ----------- ------------- --------- ----------- -------------
175175 normal 5 00:00:00 cluster DenyOnLimit 1.000000 cpu=112 00:02:00 5
@@ -183,7 +183,7 @@ Slurm 的权限管理依赖于其账户数据库,因此需要 slurmdbd 的支
183183
184184 此集群 `slurm.conf` 中的优先级相关配置是:
185185
186- ```
186+ ```ini
187187 PriorityType=priority/multifactor
188188 #PriorityDecayHalfLife=14-0
189189 #PriorityUsageResetPeriod=14-0
@@ -209,7 +209,7 @@ Slurm 的权限管理依赖于其账户数据库,因此需要 slurmdbd 的支
209209* ` /etc/ssh/sshd_config ` :确认 ` UsePAM ` 已启用。
210210* ` /etc/pamd/sshd ` :在 account 部分添加:
211211
212- ```
212+ ``` text
213213 -account required pam_slurm_adopt.so
214214 ```
215215
@@ -224,7 +224,7 @@ Slurm 的权限管理依赖于其账户数据库,因此需要 slurmdbd 的支
224224
225225 在作者管理的集群上,sshd 的 PAM 配置如下:
226226
227- ```
227+ ```text
228228 # PAM configuration for the Secure Shell service
229229
230230 # Standard Un*x authentication.
@@ -280,7 +280,7 @@ TemporaryFileSystem=/etc/slurm
280280
281281如果有未安装任何守护进程的纯客户端结点,需要安装 [ ` sackd ` ] [ sackd.8 ] ,负责请求控制器、拉取缓存的配置:
282282
283- ```
283+ ``` shell
284284apt-get install -y sackd
285285echo ' SACKD_OPTIONS="--conf-server your_ctl_server:6817"' >> /etc/default/sackd
286286systemctl enable --now sackd
0 commit comments