--- title: Block Storage description: "A disk volume attached to a server and formatted with a filesystem. Used for databases, VPS data, and snapshots." canonical: https://penasihathosting.com/en/hosting-wiki/block-storage type: wiki locale: en updated: 2026-10-29 author: Willya Randika --- # Block Storage ## Overview - **Summary:** A disk volume attached to a server and formatted with a filesystem. Used for databases, VPS data, and snapshots. - **Author:** Willya Randika ([profile](/penulis/willya-randika)) ## Article **Block storage** is a virtual disk volume attached to a server and formatted with a filesystem (ext4, XFS, and similar). From the application's point of view it looks like a regular disk: you can create folders, write files, and run a database. ## Use cases | Need | Suitable? | | --- | --- | | Extra VPS data | Yes | | Production database | Yes, with backups | | Snapshot before an upgrade | Yes | | File sharing between servers | Not without a cluster filesystem | | Large public assets | Object storage is a better fit | ## Attachment flow 1. Create the volume in the provider panel. 2. Attach it to the VPS (for example `/dev/vdb`). 3. Format the filesystem. 4. Mount it to a folder (`/mnt/data`). 5. Add it to `/etc/fstab` so it survives a reboot. ## What to watch for - **One volume usually belongs to one server.** Multi-attach needs a special filesystem. - **A snapshot is not an offsite backup.** Keep a copy somewhere else. - **IOPS decides performance.** A cheap disk can be slow for a database. - **Resizing takes two steps.** Grow the volume, then grow the filesystem. - **Test restores.** A snapshot that has never been restored is not proven. - **Latency differs from a local disk.** For sensitive databases, measure IOPS and latency before production. Do not look only at capacity. For a database, IOPS and latency matter more than disk size. Start with enough volume, monitor usage, and grow before it fills. If the app writes many small files, test filesystem performance before production. Basic commands after attaching the volume: ```bash lsblk sudo mkfs.ext4 /dev/vdb sudo mkdir -p /mnt/data sudo mount /dev/vdb /mnt/data df -h /mnt/data ``` Add `/dev/vdb /mnt/data ext4 defaults,nofail 0 2` to `/etc/fstab` so the volume stays mounted after a reboot. ## FAQ Block storage works like a disk attached to a server. Object storage is accessed through an HTTP API and is not formatted as a filesystem. Yes, and that is a common use. Make sure IOPS, backups, and latency match the database requirements. Not entirely. A snapshot usually lives in the same provider infrastructure. A backup should be copied to a separate location.