Yale University

ITS organizational charts

Yale ITS Home Yale ITS Home

Automount

From Yale HPC Wiki

Jump to: navigation, search

Network Automounting

Network filesystems such a Lustre are automounted by clients (ie. compute nodes) on demand only. Automounting reduces network overhead, file server load and allows filesystem maintenance without shutdown of clients.

Automouting means the requested files are brought online only when a client (ie. your program) requests them. Therefore, files in your directory are not available (ie. not visible) until after automounting. If you execute a "df" or "mount" command from an interactive terminal, you will not see your directory until you explicitly access the files (eg. "ls" command).

Unfortunately automounting will cause the compute node to pause for several seconds. During this delay your program can timeout (ie. crash) if it cannot find your program files or data files.

To prevent your program from crashing with "file not found" type errors, you should check both your input & output directories exist before running your program. This can be accomplished by adding an "ls" command to your qsub scripts. eg)

#check my data directory is mounted before I run my program
ls $INPUTDIR > /dev/null

#force automount of output directory before I run my program
ls $OUTPUTDIR > /dev/null

A more complicated example would use Shell Programming to check the directory exists.

#check my data directory is mounted before I run my program
ls $INPUTDIR > /dev/null
if [ ! -d $INPUTDIR ]; then
  echo -e "Error directory $INPUTDIR not found \n"
  exit 1
fi

#force automount of output directory before I run my program
ls $OUTPUTDIR > /dev/null
if [ ! -d $OUTPUTDIR ]; then
  echo -e "Error directory $OUTPUTDIR not found \n"
  exit 1
fi

Note that we have to "ls" the directory to force automouting before we check if the directory exists.



Jump to top.