On Tue, Jul 05, 2011 at 09:41:37AM -0600, Jim Edwards wrote: > I would like to have autoconf determine if a target filesystem is gpfs or > lustre - are there existing tools to do this? > > If not is anyone aware of a shell command that would provide this? i'd just like to point out that in general there's no guarantee that the file system you detect at configure time will be the one you access during run time. the 'stat -f /path/to/file_system' command can give you the information you want: % stat -c %T -f / ext2/ext3 If you use the system call statfs(2) you can determine the fs type at runtime. Nowadays it's even reasonably (but not entirely) portable: struct statfs has a f_fsid member. The magic number for Lustre is "#define LL_SUPER_MAGIC 0x0BD00BD0" (defined in lustre_user.h). The magic number for GPFS is ... 0x47504653 I guess? On Darwin, the f_fsid is a short, so these magic numbers might get truncated. ==rob -- Rob Latham Mathematics and Computer Science Division Argonne National Lab, IL USA _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf