LLAPI_GET_OBD_COUNT(3)

πŸ“¦ version 2.17.58, in ubuntu stonking

✨ 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