Thursday, February 16, 2023

Building a DIY Cloud Platform with a Raspberry Pi and the Argon EON: How to Use Ubuntu's Logical Volume Management System for Maximum Storage Efficiency


In a previous post, I talked about the Argon EON, which is a device that allows you to connect four hard drives (two 3.5" drives and two 2.5" drives) to a Raspberry Pi. I've been using this device as a network-attached storage (NAS) to back up our main NAS at home, using Open Media Vault (OMV) for management.

OMV is a package that enables you to quickly set up and manage a home server. One of the benefits of OMV is that it offers plugins that allow you to customize the features of the server installation. I found the MergerFS plugin helpful to create a virtual file system that spans the different drives. However, I wasn't able to create a RAID, as the 3.5" drives were significantly larger than the 2.5" drives.

Since I wanted to use the Raspberry Pi in the Argon EON to try out some locally hosted cloud platforms, I wanted to make sure that I could use the collection of drives in the case for this installation. Unfortunately, I didn't find similar plugins to span multiple file systems in Nextcloud or OwnCloud. So I decided to manually create a logical volume with Ubuntu's Logical Volume Management (LVM) system.

Creating the logical volume was pretty easy with a clean install of Ubuntu Server 22.04.1 LTS. The first thing I did was use fdisk to delete the existing partitions and create new ones on the drives. Then I used pvcreate to create physical volumes in LVM for each of the drives:

sudo pvcreate /dev/sda1
sudo pvcreate /dev/sdb1
sudo pvcreate /dev/sdd1
sudo pvcreate /dev/sde1

Next, I used vgcreate to create a volume group across the drives:

sudo vgcreate StorageVG /dev/sda1 /dev/sdb1 /dev/sdd1 /dev/sde1

Then I used lvcreate to create a logical volume for the volume group:

sudo lvcreate -l 100%FREE -n StorageLV StorageVG

Finally, I edited the fstab to mount the volume automatically on boot. This allowed me to use the collection of drives in the Argon EON for my locally hosted cloud platform installation.

No comments:

Post a Comment

Empowering Your Home's Power Protection: A Deep Dive into UPS Monitoring and Integration

Our household relies on several Uninterruptible Power Supplies (UPSs) to safeguard our network equipment and computers. A crucial aspect of ...