Red Hat Bugzilla – Bug 763933
Can't stop a Gluster volume via a script -
Last modified: 2013-12-18 19:05:53 EST
gluster --mode=script volume stop _volname_ [force]. That will skip asking interacting questions.
The Gluster volume stop command is interactive, it requires answering a "are you sure?" question. As a result the command is not readily script-able. The "force" option does not eliminate this requirement.
Eco was able to get around the problem with "yes | gluster volume stop gvol1" but this is an obvious kludge.
I would suggest that every interactive command include a "y" or "yes" switch that assumes yes to every prompt, this would be consistent with other *nix tools.