Expanding your LVM with a new disk

Our Debian LVM was getting a bit full so we got two new 2TB drives. We’ll add one of these to our LVM to increase the space.

First of all check to see if your new disk has been seen by the  BIOS.

If it has great! If not might be worth rebooting to check if a SATA port needs turning on for instance.

Once the disk has been recognised by the system it will show up with the above command.

We now know that the disk is /dev/sdb. Thats good. We can now prepare it for use.

Hit ‘n’ to create a new partition. It should be primary (p)
choose the default partition number (usually 1)
I hit enter twice to use the full space.

Press ‘p’ and you should see something similar to this:

Press ‘t’ to change the partitions id. Use 8e as it’s going to be a Linux LVM.

Hit ‘w’ to write the changes.

Now lets create a volume:

Now we need to find the name of our existing volume group to add this volume too:


Great! Lets extend the id05 LVM to use /dev/sdb1 as well:

pvscan should now show us the physical volumes to confirm:

Now lets find the logical volume that we want to increase. The lvdisplay command will show them all:

Here we have 2 (the other one is a swap)  The one we want to make bigger is /dev/id05/root.

Now lets resize the filesystem (this may take some time!)

All done! Check your new lovely space out!

About Louis

Louis is a Developer and all round geek from the UK with a keen interest in web technologies and mobile applications. When not playing with code, he is probably rebuilding a Linux server or watching a Netflix marathon!
This entry was posted in Computing, Debian, Hardware, Linux. Bookmark the permalink.

Leave a Reply