github.com/kardianos/nomad@v0.1.3-0.20151022182107-b13df73ee850/website/source/docs/commands/node-drain.html.md.erb (about) 1 --- 2 layout: "docs" 3 page_title: "Commands: node-drain" 4 sidebar_current: "docs-commands-node-drain" 5 description: > 6 Toggle drain mode for a given node. 7 --- 8 9 # Command: node-drain 10 11 The `node-drain` command is used to toggle drain mode on a given node. Drain 12 mode prevents any new tasks from being allocated to the node, and begins 13 migrating all existing allocations away. 14 15 The [node-status](/docs/commands/node-status.html) command compliments this 16 nicely by providing the current drain status of a given node. 17 18 ## Usage 19 20 ``` 21 nomad node-drain [options] <node> 22 ``` 23 24 This command expects exactly one argument to specify the node ID to enable or 25 disable drain mode for. It is also required to pass one of `-enable` or 26 `-disable`, depending on which operation is desired. 27 28 ## General Options 29 30 <%= general_options_usage %> 31 32 ## Node Drain Options 33 34 * `-enable`: Enable node drain mode. 35 * `-disable`: Disable node drain mode. 36 37 ## Examples 38 39 Enable drain mode on node1: 40 41 ``` 42 $ nomad node-drain -enable node1 43 ```