VM con SSD local en GCP

Guía para configurar una VM con Local SSD en GCP: crear, formatear, montar y gestionar persistencia, con recomendaciones de rendimiento y cuándo elegir Local SSD frente a PD.

30 ago 2025 • 3 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Part-33: Configuración de VM con Local SSD en Google Cloud Platform GCP

Introducción: Al desplegar cargas de trabajo en Google Cloud se suele elegir entre Persistent Disks PDs y Local SSDs. Persistent Disks son duraderos, se adjuntan por red, se pueden redimensionar, respaldar con snapshots y sobreviven a reinicios de la VM. Local SSDs están físicamente conectados al host, ofrecen rendimiento extremo en IOPS y throughput, pero son efímeros y los datos no persisten si la VM se elimina a menos que se preserve explícitamente al detenerla.

Paso 1 Crear VM con Local SSD Desde la consola: Vaya a Compute Engine VM Instances Create Instance; Nombre demo9-vm-localssd; Región us-central1; Zona us-central1-a; Machine family N2; Machine type n2-standard-2; Boot Disk Debian 9; En Advanced Options Disks Add Local SSD; Haga clic en Create. Comando equivalente CLI: gcloud compute instances create demo9-vm-localssd --project=gcpdemos --zone=us-central1-a --machine-type=n2-standard-2 --network-interface=subnet=default --tags=http-server --local-ssd=interface=NVME

Paso 2 Formatear y montar el SSD Conéctese a la VM: gcloud compute ssh --zone us-central1-a demo9-vm-localssd --project gcpdemos. Ver dispositivos de bloque: sudo lsblk. Formatear con ext4: sudo mkfs.ext4 -F /dev/nvme0n1. Crear punto de montaje y montar: sudo mkdir -p /mnt/disks/disk1ssd; sudo mount /dev/nvme0n1 /mnt/disks/disk1ssd; sudo chmod a+w /mnt/disks/disk1ssd. Verificar montaje: sudo df -h. Debería ver /dev/nvme0n1 montado en /mnt/disks/disk1ssd.

Paso 3 Auto montaje tras reinicio Los Local SSDs no se montan automáticamente tras un reinicio a menos que se configure fstab. Haga copia de seguridad de fstab: sudo cp /etc/fstab /etc/fstab_backup_before_localssd. Obtener UUID: sudo blkid -s UUID. Añadir entrada a fstab: echo UUID=[TU-UUID-AQUI] /mnt/disks/disk1ssd ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab. Verificar: cat /etc/fstab.

Paso 4 Probar el SSD Escribir un archivo de prueba: echo Welcome to GCP Local SSD - Host: $(hostname) | sudo tee /mnt/disks/disk1ssd/localssd.html; cat /mnt/disks/disk1ssd/localssd.html. Reiniciar la VM: sudo reboot. Reconectar y verificar que el SSD se remonta y que el archivo persiste: df -h; ls -lrt /mnt/disks/disk1ssd/; cat /mnt/disks/disk1ssd/localssd.html.

Paso 5 Notas importantes sobre Local SSDs Al detener la VM debe decidir si preservar o descartar los datos del SSD. Flags relevantes: --discard-local-ssd=True para descartar datos y --discard-local-ssd=False para preservar datos con coste asociado. Ejemplo detener la VM preservando el SSD: gcloud compute instances stop demo9-vm-localssd --zone=us-central1-a --discard-local-ssd=False.

Paso 6 Limpieza Parar VM: gcloud compute instances stop demo9-vm-localssd --zone=us-central1-a. Eliminar VM: gcloud compute instances delete demo9-vm-localssd --zone=us-central1-a.

Conclusión y recomendaciones Persistencia y snapshots son puntos fuertes de los Persistent Disks. Local SSDs ofrecen rendimiento extremo para cargas temporales de alta demanda como caching, bases de datos replicadas o procesamiento intensivo, pero requieren manejo cuidadoso por su naturaleza efímera. Para arquitecturas críticas combine Local SSDs con réplicas, backups y estrategias de recuperación.

Sobre Q2BSTUDIO Q2BSTUDIO es una empresa de desarrollo de software y aplicaciones a medida especializada en soluciones innovadoras. Ofrecemos software a medida, aplicaciones a medida, servicios de inteligencia artificial e IA para empresas, agentes IA, ciberseguridad y servicios cloud AWS y Azure. También desarrollamos soluciones de servicios inteligencia de negocio y dashboards en Power BI para mejorar la toma de decisiones. Nuestro equipo integra experiencia en desarrollo a medida, inteligencia artificial y ciberseguridad para entregar proyectos seguros y optimizados que impulsan el crecimiento de su negocio.

Palabras clave aplicadas para SEO 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

Contacto y siguiente paso Si desea que Q2BSTUDIO le ayude a diseñar y desplegar VMs optimizadas con Local SSDs o arquitecturas híbridas en GCP AWS o Azure contacte a nuestro equipo para una consultoría personalizada y soluciones a medida.

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.

Live Chat