- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -

HOME filesystem

From HLRS Platforms
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

With the installation of the Cray Hermit system in 2011, a fileserver has been established. This specialized server provide some convenient features:

  • same HOME on all servers within the HLRS network
  • Snapshot function -- provide outdated file versions for a reasonable time. E.g. to recover a by accident removed file, go into the directory cd ~/.snapshot (btw. this directory is not listet using the ls command) and search for the missing file
  • sophisticated caching for high performance NFS service
  • redundant system configuration

HOME Fileserver usage guides

  • Most important! Do not write or read data from this filesystem within a parallel job. High load on this filesystem will affect all users on all systems and drop performance for all compute servers! Compute Jobs should do IO operations in the workspace directory!
  • default user Quota is currently 20GB, group quota is set to 200GB
  • storage area for source code, workflow scripts, ...
  • place large data sets in the workspace directory or HPSS


setup separate directories for different systems

For some users it may be convinient to have some content stored in the users HOME like application configuration directories and files seperated between the two systems.

This can be done by creating subdirectories for each of the two systems and then setting the $HOME environment variable to the new HOME path. If one is doing so please rember to take care of your .ssh directory in case you want to login to another system or node while your home path points to a another PATH than your original HOME.

In case you want to use graphical applications please take also care of your .Xauthority file which holds the magic-cookies necessary for X-forwarding.

The tasks described above can also be done by the .profile example shown below.

#!/bin/bash
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# == Declaration of variables ======================================= XX   
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#
NEHALEM_SUBFOLDER=nehalem_home
CRAY_SUBFOLDER=cray_home
#
# -- Set your default home location ------------------------------------
#
# [1] : BlueArc with subdirectory
# [2] : Lustre workspace
#
HOME_LOC=2
#
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# == Declaration of functions ======================================= XX   
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#
# -- Function to set new HOME path -------------------------------------
set_new_home () {
   
   if  [ -d $HOME/$1 ]; then
      export HOME=$HOME/$1
   else
      echo "Found no subdirectory '$1' in current HOME path"
      echo $HOME
      ret=`mkdir $HOME/$1`
      if [ -n $ret ]; then
         echo "Created subdirectory '$1'"
         export HOME=$HOME/$1
      else
        echo "Subdirectory '$1' could not be created. Using"
        echo $HOME
        echo "as HOME path"
        export HOME=$HOME
      fi
   fi
}
#
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# == Preparation of HOME redirection ================================ XX   
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#
# -- Save original home path -------------------------------------------
ORIGINAL_HOME=$HOME
export ORIGINAL_HOME
#
# -- If X forwarding is enabled ----------------------------------------
if [[ -n "`echo $DISPLAY | grep localhost`" ]]; then
   # -- Get Display number ---------------------------------------------
   displ_nr=`echo $DISPLAY | sed -e "s/localhost//" | cut -d. -f1`
   #echo $displ_nr
   #
   # -- Extract magic cookie for current display -----------------------
   mgco=`xauth nextract - ${HOST}/unix${displ_nr}`
   #echo $mgco
else
   mgco=""
fi
#
# -- Set Home location to workspace if requested -----------------------
if [[ "$HOME_LOC" == "2" ]]; then
   HOME=`ws_find home`
   if [[ -z $HOME ]]; then
      echo "Please allocate workspace with name 'home' if choosing HOME_LOC=2"
      HOME=$ORIGINAL_HOME
   fi
fi
#
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# == Nehalem login ================================================== XX   
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#
if [[ $HOST == cl3* ]] || [[ -n `echo $HOST | grep -e "n[0-9]\{6\}$"` ]]; then
    set_new_home $NEHALEM_SUBFOLDER
fi
#
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# == Hermit login =================================================== XX   
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#
if [[ "$HOST" == "hermit1" ]] ||
   [[ -n `echo $HOST | grep -e "eslogin[0-9]\{3\}$"` ]] || 
   [[ -n `echo $HOST | grep -e "nid[0-9]\{5\}$"` ]]     || 
   [[ -n `echo $HOST | grep -e "pre[0-9]\{3\}$"` ]]          ; then
    set_new_home $CRAY_SUBFOLDER
fi
#
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# == Preparation of specific environment ============================ XX   
#XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#
if [[ -n $ORIGINAL_HOME ]]; then
   echo ""
   echo "=================================================================="
   echo ""
   echo " Please  be aware that the path to your home directory has been"
   echo " changed from"
   echo ""
   echo " $ORIGINAL_HOME"
   echo ""
   echo " to"
   echo ""
   echo " $HOME"
   echo ""
   #
   # -- Change to machine specific HOME -----------------------------------
   cd $HOME
   #
   # -- Link .ssh to new home ---------------------------------------------
   if [ ! -d .ssh ]; then
      ln -s $ORIGINAL_HOME/.ssh .ssh
   fi
   #
   if [[ -n "$mgco" ]]; then
      # -- Update .Xauthority in new home ---------------------------------
      if [ ! -e .Xauthority ]; then
         cp $ORIGINAL_HOME/.Xauthority .Xauthority
      else
         echo $mgco | xauth nmerge -
      fi
   fi
   #
   # -- Set machine specific environment ----------------------------------
   if [ -f .profile ]; then
      source .profile
   else
      echo "Found no .profile in new HOME location"
      echo ""
   fi
#
else
   echo ""
   echo "=================================================================="
   echo ""
   echo " Please  be aware that the path to your home directory has not"
   echo " been changed even though the .profile for HOME diverting was "
   echo " executed on login !"
   echo ""
   echo "This is becaus login came accross "$HOST
   echo ""
fi