| LLAPI_GET_OBD_COUNT(3) | Lustre Library Functions | LLAPI_GET_OBD_COUNT(3) |
NAME
llapi_get_obd_count - get number of MDT/OST targets for Lustre mountpoint
SYNOPSIS
#include <lustre/lustreapi.h>
int llapi_get_obd_count(char *mnt, int *count, int is_mdt);
DESCRIPTION
llapi_get_obd_count() returns the number of Object Storage Targets (OSTs) or Metadata Targets (MDTs), configured for the Lustre filesystem mounted at mnt.
mnt is the path to the Lustre mount point or a directory within it.
count is a pointer to an integer where the resulting target count will be stored.
is_mdt is a boolean. If non-zero, it returns the MDT count; if zero, it returns the OST count.
RETURN VALUES
llapi_get_obd_count() returns 0 on success. On failure, it returns a negative errno value.
ERRORS
AVAILABILITY
llapi_get_obd_count() is part of the lustre(7) user application interface library since release 1.8.0
SEE ALSO
llapi_lmv_get_uuids(3), llapi_lov_get_uuids(3), lustreapi(7)
| 2026-02-24 | Lustre User API |