Add an additional volume as an extension to my main disk

Hi, I am looking for an way to extend the main hard drive space by adding an additional volume and using this volume as an "extension" of my main hard drive. I was curious if anyone knew if this was possible?

Thank you!

6 Replies

You can mount a block storage volume as follows:

sudo mkdir /ext
sudo mount /dev/sdX /ext

Your block storage volume is now accessible as /ext/*.

If you want /dev/sdX to be automatically included in /, you'll have to use LVM or ZFS (beyond the scope of this question…).

-- sw

That is correct.

My main drive which is mounted on /

I would like to combine my /mnt/extrastorage volume drive so I don't need to manually add /mnt/extrastorage to everything when I need information to be stored there.

I've played around with LVM but I'm inexperienced with doing so on a VMS. Any good tutorials that would do this?

Thank you!

Also please be aware that switching your disks to LVM will cause some functions of the Linode platform to stop working.

Anything that requires mounting your disk as an ext4 filesystem. I believe this to be: automatic resizes when moving to a higher Linode plan with more disk space, root password change and backups.

@andysh writes:

Anything that requires mounting your disk as an ext4 filesystem. I believe this to be: automatic resizes when moving to a higher Linode plan with more disk space, root password change and backups.

I believe snapshots are in this list as well (same as backups really…).

-- sw

If you want /dev/sdX to be automatically included in /, you'll have to use LVM or ZFS (beyond the scope of this question…).

@stevewi I want to do this. Please guide me.

You don't want to do this. Just about every service on a Linode that involves disc space requires an ext3/ext4 file system to function properly. LVM file systems are neither. I have no idea if your system can boot from an LVM volume… The system I tried it on was a home system that had a different physical device (an SD card) as the boot drive. My guess is that you'll have to re-partition your disc space (into /boot and everything else).

However, if you really want to try this, see here:

https://linuxhandbook.com/lvm-guide/

Hint: Try this on a different server that your production Linode.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct