Installing Ubuntu on LVM Partition

Step 1: Initiate the virtual machine and once it begins, opt for the “Try Ubuntu” option.

Step 2: Launch the terminal application and execute the command “sudo fdisk -l“. This command will display a list of available disks. Locate the two virtual hard disks that were created in the previous section and make note of their respective locations.

sudo fdisk -l

Listing all available disks

Step 3: In the next step, we will utilize the “pvcreate” command to create a physical volume of each virtual disk.

sudo pvcreate /dev/sda /dev/sdb

Creating a Physical Volume of Each Virtual Disk

Step 4: Now, let’s create a volume group that encompasses the LVM physical volumes you have created. Execute the following command to create the volume group named “ubuntu_vol_group“:

vgcreate ubuntu_vol_group /dev/sda /dev/sdb

Creating Volume Group

Listing Newly Created Volume Group

Step 4: Next, let’s create two volume groups. The first volume group will be allocated for the boot partition and should have a size of 512MB, while the second volume group will be designated for the root partition and should utilize the remaining available space.

sudo lvcreate -L 512M -n boot ubuntu_vol_group
sudo lvcreate -L 49.49G -n root ubuntu_vol_group

Creating two volume groups

Listing newly created two volume group

Step 5: At this point, you can start your Ubuntu installation by using the standard procedures.

Step 6: On the Installation Type page, choose the “Something Else” option.

Select the “Something Else” option and click Continue

Step 7: Select the LVM partitions that were previously created for the boot and root respectively.

Select the volumes respectively

Step 8: Click on the “Install Now” button, proceed with setting up your desired username and password, and initiate the installation of the operating system.

If you have diligently followed the instructions, you should now have a fully functional system installed on an LVM partition. It is important to note that this installation was performed within a virtual environment to avoid any potential complications with your actual system. You can utilize the same installation steps to install any operating system directly on your hardware. However, when installing on real hardware, there is no need to create virtual disks as outlined in this article.

Conclusion

By applying the knowledge gained from this article, you can confidently install and manage operating systems on your hardware, leveraging the benefits of LVM for efficient storage management. Remember to exercise caution when making changes to your real system and always ensure that you have appropriate backups in place.



Logical Volume Manager (LVM) Tutorial

In the vast realm of operating systems, Linux has emerged as a robust and versatile choice, powering everything from personal computers to enterprise-level servers. One of its standout features is Logical Volume Management (LVM), a powerful storage management system that offers enhanced flexibility, scalability, and reliability for handling storage devices in Linux environments. LVM revolutionizes how disk partitions and physical storage are managed, providing an abstract layer that simplifies storage administration and facilitates efficient utilization of available resources. By introducing logical volumes, volume groups, and physical books, LVM enables seamless storage management, allowing administrators to dynamically resize, migrate, and allocate storage space as per their evolving needs.

Throughout the article, we will provide real-world examples and command-line instructions, enabling readers to follow along and gain hands-on experience with LVM.

Similar Reads

Environment Setup

Note: If you have already set up your virtual machine, you may skip the setup portion and proceed directly to the installation steps. Please ensure that you have two virtual hard disks attached to your machine before continuing....

Installing Ubuntu on LVM Partition

Step 1: Initiate the virtual machine and once it begins, opt for the “Try Ubuntu” option....