On Tue, Jul 5, 2011 at 10:11 AM, Rob Latham <robl@xxxxxxxxxxx> wrote: > 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. > This is true, but the working directory is an input to the script and I'm using this to determine and set mpi-io filesystem hints - as far as I know it doesn't hurt much if I get them wrong - the hints will be ignored and nothing will fail. > > the 'stat -f /path/to/file_system' command can give you the > information you want: > > % stat -c %T -f / > ext2/ext3 > > Running this on /tmp/work/$USER on jaguarpf gives UNKNOWN (0xbd00bd0) I suppose you could key on the magic number, but that doesn't seem very robust. > 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? > I get this result from a bluegene linux front end, but not from AIX. > _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf