How can I determine if a file my code is reading or writing is mounted on a path on top of Lustre, GPFS, or NFS at runtime, from within a C/C++ code?
Edit: Working code:
#include <sys/vfs.h>
#include <iostream>
int main(int argc, char** argv) {
struct statfs sf;
statfs(argv[0], &sf);
std::cout << "f_type =" << std::hex << sf.f_type << "\n";
}
Sry about the half-C, half-C++.