How to mount additional disk space in 1and1’s Cloud Server

- by

Tux Linux IconI’ve just ordered a new Dynamic Cloud Server with 1&1 with a total of 800GB disk space. They rock, but they come with a minor inconvenience: due to the way these server instances are allocated, 1&1 do not automatically extend the partition for you – so you can’t actually start using the full amount you’ve ordered.

Here’s how to make use of the full disk space on a current file system:

df -h
shows all partitions we want to grow, in my case /var is mounted on /dev/mapper/vg00-var so that’s the one I want to grow

pvs
shows us how much free space is unallocated – in my case that’s 707.04 GB

lvextend -L +707G /dev/mapper/vg00-var
will increase our logical volume, leaving a few unused mega bytes lying around. Let’s see how many with

pvs
again shows us the remaining space in MB, in my case 44MB

lvextend -L +44M /dev/mapper/vg00-var
will bolt those on too. So far so good.

resize2fs /dev/mapper/vg00-var
works on LVM filesystems and will add the disk space to the partition we’ve mounted as /var. Don’t worry, this can take a moment or two.

df -h
confirms that we now have 739.04GB of space available on our server. Nice!

Don’t forget to detect the hardware changes in Plesk Health Monitor.

Further Reading



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

1 thought on “How to mount additional disk space in 1and1’s Cloud Server”

  1. If you get an error messages and neither of these commands are found, make sure to install the lvm2 package:

    yum install lvm2
    

Leave a Comment!

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