Adding disk and creating a logical volume, your petition, you look at this picture now at the bottom
of the picture, you will see.
We have hard disk, hard disk one as the hardest to hardest three, so every hard disk, we create a
partition on top of it.
Now, if you are doing LVM on top of it, then you would have to create physical volume.
Physical volume has to be created for each partition.
Then we create a volume group.
This group will represent that entire physical volumes that that will be coming out of those disks.
And then we will create logical volumes once we have the logical volume, which will be exactly the
same as a standard volume.
But of course this will be under LVM and then we going to mount those logical volumes to our file system.
So this is how it works.
Let's get into our next machine and we'll try how it works again before we get into the next machine,
we have to go to Oracle Virtual Box and we will add a new disk to our commercial box.
OK, so this is our go to box, it is powered off, so make sure it is powered off, OK, go to the
setting.
Click on storage icon controller Sayda and then come down here and click on add new disc had a hard
disk, the concrete new disc leave the VDI default dynamically allocated default, pick a name, any
name that you like.
Let's say we're going to pick disc Oracle.
So if you if your database guy is coming to you and telling you, can I have an additional space and
you can label it according to the application, but again, it doesn't really matter.
And the size of the disk, I'm going to pick this one gig.
Then you click create.
So now it created and you simply click, OK, now once you're going to boot up the system, it will
have the new desk.
So let's start our system.
OK, so once you log in, you open up a terminal.
Now go ahead and become route.
OK, and Ron D.F., sorry about this myself.
Do it with more, the first desk you're going to see is the 10 gig is the one you created doing the
installation.
The second issue you have is for two gig that you created previously, and it's partition information.
And now the third disc you have, if you notice it has the third letter, SDC, which is right here,
well, one gig.
So the first gigs always starts with Steet, second Steve and the third one SDC.
So we already have the disk.
We confirm that.
So now let's start creating.
The petition, so now if you notice from the background, let's go back to our slide, the first one
is hardest.
We have confirmed we have the hard disk now let's create the partition.
So we are going to the partition.
If you see if you look at the picture, you will see on the green one.
Right.
About the discarded partition will go ahead and create those partition.
So to create the partition f disk space, slash dev, slash SDC because we are going to create disk
for the third, partition for the third disk and you hit click on new and to create a new partition
p for primary partition.
One as the first to partition, sorry, first partition that you want to create.
So by default it's one, so leave it as default and just hit enter four sectors.
All of us started to 048 and it is giving us by default to 048 and leave it default hit enter.
Now the size of the partition you want to create, I want to give the entire side said automatically
giving me the last sector of the disk.
So I'll just hit enter and I'll pick the depos value.
So once that is done, go ahead and click Puy.
So this will tell you that your partition has been created.
But again, this partition has not been written to the table yet until we do w, which is to write.
But at this time, since we are doing LVM, I want you to type T because we are going to change the
type of this partition.
Why.
What is T for.
If you type just help.
You'll see right here.
T is change partition system ID so we want to change to LVM.
So I want you to type T enter and here.
I want you to type L to see what are the tax code associated with LVM, so LVM is associated with eight
E that I know.
So eight E is somewhere here, right?
So it says LVM 80.
So just type eight.
So 80 and hit enter.
So now this has changed type of protection, Lennix to LVM to hit again to confirm, right.
See it right here, says Lennix, LVM now.
Now it is done.
Now go ahead and type W right to it now that it is sinking the disk.
Good.
So now are a partition table is created.
Now the next step, the next step is to create a physical volumes right here where it says the blue
ones as D one.
So the third step is to create physical volume, to create a physical volume.
We have to run command p.
V.
Create physical volume, create and the name of the volume, which is Deve SDC and the name of the petition.
Number one, then you go ahead and enter and it says successfully created to verify it.
You always do Peevey display, which is to petition volume display and it will tell you that it created
the volume with the information the size the p, the new physical volume, size 10 20 megabyte, which
is one game.
Now we have created the physical volume.
Now it's time to create the volume group.
So we are on the fourth step right here.
It says right here, if you notice volume growth.
So we going to create a volume growth.
The call to create a volume called the command is Viji Create.
And the name of the volume that you wanted to sign, so we're going to continue with our example, so
we're going to example of Oracle that we're going to pick Oracle underscore.
Elvie, you could pick any name, but I'm just being consistent.
So LV stands for Wallack volume, so I should pick Viji.
So volume growth.
So this will identified.
This is this group is for Oracle and now we are assigning this volume to Dev SDC one.
Right.
So I want you to go ahead and create hit enter.
And it says Volume Growth.
Oracle underscore Viji successfully created.
You could go ahead and verify it by running the command big
display and give the volume name, which is Oracle.
Underscore the cheap and it will give you the information about that group.
Now we are done with the volume group.
Now the fifth step is to create logical volumes right here, a logical volume.
Which is also just like a partition, so now to create a logical volume, you have to run the command,
Elvie create.
Then, minus any new particle, underscore the this is the name of the oracle, underscore Elwick the
size, the attached size as 1G because we have the size of 1G.
And where is it going to associated to to Oracle volume group Boko Haram and.
And it says volume group Oracle Viji has insufficient freespace to 55 distance, 256 required.
OK, I picked the exact same one.
So what I could do is instead of that, I could just pick one zero two three.
So if, you know, there is one zero two four megabyte makes one game.
So let's try that and hit em.
And it better still not enough, so I'll just pick Dowson, because it does need some of the space to
hold its LVM information.
OK, so it is the logical volume Oracle on Elvie is created.
We could verify it by running Elvie display.
And you will see right here it is created for that group.
OK, so now that is done.
Now we have to format the disk, assign the the file system to it.
So make a system that accepts.
To Deb.
Oracle Liji and Oracle Elvy this is the group.
Right here in the middle, and this is the logical volume that we just created, so we are assigning
Zephyrs filesystem to this partition.
So hit enter.
It had created.
Now now it's time to mount this logical volume to our directory wherever it is.
So I'm going to go ahead and create a new directorate, MKR mkdir and call it Oracle to create it now.
But I didn't mount it.
So how are you going to mount it?
We have to mount it.
Slashed the slash Oracle Viji slash Oracle Elvie Mountain.
Where to Oracle.
It has mounted.
Go ahead and do dormice h and you will see the D.F. minus H.
Yes, right here, all the way to the bottom.
It has a sign, this volume to this directory.
You could also unmount of human comment.
Anyway, this is how you create LVM, new partition, some of the commands are there.
You just have to remember those commands, how to run them.
What is the order that you have to run them again?
The order always goes by the layout that we have.
So first we have hard disk, then partition, then physical volume, then volume group, logical volume
and then mounted to the file system.