[lustre-discuss] How to obtain the total number of available OSTs when poolname is empty
Wei-Keng Liao
wkliao at northwestern.edu
Sat Dec 20 11:41:47 PST 2025
I am trying to get the total number of available OSTs given
a folder name, through calls of Luster user C APIs, but failed
to do so, when a layout has no pool name. I have tried the followings.
At first, call llapi_layout_get_by_fd() to obtain a folder's 'layout'.
llapi_layout_pool_name_get() returns successfully, but the returned
pool_name is empty.
llapi_getname() returns a valid fsname.
llapi_get_poolmembers() returns -22 (i.e. -EINVAL), when using
the 'fsname' as the argument 'poolname.'
If I appended a dot, '.', to fsname, llapi_get_poolmembers() returns
successfully, but the returned value is 0 (number of members).
When doing my experiments on Polaris at ALCF, I have also tried
the following lfs commands at the prompt of login node.
% lfs pool_list /eagle
Pools from eagle:
% lfs getname -n /eagle
eagle
% lfs osts /eagle |wc -l
161
Command 'lfs osts /eagle' shows there are 160 OSTs.
On Perlmutter at NERSC, its Lustre has a pool name, and thus
I was able to make the above Lustre user API calls to retrieve
the total number of available OSTs.
In summary, my question is how do I properly make calls to Lustre
user C APIs when a layout has no pool name?
Wei-keng Liao
More information about the lustre-discuss
mailing list