src/stored/dircmd.c
static bool action_on_purge_cmd(JCR *jcr)
{
   BSOCK *dir = jcr->dir_bsock;

   char devname[MAX_NAME_LENGTH];
   char volumename[MAX_NAME_LENGTH];
   int32_t action;

   /* TODO: Need to find a free device and ask for slot to the director */
   if (sscanf(dir->msg,
              "action_on_purge %127s vol=%127s action=%d",
              devname, volumename, &action)!= 5)
   {
      dir->fsend(_("3916 Error scanning action_on_purge command\n"));
      goto done;
   }
   unbash_spaces(volumename);
   unbash_spaces(devname);

   /* Check if action is correct */
   if (action & AOP_TRUNCTATE) {

   }
   /* ... */

done:
   dir->signal(BNET_EOD);
   return true;
}
/*
 * The truncate command will recycle a volume. The director can call this
 * after purging a volume so that disk space will not be wasted. Only useful
 * for File Storage, of course.
 *
 *
 * It is currently disabled
 */
The truncate command will recycle a volume. The director can call this
after purging a volume so that disk space will not be wasted. Only useful
for File Storage, of course.

It is currently disabled
The truncate command will recycle a volume . The director can call this after purging a volume so that disk space will not be wasted . Only useful for File Storage of course . It is currently disabled
static bool action_on_purge_cmd(JCR *jcr)
{
   BSOCK *dir = jcr->dir_bsock;
   char devname[MAX_NAME_LENGTH];
   char volumename[MAX_NAME_LENGTH];
   int32_t action;
   if (sscanf(dir->msg,
              "action_on_purge %127s vol=%127s action=%d",
              devname, volumename, &action)!= 5)
   {
      dir->fsend(_("3916 Error scanning action_on_purge command\n"));
      goto done;
   }
   unbash_spaces(volumename);
   unbash_spaces(devname);
   if (action & AOP_TRUNCTATE) {
   }
done:
   dir->signal(BNET_EOD);
   return true;
}
static bool action_on_purge_cmd ( JCR * jcr ) { BSOCK * dir = jcr -> dir_bsock ; char devname [ MAX_NAME_LENGTH ] ; char volumename [ MAX_NAME_LENGTH ] ; int32_t action ; if ( sscanf ( dir -> msg , " " , devname , volumename , & action ) != 5 ) { dir -> fsend ( _ ( " \n " ) ) ; goto done ; } unbash_spaces ( volumename ) ; unbash_spaces ( devname ) ; if ( action & AOP_TRUNCTATE ) { } done : dir -> signal ( BNET_EOD ) ; return true ; }
The truncate command will recycle a volume.
The truncate command will recycle a volume .
/* TODO: Need to find a free device and ask for slot to the director */ /* Check if action is correct */ /* ... */