OS Manuals

llapi_search_rootpath_by_dev(3)

llapi_search_rootpath, llapi_search_rootpath_by_dev - retrieve the path of a lustre mount point

LLAPI_SEARCH_ROOTPATH(3) Lustre Library Functions LLAPI_SEARCH_ROOTPATH(3)

llapi_search_rootpath, llapi_search_rootpath_by_dev - retrieve the path of a lustre mount point

#include <lustre/lustreapi.h>
int llapi_search_rootpath( char *pathname ,const char *fsname)
int llapi_search_rootpath_by_dev( char *pathname, dev_t dev)

llapi_search_rootpath() and llapi_search_rootpath_by_dev() find the first Lustre mount point by matching the filesystem name fsname or the filesystem device dev.

The path of the mount point found is stored into pathname. This buffer should be sufficient to store the path.

e.g: char pathname[PATH_MAX];

The filesystem device can be retrieved from a file with stat() (field st_dev) or statx() (fields stx_dev_major and stx_dev_minor).

0
on success, or
error code on failure and sets errno appropriately.

pathname pointer is NULL.
The Lustre mount point was not found.

llapi_search_rootpath() and llapi_search_rootpath_by_dev() is part of the lustre(7) user application interface library. llapi_search_rootpath was added in release 2.4.0. llapi_search_rootpath_by_dev was added in release 2.16.0.

stat(2), statx(2), lustreapi(7)

2024-08-28 Lustre User API

lustre 2.17.60-r0 · enterprise-packages · ingested 2026-10-22