LLAPI_LAYO...L_NAME_GET(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– LLAPI_LAYOUT_POOL_NAME_GET, LLAPI_LAYOUT_POOL_NAME_SET β€” get or set the OST pool name of a Lustre file πŸ’–

okay bestie, this is a page from the Lustre Library Functions collection, manual section 3, and it's literally just two little functions that let you peek at 🫣 or poke at πŸ’… the OST pool name of a Lustre file. tiny API, big vibes.


✨ SYNOPSIS ✨

#include <lustre/lustreapi.h>

int llapi_layout_pool_name_get(const struct llapi_layout *layout,
                               char *pool_name, size_t n);

int llapi_layout_pool_name_set(struct llapi_layout *layout,
                               const char *pool_name);

🌸 DESCRIPTION 🌸

πŸ’… llapi_layout_pool_name_get()

this one goes and grabs the name of the pool of OSTs that's associated with layout, and drops up to n characters of it into pool_name. that's it. that's the whole function. it's giving "just tell me where this file lives, bestie". πŸŽ€

πŸ’… llapi_layout_pool_name_set()

this one sets the OST pool name of layout to pool_name, maxing out at LOV_MAXPOOLNAME characters. no cap.

now here's the lil plot twist πŸ™ˆ β€” if your pool_name uses the "fsname.pool" notation to qualify the pool name with a filesystem name, that "fsname." portion gets silently discarded before the value is stored. like, gone. no warning, no drama, just yeeted into the void. πŸ’€

llapi_layout_pool_name_set() will validate that:

but it does NOT validate that pool_name actually names an existing, non-empty pool β€” because at this point it's genuinely not known a priori which filesystem layout is gonna get applied. so it can't check. it simply cannot.

⚠️ however!! the function llapi_layout_file_create() will fail if you hand it a layout with a pool that doesn't exist or that contains no OSTs. so like, be careful out there bestie. 🫢

πŸ”₯ RETURN VALUES πŸ”₯

  • llapi_layout_pool_name_get() and llapi_layout_pool_name_set() return 0 on success ✨ β€” slay, we love a clean return.
  • or -1 if an error occurred 😭 β€” and in that case, errno gets set appropriately, as it should. main character error handling.

πŸ’€ ERRORS πŸ’€

errors coming out of llapi_pool_name_validate(3) will be returned on malformed pool names. so if you typed something weird, that's where the blame lands.

  • EINVAL β€” an invalid argument was specified. yeah. that one. the classic. πŸ™ˆ

πŸ¦‹ NOTES πŸ¦‹

so what even is a pool? πŸ’­ a pool defines a set of OSTs from which objects may be allocated to store a file in a Lustre filesystem. and who makes them? the filesystem administrator, using the lctl(1) command. not you. not me. the admin. πŸ‘‘

this API lets an application do two (2) things:

  1. create a file within an existing pool, or
  2. query the name of a pool that a file was created in.

and that's the whole list. it does not give you any interface for creating or destroying pools. so don't come here looking for that, bestie, the door is that way. πŸšͺ✨

πŸ“– refer to the Lustre Operations Manual for detailed background material about OST pools β€” that's where the lore lives.

🌈 AVAILABILITY 🌈

llapi_layout_pool_name_get() and llapi_layout_pool_name_set() are part of the lustre(7) user application interface library since release 2.7.0. so they've been around for a minute, lowkey iconic of them.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page, bestie!! πŸŽ€ brought to you by the Lustre User API, dated 2026-08-23 β€” go forth and manage your pools responsibly, mwah πŸ’–βœ¨πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from