Topic
  • No replies
Tucks
Tucks
78 Posts

Pinned topic dm_create_session()

‏2013-05-30T15:33:11Z |

 

 

Hello

  I wonder if anyone could shed any light on why I cannot register a dmapi session.

Sample code:

if( dm_init_service( &versionstr ) < 0 )

    printf( "exiting. %d\n", versionstr );
    exit(1);

ret = dm_create_session( oldsid, sessinfo, &newsid);

printf( "ret=%d\n", ret );
printf( "newsid=%d\n", newsid );

exit(0);

 

My code always exits at dm_init_service with a random versionstr.

E.G.

 

user@host:~/repos/src$ ./dm_create_session
exiting. -2060151512
user@host:~/repos/src$ ./dm_create_session
exiting. 1640850728
 

I suspect the crux of this is 'how do I register a dmapi application' ?

According to the docs, you have to create a session via an application called from /var/mmfs/etc/gpfsready

I'm trying to write a small piece of junk code that does this.

 

If I can't initialise the dm_init_service, I can't create a session to set a mount disposition.

-z yes requires a registered dmapi service in order to be able to register a session.

 

Catch-22 ?

 

 

Any pointers appreciated.

 

Thanks

Jez

 

Note: This is nothing to do with TSM or Space Management.