# Node Storage Space Considerations

### How the Node Reserves Storage

When you configure your node's storage size, the system creates a single file called `storage.blob`. This file is pre-allocated immediately using `fallocate` at the full configured size.

If you configure 500 GB of storage, 500 GB of disk space is reserved the moment the node starts — even if no data has been stored yet. The space is occupied on disk regardless of actual usage.

This is by design. Pre-allocation ensures fast, predictable write performance and avoids filesystem fragmentation during operation.

### The Problem: Shared Volumes

A shared volume means your `storage.blob` lives on the same disk or partition as your operating system, databases, backup jobs, or other services.

Each of these systems writes data independently. Your OS generates logs, temporary files, package caches, and swap data. Backup tools, databases, and monitoring agents do the same. None of these systems are aware of each other's space requirements.

If your node reserves 450 GB on a 500 GB disk, only 50 GB remain for everything else. That margin can shrink quickly and without warning.

### What Could Happen When the Disk Fills Up

If the remaining free space on a shared volume runs out, several things could go wrong:

* **The operating system could stop functioning properly.** Linux requires free disk space for logs, temporary files, and process management. Without it, core services could crash or hang.
* **You could lose remote access.** SSH sessions require temporary file writes. If the disk is full, login could become impossible — leaving you locked out of your own server.
* **Other services could fail.** Databases, backup jobs, or web servers sharing the same disk could crash, corrupt data, or stop responding.
* **The node could be deactivated.** A full volume triggers automatic deactivation of your node. The network treats your node as unavailable until the issue is resolved.
* **Recovery could require physical access.** In worst-case scenarios, the system could become unresponsive entirely, requiring a rescue boot or physical console access to free up space.

None of these situations produce a clear warning beforehand. The disk simply fills up, and services begin to fail one by one.

### Best Practices

#### Option A: Use a Dedicated Partition or Volume (Recommended)

Mount a separate partition or volume exclusively for your node's `storage.blob`. This way, even if the node uses 100% of its allocated space, the OS and other services remain unaffected.

This is the safest setup and strongly recommended for production nodes.

#### Option B: Keep Enough Free Space on Shared Disks

If a dedicated volume is not possible, never configure your node storage to use more than **80–85%** of the total disk. On a 1 TB disk, configure no more than 800–850 GB for the node. The remaining space acts as a buffer for the OS and other services.

#### Option C: Set Up Disk Space Monitoring

Use a monitoring tool to alert you when disk usage crosses a threshold. A warning at **85%** and a critical alert at **90%** gives you time to react before problems start.

Simple check via command line:

```bash
df -h /
```

This shows how much space is available on your root partition.

### How to Check Your Current Setup

**1. Check disk usage:**

```bash
df -h
```

Look at the partition where your `storage.blob` is located. If it shares a mount point with `/`, you are running a shared volume setup.

**2. Identify your partitions:**

```bash
lsblk
```

This shows all disks and partitions. Ideally, `storage.blob` should be on its own mount point (e.g. `/mnt/node-storage`), separate from `/`.

**3. Check storage.blob location and size:**

```bash
ls -lh /path/to/storage.blob
```

Compare the file size against the total capacity of the partition it sits on.

### Summary

| Setup                             | Risk Level | Recommendation                |
| --------------------------------- | ---------- | ----------------------------- |
| Dedicated volume for storage.blob | Low        | Recommended for all operators |
| Shared disk, 80–85% allocated     | Medium     | Acceptable with monitoring    |
| Shared disk, 90%+ allocated       | High       | Reconfigure immediately       |
| Shared disk, no monitoring        | Critical   | Add monitoring or migrate     |


---

# 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.wesendit.io/en/wesendit-node-network/onboarding-for-node-operators/node-storage-space-considerations.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.
