How to create LVM(Logical Volume Manager) in Linux

What is Partition?

What is Logical Volume?

What is Volume Group?

What is Physical Volume?

Future Tech India/ Logical Volume Manager

Shutdown your VM and increase the disk size

#fdisk -l

Creating an LVM

#df -Th

Creating a PV

#pvcreate /dev/sdb (disk name)

Display physical volumes

#pvdisplay [disk_name (optional)]

#vgcreate [group_name][disk1][disk2]

#vgdisplay [group_name]

Creating Logical Volume

#lvcreate — size 14G — name [LV name][VG name]

# mkdir mount_point

#mount /dev/mapper/myvg_01-my_LVM mount_point

#df -Th

Increase Size of Logical Volume

Add newly created pv named /dev/vde to an existing lv

We can see disks from below

#fdisk -l

#vgextend myvg_01 /dev/sde

#vgdisplay myvg_01

#lvextend –size +5G /dev/myvg_01/my_LVM

#resize2fs /dev/mapper/myvg_01-my_LVM

#df -Th

--

--

--

We believe in making future tech leaders by providing right education to them. https://www.payumoney.com/webfronts/#/index/Expertise-on-Container

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Comparing Couch Potato to Hulu Watch Party

Create a Shell Script to Deploy JAR to Remote Linux Machine Automatically

Launching Collie — Your Open-Source CLI for Cloud Governance

Hack Day 1, August 2016

Down with the Krew — my favourite kubectl plugins

Understanding HashiCorp Configuration Language

America’s Culinary Dietitian Adds iOS Development to Her Skill

What is SaaS?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Future Techno India

Future Techno India

We believe in making future tech leaders by providing right education to them. https://www.payumoney.com/webfronts/#/index/Expertise-on-Container

More from Medium

How to Create Local Yum Repository on RHEL 8

Bash Basics and Navigating Directory Trees

Linux Series Part 3: process management

Getting Started with Linux Command Line Basics