LLAPI_GET_OBD_COUNT(3)
β¨ LLAPI_GET_OBD_COUNT(3) β¨
okay so bestie, welcome to the Lustre Library Functions corner of the manual β this one is llapi_get_obd_count, and it's literally just counting your targets for you π
πΈ NAME πΈ
llapi_get_obd_count β get the number of MDT/OST targets for a Lustre mountpoint, no cap π―
π¦ SYNOPSIS π¦
#include <lustre/lustreapi.h>
int llapi_get_obd_count(char *mnt, int *count, int is_mdt);
π DESCRIPTION π
so llapi_get_obd_count() returns the number of Object Storage Targets (OSTs) or Metadata Targets (MDTs) that are configured for the Lustre filesystem mounted at mnt. it's giving inventory check, it's giving headcount, iconic behavior honestly π
- mnt β the path to the Lustre mount point, or a directory somewhere inside it. either one works, she's flexible π«Ά
- count β a pointer to an integer where the resulting target count gets stored. that's where the answer lands, bestie π
- is_mdt β a boolean. if it's non-zero, you get the MDT count; if it's zero, you get the OST count. pick your fighter β¨
π₯ RETURN VALUES π₯
llapi_get_obd_count() returns 0 on success. on failure, it returns a negative errno value β so yeah, negative = not the vibe π
π ERRORS π
-ENOENTβ the path specified by mnt does not exist. she's not there, she ghosted you π-ENOTDIRβ the path specified by mnt is not a directory. wrong kind of thing entirely ngl-ENOTTYβ the path specified by mnt is not on a Lustre filesystem. not a Lustre mount, so we can't do the thing π
β AVAILABILITY β
llapi_get_obd_count() is part of the lustre(7) user application interface library since release 1.8.0. been around since forever, a true veteran π
π SEE ALSO π
and that's the whole page, bestie!! this was brought to you by the Lustre User API, dated 2026-02-24 β go forth and count your targets, mwah ππ§π
π¦ 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