将磁盘挂载到 GCP Slurm 集群

问题描述

我按照本教程在 GCP 上创建了一个 slurm 集群:https://cloud.google.com/solutions/deploying-slurm-cluster-compute-engine
我还使用 mount(进入“登录”和“控制器”)将文件存储实例挂载到 slurm 集群中的虚拟机。我试图在集群中运行的作业读取位于已安装磁盘中的文件,但 SLURM 似乎无法读取这些文件。例如

> cat ja.sh

#!/bin/bash
#SBATCH -o tmp.out
#SBATCH -e tmp.error
#SBATCH -n 8
#SBATCH --mem=6G 
 

storage_file=/mnt/my_filestore_disk/file.bam

python3 my_script.py $storage_file

> sbatch ja.sh
> cat tmp.error
Error $storage_file does not exist 

存储文件挂载在 /mnt 目录中,我更改了文件夹和文件 sudo chmod 755 的权限。脚本 my_script.py,ja.sh 位于 /home 目录中。如果我从 /mnt 目录运行这些脚本,则根本没有输出。是否有任何关于为什么我收到此错误的见解?
我能够从 /home 目录甚至通过 python 读取这些文件而没有任何错误

$ python3
> import os
> os.path.exists("/mnt/my_filestore_disk/file.bam")
True
> import pysam
> s = pysam.Samfile("/mnt/my_filestore_disk/file.bam")

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)