If you typically have large files on your filesystem (e.g. > 32MB) you should set the default stripe count for the filesystem appropriately. You can specify the default striping on a per-directory, per-filesystem basis (depending on your permissions and what your usage is), or when an individual file is created.
Use lfs setstripe -c N /path/to/directory
to set the default stripe count to N
on directory
, which will affect all new files in that directory only. If you only have a limited number of OSTs (4 in your case), or all of your files are huge (in the GB range in your case) then you can use -c -1
, which means "stripe over all OSTs", rather than an explicit stripe count.
Use lfs setstripe -c N /mnt/lustre
(or whatever the mountpoint of your filesystem is) to set the default stripe count for new files in the whole filesystem (unless otherwise specified by a directory-level default layout, or explicitly at file creation).
With Lustre 2.10 and later, you can use composite file layouts so that the stripe count increases as files get larger, like:
lfs setstripe -E64M -c 1 -E4G -c 4 -E-1 -S 4M -c -1
which means that for the first 64MB
of a file use only 1 stripe, for the 64MB-4GB
part of the file use 4 stripes, and beyond 4GB
use a stripe size of 4MB and stripe over all OSTs (which in your case is also 4, but on some filesystems it might be hundreds of OSTs).