In This Tutorial We Are going To Learn How To Configure LVM In Linux And How To Create User And How To Mount User Over Lvm
Just follow These Simple Steps
Firstly Here Is The Command Of Creating Lvm Before Cteating LVM We Have To create A Partition Which Type Of Partition Is LVM
Here Is The Diagram you Can check
Step-1 Here How You Create Partition
fdisk -l
fdisk /dev/sda
n {for New Partition}
Select Partition 2
t {For Change The Type Of Partition}
8e {For Creating LVM Partition}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sda {For Refresh}
fdisk -l
fdisk /dev/sda
n {for New Partition}
Select Partition 3
t {For Change The Type Of Partition}
8e {For Creating LVM Partition}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sda {For Refresh}
fdisk -l
fdisk /dev/sdb
n {for New Partition}
Select Partition 1
t {For Change The Type Of Partition}
8e {For Creating LVM Partition}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sdb {For Refresh}
fdisk -l
fdisk /dev/sdb
n {for New Partition}
Select Partition 2
t {For Change The Type Of Partition}
8e {For Creating LVM Partition}
p {For Check Partition Is created Or Not}
w {For Save}
Partprobe /Dev/Sdb {For Refresh}
Step-2 Here Is The Coding Of Creating Lvm
#pvs
#vgcreate vg00 /dev/sda2 /dev/sda3 /dev/sdb1 /dev/sdb2
#vgs
#lvcreate -L+800M -n Lv1 vg00
#lvs
#lvcreate -L+800M -n Lv2 vg00
#lvs
Step-3 Now Our First Portion Of Create Lvm Is Complete Now We Have To Format The Lvm Then We Have To Mount The Folder Over LVM After Then We Have To Create User
#mkfs.ext3 /dev/vg00/lv1
#mkfs.ext3 /dev/vg00/lv2
Now We Have To Create User
Step-4 Now we Have To Mount The /data Folder Over Lvm
#Mkdir /data {Mkdir Command is Used For Creating Folder}
#mkdir /hacking
#cd /hacking
#mkdir ccna
#mkdir linux
#cd ..
#mount /dev/vg00/lv1 /data/hacking/ccna
#mount /dev/vg00/lv2/data/hacking/linux
#df -h {for Check Folder Is Mountd Or Not}
#cd ccna
#useradd CCNA
#useradd LINUX
#passwd -d CCNA
#passwd -d LINUX
#useradd -d /data/hacking/ccna CCNA
#useradd -d /data/hacking/linux LINUX
Step-5 How To Check User is Created Or Not
Here IS The Command
#cat /etc/passwd