문제

  • Changes made to the verbosity setting in /etc/multipath.conf are not effective after running service multipathd reload. It takes a service multipathd restart to achieve that.

환경

  • All release of Red Hat Enterprise Linux (RHEL)
  • Device Mapper Multipath

해결

This is intentional and expected for verbosity parameter. To reflect new verbosity value, restarting multipath daemon is required.
The idea is to prevent setting a lower verbosity than the one that was possibly set manually on the console.

근본 원인

Verbosity is not taken from the config file to prevent a lower verbosity than multipathd may have been started with.

진단 단계

Reloading multipath daemon will sent SIGHUP. This signal is caught in below sighup call which is calling reconfigure for changes in multipath.conf file

static void
sighup (int sig)
{
    condlog(2, "reconfigure (SIGHUP)");

    lock(gvecs->lock);
    reconfigure(gvecs);
    unlock(gvecs->lock);

#ifdef _DEBUG_
    dbg_free_final(NULL);
#endif
}

In reconfigure call, we see old_verbosity is considered and new value is not read :

int    
reconfigure (struct vectors * vecs)     
{
    struct config * old = conf;         

    /* 
     * free old map and path vectors ... they use old conf state
     */
    if (VECTOR_SIZE(vecs->mpvec))       
        remove_maps_and_stop_waiters(vecs);      

    if (VECTOR_SIZE(vecs->pathvec))     
        free_pathvec(vecs->pathvec, FREE_PATHS); 

    vecs->pathvec = NULL;               
    conf = NULL;

    if (load_config(DEFAULT_CONFIGFILE))
        return 1;

    conf->verbosity = old->verbosity;             <<<<<<<<<<<<<<<

    if (!conf->checkint) {
        conf->checkint = DEFAULT_CHECKINT;       
        conf->max_checkint = MAX_CHECKINT(conf->checkint);
    }
    configure(vecs, 1);
    free_config(old);
    return 0;
}