'Raise VolumeBackendAPIException if GPFS is not active.'

def _check_gpfs_state(self):

    out = self._get_gpfs_state()
    lines = out.splitlines()
    state_token = lines[0].split(':').index('state')
    gpfs_state = lines[1].split(':')[state_token]
    if (gpfs_state != 'active'):
        LOG.error('GPFS    is    not    active.        Detailed    output:    %s.', out)
        raise exception.VolumeBackendAPIException(data=(_('GPFS    is    not    running,    state:    %s.') % gpfs_state))
