Storage Guide
CARDS Storage System
The CARDS ceph storage system hosts all of the storage on LARCC. CARDS has 8PB of RAW storage capacity. After redundancy and blocking out a 1PB block for the Open Science Data Federation (OSDF), 4.5PB is the usable space available to UofL users.
Understanding Storage on Compute Nodes
When working on any compute node within the system, there are three primary types of storage available to users: scratch storage, work storage, and home storage.
These are illustrated in the diagram below:
Storage Types
scratch Storage (node-local NVMe)
Local to each compute node: This means it is not shared across nodes.
High performance: Offers significantly faster read/write speeds compared to
homestorage.Limited capacity: Typically smaller in size, so it’s best suited for temporary files and high-speed I/O operations during job execution.
Data retention policy: ALL DATA IS REMOVED after a job finishes.
home Storage (HDD drives)
Shared across all nodes: Accessible from any compute node in the system.
Large capacity: Designed to store a user’s persistent data, such as source code, datasets, and results.
Data access speed: Due to its shared nature, read/write operations are generally slower than
scratchstorage.Data retention policy: Data is kept as this storage space is designed to hold persistent data.
Quota: Default of 1TB Quota, additional storage space requests can be made to the CARDS Governance Committee through a ticket
work Storage (NVMe drives)
Shared accross all nodes: Accessible from any compute node in the system.
Purpose: Fast access to large data from the compute nodes.
Data access speed: read/write operations can be slower than
scratchstorage but can be faster thanhome, andworkhas lower latency thanhomeData retention policy: The data that has not been accessed in the last 30 days is a likely candidate to get purged in the event space needs to be reclaimed in
work. All data meant for long-term retention should be copied to an appropriate folder inhome.
Recommended Workflow
A common and efficient workflow for running jobs on the system is:
Prepare Input Data: Copy necessary input files from your
homestorage orworkstorage to the node’s localscratchstorage at the start of your job.Run the Application: Configure your application to read from and write to the
scratchstorage during execution to take advantage of its high-speed performance.Save Results: Once the job completes, copy the output files back to
work. In case you need to retain the data for long-term, copy that tohomefromwork.
See Section Copying Data Between Work and Scratch for more information on how to implement this worflow.
Note
Always ensure that your input and output data will fit within the available space on scratch storage.
If your files exceed this capacity, you may need to adjust your workflow accordingly.
Copying Data Between Work and Scratch
To efficiently transfer data between your shared home (or work) storage and node-local scratch storage, you can use pdsh—a parallel remote shell client that executes commands across multiple nodes simultaneously.
The general template for the pdsh command includes three key components:
-R ssh: Specifies SSH as the remote shell method (always usessh).-w $SLURM_JOB_NODELIST: Targets all nodes allocated to your job.Remote command: Executes on each node, leveraging the fact that
homeandworkare shared whilescratchis local.
Below are common usage patterns:
Copy input data from work to scratch on all nodes
pdsh -R ssh -w $SLURM_JOB_NODELIST "cp -r /work/$USER/input /mnt/scratch/local/$USER/"
For example, assume you submitted a batch job requesting 3 nodes and slurm allocated larcc-cpu[1-3]. Then, the pdsh
command above would:
Create 3 (parallel) ssh sessions from
larcc-cpu1to itself,larcc-cpu2andlarcc-cpu3.Within each session, instruct the node to copy the folder
/work/$USER/inputto/mnt/scratch/local/$USER/
Copy results from scratch to work
Warning
When copying results back to work, ensure unique filenames or directories to prevent nodes from overwriting each other’s output.
The commands below use the node’s hostname as a suffix to avoid conflicts.
# Copy results from scratch to work, appending hostname to avoid overwrites
pdsh -R ssh -w $SLURM_JOB_NODELIST "cp -r /mnt/scratch/local/$USER/results /work/$USER/results_\`hostname\`"
# Alternatively, move results from scratch to work
pdsh -R ssh -w $SLURM_JOB_NODELIST "mv /mnt/scratch/local/$USER/results /work/$USER/results_\`hostname\`"
For example, assume you submitted a batch job requesting 3 nodes and slurm allocated larcc-cpu[1-3] such
that larcc-cpu1 is chosen as the node where the batch script is to be executed from. Then, the pdsh
commands above would:
Create 3 (parallel) ssh sessions from
larcc-cpu1to itself,larcc-cpu2andlarcc-cpu3.Within each session, instruct the node to copy (or move if using
mv) the folder/mnt/scratch/local/$USER/resultsto/work/$USER/, appending_followed by the node’s hostname to the copy. i.e.,# larcc-cpu1 executes: cp -r /mnt/scratch/local/$USER/results /work/$USER/results_larcc-cpu1 # larcc-cpu2 executes: cp -r /mnt/scratch/local/$USER/results /work/$USER/results_larcc-cpu2 # larcc-cpu3 executes: cp -r /mnt/scratch/local/$USER/results /work/$USER/results_larcc-cpu3
Simplified Copy for Aggregated Results
If your application aggregates results on the submission node (e.g., via MPI reduction), and per-node outputs are not needed,
you can use a standard copy command instead of pdsh.
Batch Script Example
Here’s how this workflow fits into a typical Slurm batch script:
#!/bin/bash
#SBATCH ...
# Copy input to scratch
pdsh -R ssh -w $SLURM_JOB_NODELIST "cp -r /work/$USER/input /mnt/scratch/local/$USER/"
# Run your application
# ...
# Copy results back to work
pdsh -R ssh -w $SLURM_JOB_NODELIST "cp -r /mnt/scratch/local/$USER/results /work/$USER/results_\`hostname\`"
For aggregated results (e.g., via MPI reduction):
#!/bin/bash
#SBATCH ...
# Copy input to scratch
pdsh -R ssh -w $SLURM_JOB_NODELIST "cp -r /work/$USER/input /mnt/scratch/local/$USER/"
# Run your application
# ...
# Copy final results from scratch to work
cp -r /mnt/scratch/local/$USER/results /work/$USER/