What’s the best way to add a second drive to my Ubuntu server for Docker?

0
2
Asked By TechSavvy42 On

I'm using a minimal install of Ubuntu server mainly for Docker, and I'm running low on disk space. I want to know what the best approach is when adding a second drive: should I extend the LVM or mount the new drive in the current filesystem and move my Docker files onto it? Also, will either option affect performance? Thanks!

3 Answers

Answered By DiskDude99 On

I learned this the hard way—using JBOD with LVM can look fine until one disk fails and takes down the whole volume. So be careful with that setup!

Answered By StorageWhiz On

This may also depend on how you're managing your disks. If you extend a logical volume to a second physical disk, you're essentially creating a JBOD setup. If the drives are the same size, MD RAID could be a better choice. If they're different sizes, you should keep them as separate disks. Since you're only using Docker and not VMs, mounting the new drive to the existing filesystem and moving your Docker data over might be simpler and could save you some hassle.

Answered By ContainerQueen On

Make sure to consider what you're running out of disk space for. Is it the Docker images, volumes, or something else? For instance, my largest container is a music database that takes up around 80GB. Just a thought!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.