I adjusted this part using the bricks hostname instead localhost, as you can see here:
snprintf (cmd_str, 8192,
"%s/sbin/glusterfsd --xlator-option %s-server.listen-port=%d "
"-s %s --volfile-id %s -p %s --brick-name %s "
"--brick-port %d -l %s", GFS_PREFIX, volinfo->volname,
port, brickinfo->hostname, volfile, pidfile, brickinfo->path, port,
brickinfo->logfile);
This change is fine.
I think the solution is okay, but better would be if glusterd considers the optionally --remote-host= parameter instead
the bricks host. Maybe anybody can tell me how I have to adjust it.
To start 'glusterfsd' bind()'d to particular IP, you need to edit glusterd-volgen.c and add an option to 'protocol/server' volume saying 'option bind-address <IP>'
That should make glusterfsd listen on particular IP instead of binding to 0.0.0.0
Regards,
Amar