DMAPI for GPFS 2.3.0-24 on Linux (RHEL4) doesn't report offline media. Compliled smbd from source. Set debuglevel for smbd to dmapi:10, logs show the following when accessing a directory on a share with "dmapi support = yes": [2007/09/14 12:48:52, 10] smbd/dmapi.c:dmapi_file_flags(256) dm_path_to_handle(./SWMtubEB1-9_R3D.dv.log): Operation not permitted According to the GPFS DMAPI API docs: http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.gpfs.doc/gpfs23/bl1dmp10/bl1dmp1034.html this is because any GPFS DMAPI calls will fail with ENOPERM if you're not root. Applying the following patch: --- ./smbd/dmapi.c.orig 2007-09-14 12:49:38.000000000 +0100 +++ ./smbd/dmapi.c 2007-09-14 12:49:53.000000000 +0100 @@ -245,9 +245,7 @@ /* AIX has DMAPI but no POSIX capablities support. In this case, * we need to be root to do DMAPI manipulations. */ -#ifndef HAVE_POSIX_CAPABILITIES become_root(); -#endif err = dm_path_to_handle(CONST_DISCARD(char *, path), &dm_handle, &dm_handle_len); @@ -305,9 +303,7 @@ done: -#ifndef HAVE_POSIX_CAPABILITIES unbecome_root(); -#endif return flags; } allows smbd to get further, but it then fails with: [2007/09/14 12:53:46, 10] smbd/dmapi.c:dmapi_file_flags(283) dm_get_eventlist(./SWMtubEB1-9_R3D.dv.log): Invalid argument Refering to the docs again: http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=/com.ibm.cluster.gpfs.doc/gpfs23/bl1dmp10/bl1dmp1043.html Suggests that EINVAL is because the handle is not valid. But I've tried placing a call before dm_get_eventlist() to dm_handle_is_valid(), which returns true. I can't see why dm_get_eventlist() is failing and I've just exhausted my meagre store of DMAPI knowledge.
DMAPI is not needed any more with Samba 3.6 and the gpfs:hsm option which will look at the OFFLINE bit in GPFS instead of the slow DMAPI path