LLAPI_DIR_CREATE_POOL(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

✨ LLAPI_DIR_CREATE_POOL(3) ✨

okay bestie, welcome to the Lustre Library Functions</> corner of the manual πŸ’– pull up a chair, we're making directories and they're gonna be striped.


🌸 NAME 🌸

llapi_dir_create_pool β€” create a striped directory with individual parameters πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <lustre/lustreapi.h>

int llapi_dir_create_pool(const char *name, int mode,
                          int stripe_offset, int stripe_count,
                          int stripe_pattern,
                          const char *pool_name)

✨ DESCRIPTION ✨

so like, llapi_dir_create_pool() is a lil convenience function (we love a convenience function, no cap) that creates a brand new directory with the name and striping parameters you asked for, on a Lustre filesystem. What it does underneath is construct a struct llapi_stripe_param</> out of all your individual arguments and then call llapi_dir_create(3). it's giving "middle manager but make it helpful" 🫢

the whole point? a simpler interface when you only need the basic striping parameters, so you don't have to go populate the entire stripe parameter structure yourself. lowkey iconic of it.

here's the tea on the arguments:

  • name β€” the pathname of the directory you want to create. heads up: the parent directory has to already exist AND be on a Lustre filesystem, or it's a no πŸ’€
  • mode β€” the permission bits for the new directory, exactly as described in open(2).
  • stripe_offset β€” the MDT index where the directory should start. Or pass -1 and it'll do round-robin selection across the available MDTs 🎠
  • stripe_count β€” how many MDTs to stripe the directory across. Pass 0 and you get the filesystem default.
  • stripe_pattern β€” the hash algorithm for spreading directory entries across MDTs. Valid values include LMV_HASH_TYPE_FNV_1A_64 (the default, good distribution, she ate), LMV_HASH_TYPE_CRUSH (optimized for migration), and LMV_HASH_TYPE_ALL_CHARS (weak, for testing only β€” do not bring her to production, bestie).
  • pool_name β€” currently ignored, should be set as NULL. it's just there vibing. set it to NULL. that's the whole job. ✨

πŸ’– RETURN VALUE πŸ’–

llapi_dir_create_pool() returns 0 on success, or a negative errno value if it fails. simple as that, periodt.


🌈 ERRORS 🌈

  • -EACCES β€” permission denied on parent directory πŸ™ˆ
  • -EALREADY β€” stripe already set on existing directory
  • -EEXIST β€” directory already exists (she's already here, bestie)
  • -EINVAL β€” an invalid argument was specified
  • -ENOENT β€” parent directory does not exist 😭
  • -ENOMEM β€” not enough memory to allocate a resource

πŸ‘‘ AVAILABILITY πŸ‘‘

llapi_dir_create_pool () has been part of the lustre(7) user application interface library since release 2.4.0. a true veteran, we stan ⭐


πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page, you're officially a striped-directory girlie now 🧚 this was Lustre User API, dated 2026-01-26, signing off β€” go make some directories, slay, and remember: pool_name is NULL. always. πŸ’œ

πŸ“¦ where this page comes from