Expand Cloud Server Storage for 24/7 Streaming
In this article
This guide walks you through expanding cloud server storage for a 24/7 streaming setup, so you can keep recording or hosting without running out of space. You'll learn how to assess your current usage, pick the right expansion method (resize a volume, add a disk, or use object storage), and apply the changes safely with minimal downtime. Before starting, you'll need access to your cloud provider's console (like AWS, Google Cloud, or Azure), the ability to create or modify storage resources, and basic familiarity with Linux commands if your server runs Linux.
What You'll Need
- Cloud provider account with permissions to modify storage (e.g., EC2, Compute Engine, or Azure VM).
- SSH access to your server (for Linux) or RDP (for Windows).
- Knowledge of your current storage layout: check with
df -h(Linux) or Disk Management (Windows). - Backup of critical data (snapshot or copy) before resizing.
- For object storage: an S3-compatible bucket or equivalent, and CLI tools like
aws s3orgsutil.
Step-by-Step
- Assess your current storage usage and growth rate. Log into your server and run
df -hto see which mount points are full. Note the used and available space, and estimate how fast you're consuming storage (e.g., GB per day based on stream bitrate). This tells you how much to add. - Back up your data. Before any resize, take a snapshot of your storage volume (e.g., in AWS EC2, create an EBS snapshot; in GCP, create a disk snapshot). This protects against data loss if something goes wrong.
- Decide on expansion method. For most cloud VMs, you have three options:
- Resize the existing disk – simplest, but requires the new size to be within provider limits and often requires a reboot.
- Add a new disk and mount it – good for separating stream recordings from system files.
- Use object storage – for long-term archives or if you need virtually unlimited space, but not for live streaming directly (unless you use a gateway).
- Resize the disk in the cloud console. Go to your VM's storage settings, select the boot or data disk, and increase the size (e.g., from 100 GB to 250 GB). Confirm the change and wait for it to apply – this may take a few minutes.
- Reboot the VM if prompted. Some providers require a restart for the new size to be visible to the OS. If not prompted, you can skip this, but a reboot is often safest.
- Extend the filesystem on the server. After the disk resize, the OS still sees the old partition. On Linux, use
growpartto expand the partition andresize2fsfor ext4, orxfs_growfsfor XFS. For example:sudo growpart /dev/sda 1thensudo resize2fs /dev/sda1. On Windows, open Disk Management, right-click the volume, and choose "Extend Volume". - Verify the new space. Run
df -hagain to confirm the mount point shows the larger size. Also check that existing data is intact. - If adding a new disk: In the cloud console, create a new disk with the desired size, attach it to your VM, then format and mount it. On Linux:
sudo mkfs.ext4 /dev/sdb,sudo mkdir /mnt/streams,sudo mount /dev/sdb /mnt/streams, and add an entry to/etc/fstabfor persistence. - For object storage integration: Create a bucket in your provider's object storage (e.g., S3, GCS, Azure Blob), then set up a tool like
rcloneto mount it as a filesystem, or move older recordings there using CLI commands. This offloads space from your VM disk. - Update your streaming software to use the new space. If your streaming app (like OBS, FFmpeg, or a recording service) writes to a specific path, point it to the new mount point or bucket. Restart the service to ensure it picks up the change.
Common Mistakes
- Not backing up before resizing. A failed resize can corrupt data; always snapshot first.
- Forgetting to extend the filesystem after resizing the disk. The cloud console may show the new size, but the OS won't use it until you run
growpartandresize2fs. - Resizing the wrong disk. Double-check the disk ID and mount point to avoid expanding the wrong volume.
- Mounting a new disk without adding it to
/etc/fstab. The mount will be lost on reboot, causing streaming to fail. - Using object storage for live streaming. Object storage has high latency and isn't designed for real-time writes; use it for archived content, not for the live stream output.
- Ignoring I/O performance. Larger disks may have different performance tiers; check if your new size is still within the same IOPS/throughput class.
Tips
- Monitor your storage usage with a tool like
ncduor cloud monitoring to anticipate future needs. - If you expect to grow beyond 16 TB (max for most single volumes), plan to use multiple disks or object storage from the start.
- For 24/7 streaming, consider setting up a cron job to move old recordings to object storage automatically (e.g., using
rclone). - If you're using a managed service like AWS Lightsail, note that you may need to create a snapshot and launch a new instance with a larger disk, as resizing isn't always supported.
- Test the new storage with a short stream before going live to ensure the mount point is writable and performance is acceptable.
Troubleshooting
- After resizing,
df -hstill shows old size. You likely didn't extend the filesystem. Runsudo growpart /dev/sda 1(replace with your device) and thensudo resize2fs /dev/sda1. For XFS, usesudo xfs_growfs /mnt/point. - Server doesn't boot after resize. This is rare but can happen if the partition table got corrupted. Boot from a recovery image, mount the disk, and check filesystem integrity with
fsck. If you have a snapshot, restore it. - New disk not showing up. Run
lsblkto list block devices. If the disk is visible but not formatted, format it and mount it. If it's not visible, detach and reattach it in the console. - Mount point disappears after reboot. Add an entry to
/etc/fstabusing the UUID (find withblkid) to ensure it mounts automatically. - Object storage mount is slow or disconnects. Increase the
rclonetimeout or use a different mount mode (e.g.,--vfs-cache-mode writes). Ensure your network bandwidth is sufficient. - Streaming service fails to write to new path. Check permissions:
sudo chown -R user:group /mnt/streamsand ensure the service user has write access.
Frequently Asked Questions
How much storage do I need for 24/7 streaming?
It depends on the bitrate. For example, a 5 Mbps stream uses about 2.25 GB per hour, so 24/7 that's ~54 GB/day. Multiply by your retention period to get the total needed.
Can I resize a disk while the server is running?
Most providers allow resizing while the VM is running, but the OS may need a reboot to see the new size. Some filesystems can be extended online, but a reboot is safer.
What's the maximum size for a single cloud disk?
Typically 16 TB for most providers (e.g., AWS EBS, GCP persistent disks). For more, you need to use multiple disks or object storage.
Is object storage suitable for live streaming?
No, object storage has high latency and isn't designed for real-time writes. Use it for archived recordings, not for the live stream output.
Do I need to stop my streaming service during the resize?
Not necessarily, but it's safer to stop writing to the disk during the resize to avoid data corruption. If you're just adding a new disk, you can keep streaming.
How do I move existing recordings to object storage?
Use a tool like rclone to copy files to your bucket, then delete them from the local disk. You can automate this with a cron job.