# Expansion of specific resources

## Dynamic modifications

Most modifications to host configurations can be performed dynamically, without deactivating the host. Such configurations include the addition/removal of memory and network resources, changing IPs, extending network subnets and limiting the Weka system bandwidth on the host.&#x20;

All these changes can be performed using the relevant `weka cluster host`command. Once this command is used with a specific `host-id`selected, it will be staged for update on the cluster. To view the un-applied configuration, use the `weka cluster host resources <host-id>`command. To apply the changes, use the `weka cluster host apply <host-ids>` command. You can also apply these changes locally using the `weka local resources apply` command.

The last local configuration (of a host that successfully joined a cluster) is saved. If a failure/problem occurs with the new configuration, the host will automatically revert to the last known good configuration. To view this configuration, use the`weka cluster host resources <host-id> --stable` command.&#x20;

### Memory modifications

To dynamically change the memory configuration, use the steps described for the [Configuration of Memory](/4.0/install/bare-metal/using-cli.md#stage-10-configuration-of-memory-optional) on an active host, followed by the `weka cluster host apply` command.

{% hint style="success" %}
**Example:** To change `host-id 0` memory to 1.5 GB, run the following commands:

`weka cluster host memory 0 1.5GB`\
`weka cluster host apply 0`
{% endhint %}

#### Release hugepages on each container

After reducing the memory allocation for a container, it is required to release the hugepages on each container.

Perform the following steps for each container:

1. Obtain the `release_hugepages.sh` script below and copy it to the `/opt/weka/` folder.
2. Change the script mode: Run `chmod a+x release_hugepages.sh`
3. Stop the container locally: Run `weka local stop`
4. Release hugepages: Run `weka local run /opt/weka/release_hugepages.sh`
5. Restart the container locally: Run `weka local start`

{% file src="/files/dHhzFz9KBJV153sWDABW" %}

### Network modifications

To dynamically change the network configuration, use the steps described for the [Configuration of Networking](/4.0/install/bare-metal/using-cli.md#stage-6-configuration-of-networking) on an active host, followed by the`weka cluster host apply` command.

{% hint style="success" %}
**For Example:** To add another network device to `host-id 0`, run the following commands:

`weka cluster host net add 0 eth2`\
`weka cluster host apply 0`
{% endhint %}

{% hint style="info" %}
**Note:** It is possible to accumulate several changes on a host and apply only once on completion.
{% endhint %}

### Host IPs modifications

To dynamically change the host's management IPs, you can use the `management-ips` resource editing command.&#x20;

{% hint style="success" %}
**For Example:** To change the management IPs on`host-id 0`, run the following commands:

`weka cluster host management-ips 192.168.1.10 192.168.1.20`\
`weka cluster host apply 0`
{% endhint %}

{% hint style="info" %}
**Note:** The number of management IPs determines whether the host will use Highly Available Networking mode (HA), causing each IO process to use both hosts NICs. A host with 2 IPs will use HA mode and a host with only 1 IP will not use HA mode. It is also possible to define up to 4 IPs, in case the cluster is using both Infiniband and Ethernet network technologies.
{% endhint %}

### Local resources editing commands

It is also possible to run modification commands locally on the host by connecting to the desired host and running a `local resources` command equivalent to its `weka cluster host` counterpart. These local commands have the same semantics of their remote counterparts only that they don't receive the host-id as the first parameter and operate instead on the local host.&#x20;

Commands that can be performed dynamically on an Active host:

`weka local resources [--stable]`\
`weka local resources apply`\
`weka local resources net`\
`weka local resources net add`\
`weka local resources net remove`\
`weka local resources memory`\
`weka local resources bandwidth`\
`weka local resources management-ips`\
`weka local resources dedicate`

The following commands cannot be performed on an Active host and require deactivating the host first using `weka cluster host deactivate`:

`weka local resources failure-domain`\
`weka local resources cores`

## Addition of CPU cores

The addition of CPU cores to the cluster is not performed dynamically but on an inactive host. It requires the execution of the steps described in [Configuration of CPU Resources](/4.0/install/bare-metal/using-cli.md#stage-9-configuration-of-cpu-resources).&#x20;

For more information, contact the WekaIO Support Team.

## Expansion of only SSDs

Follow the instructions appearing in [Configuration of SSDs](/4.0/install/bare-metal/using-cli.md#stage-6-configuration-of-ssds).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.weka.io/4.0/usage/expanding-and-shrinking-cluster-resources/expansion-of-specific-resources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
