Solucionando No Space Left on Device con un toque de AWS

Descubre cómo resolver el espacio limitado en Ubuntu montando un bucket S3 con s3fs y créditos gratuitos de AWS para respaldos sin ampliar el VPS. Guía y consejos de seguridad.

1 sept 2025 • 3 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Cómo resolver el temido mensaje sin espacio en el dispositivo usando un pequeño truco con AWS y sin tocar el tamaño de tu servidor

Un día el servidor Ubuntu empezó a avisar de poco espacio disponible y los respaldos de GitLab crecían sin parar. En lugar de ampliar el disco o borrar datos valiosos, aproveché créditos gratuitos de AWS y monté un bucket de S3 como si fuese una carpeta local. Resultado práctico y económico para equipos pequeños.

La herramienta clave es s3fs, que permite montar un bucket S3 como sistema de archivos FUSE. Con esto tu servidor pequeño puede escribir y leer como si tuviera almacenamiento prácticamente ilimitado, mientras S3 se encarga del espacio. A continuación dejo los pasos que seguí.

Paso 1 Instalación de s3fs en Ubuntu

sudo apt-get update

sudo apt-get install s3fs -y

Paso 2 Credenciales de AWS

Crea un archivo seguro con las claves de acceso IAM de solo lo necesario para ese bucket

echo AWS_ACCESS_KEY_ID:AWS_SECRET_ACCESS_KEY > ~/.passwd-s3fs

chmod 600 ~/.passwd-s3fs

Paso 3 Punto de montaje local

sudo mkdir -p /mnt/gitlab_backups

Paso 4 Montar el bucket S3 como carpeta

s3fs nombre-de-tu-bucket /mnt/gitlab_backups -o passwd_file=/home/ubuntu/.passwd-s3fs -o url=https://s3.ap-south-1.amazonaws.com -o endpoint=ap-south-1 -o use_path_request_style -o allow_other

Con esto /mnt/gitlab_backups queda disponible y listo para recibir tus respaldos. S3 suele reportar una capacidad enorme a modo referencial, sentirás que el límite desaparece.

Paso 5 Verificación

df -h | grep s3fs

Paso 6 Permitir acceso a otros usuarios del sistema opcional

Edita el archivo /etc/fuse.conf y agrega la línea user_allow_other. Vuelve a montar con la opción -o allow_other para que servicios como los jobs de GitLab puedan escribir en la ruta montada.

Paso 7 Desmontar y limpiar cuando sea necesario

sudo umount /mnt/gitlab_backups

sudo apt-get remove --purge s3fs -y

Consejos rápidos

Usa un usuario IAM con permisos mínimos para el bucket concreto. Considera cifrado del lado del servidor en S3 y políticas de ciclo de vida para mover a Glacier o expirar backups antiguos. Ten en cuenta que el rendimiento depende de la red y que S3 no es un disco POSIX local al cien por cien, pero para respaldos y archivos grandes va perfecto.

El beneficio

Sin ampliar el VPS y sin borrar respaldos, moví todo a S3 y el servidor volvió a estar ágil. Es como tener un piso pequeño con un sótano infinito de AWS al que envías cajas sin preocuparte por el espacio.

Si tu equipo se enfrenta a límites de almacenamiento, a cuellos de botella o quieres modernizar tu estrategia de respaldo y recovery, en Q2BSTUDIO te ayudamos a diseñar una arquitectura robusta en la nube. Descubre nuestros servicios cloud AWS y Azure para transformar tu infraestructura con buenas prácticas, observabilidad y seguridad desde el inicio.

Además, integramos soluciones de automatización, agentes IA y analítica avanzada para sacar valor real de tus datos. Desde inteligencia artificial para empresas hasta servicios inteligencia de negocio y power bi, potenciamos tus operaciones con software a medida y aplicaciones a medida que escalan contigo. También contamos con expertos en ciberseguridad y pentesting para proteger tus activos digitales.

Palabras clave que nos definen aplicaciones a medida, software a medida, inteligencia artificial, ciberseguridad, servicios cloud aws y azure, servicios inteligencia de negocio, ia para empresas, agentes IA, power bi. Si necesitas llevar este enfoque a tu organización, en Q2BSTUDIO lo hacemos realidad con un acompañamiento de principio a fin.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.