LLAPI_SEARCH_ROOTPATH(3)
π LLAPI_SEARCH_ROOTPATH(3) π
okay bestie, so this is a section 3 manual page from the Lustre Library Functions collection, and it's literally all about finding where your Lustre filesystem is mounted. no cap. let's get into it π«Ά
β¨ NAME β¨
llapi_search_rootpath, llapi_search_rootpath_by_dev β retrieve the path of a lustre mount point π¦
β¨ SYNOPSIS β¨
#include <lustre/lustreapi.h>
int llapi_search_rootpath( char *pathname ,const char *fsname)
int llapi_search_rootpath_by_dev( char *pathname, dev_t dev)
β¨ DESCRIPTION β¨
okay so picture this: llapi_search_rootpath() and llapi_search_rootpath_by_dev() are out here hunting down the first Lustre mount point for you. how do they do it? they match either the filesystem name fsname π
or the filesystem device dev π
. that's the whole vibe.
wherever that mount point is, its path gets stored into pathname, bestie. so make sure that buffer is, like, sufficient to store the path. don't come crying to me if you under-allocate, i warned you π
for example:
char pathname[PATH_MAX];
iconic. obsessed. now β where do you even get the filesystem device from? you can pull it out of a file with stat() (look at the field st_dev) or with statx() (look at the fields stx_dev_major and stx_dev_minor). yw π
β¨ RETURN VALUES β¨
0β on success, slay β¨-veβ error code on failure, and it setserrnoappropriately. not the moment, ngl π
β¨ ERRORS β¨
EINVALβ thepathnamepointer is NULL. stop it. πENODEVβ the Lustre mount point was not found. it's giving lost in the sauce π§
β¨ AVAILABILITY β¨
llapi_search_rootpath() and llapi_search_rootpath_by_dev() are part of the lustre(7) user application interface library π
llapi_search_rootpathwas added in release 2.4.0llapi_search_rootpath_by_devwas added in release 2.16.0
main character energy from both of them fr fr π
β¨ SEE ALSO β¨
stat(2), statx(2), lustreapi(7) π
and that's the whole page bestie. this one came to you from the Lustre User API, dated 2024-08-28 β thanks for reading, ily, go mount something πβ¨π
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms