
get_storage_pools() {
  if beegfs-ctl --liststoragepools > /dev/null &>/dev/null
  then
    POOL_ID_ARRAY=()
    POOLS_EXIST=true
    local POOL_RANGE=false
    local POOL_INDEX=0
    while read line 
    do
      local NN=0
      for LINE_PART in $line; do
        NN=$(($NN+1))
	  if [ $NN -eq 1 ]
	  then
	    if $POOL_RANGE
	    then
              POOL_INDEX=$(($POOL_INDEX+1))
              POOL_ID_ARRAY[$POOL_INDEX]=$LINE_PART
	    fi
	  fi
	  if [ "$LINE_PART" == "=======" ]
	  then
	        POOL_RANGE=true
            if [ $NN -eq 8 ]
	    then
	      POOL_ID_ARRAY[1]=1
	   
	    fi
	  fi
      done
    done<<< "$(beegfs-ctl --liststoragepools)"
  else
    echo "storage pools are not supported in your system"
    POOLS_EXIST=false
  fi
}

