This lesson is about adding and extending disc using logical volume management.
Now, why do we need to extend a disc?
So if we have a disc already in our system, in a limbic system and let's say if that disk becomes full,
it's 100 percent.
So you have this disk that is mounted on Oracle and the disk space of that Oracle is one gigabyte.
And now after, let's say, six months or a year, the database administrator comes back to you and
says, hey, I need more disc space for Oracle because we've been doing a lot of work.
The productivity has been increasing every day.
The data is increasing every day.
So, of course, eventually the databases gets bigger and bigger.
So Slagel gets bigger.
So what options do you have?
Well, we can look at a few options.
No one would be like delete some of the old files to free up displays.
Right.
That's what the basic thing is.
So if you have your room that is fully cluttered and you don't have a room to walk around, what do
you do?
You take out all the stuff and throw it away, right?
I hope so.
Right.
OK, so the other options that we have is add a new physical disk and mounted to slash Oracle to meaning
that if you have a physical system, then you could add a new disk in this physical system if and only
if you have to slot an extra slot to add an extra disk to that physical system.
If you have it perfect, you could partition it, you could configure it at your grade level and then
you can mount it on Google, too.
Or if you have a virtual environment, which is the perfect scenario.
And that's why I love virtual environ, because you don't really have to actually pull your server out,
open the top and add a new disk.
So if you have a virtual disk, all you have to do is go to your VM and add a new disk and it takes
literally a few seconds to do that.
So and then once you add that, you do the same thing, slash Oracle, too.
Now, I wanted to extend my slash oracle.
I don't want to create another petition or another Mount Point like Oracle to then what do I do?
Well, you will be out of luck if you had not used LVM initially.
If you have, then, my friend, you are in luck, then you would extend your oracle through logical
volume manager.
So no matter how many disk you attach external disk or until this doesn't really matter, all you have
to do is create a partition of the disk and then attach that disk within the same group that you created
for Oracle Nonpoint.
Now, how does it work?
Let's get into a Linux machine to find out.
Now, before we get into a Linux machine, let's add let's assume that we don't have a disk space and
we wanted to add a new disk to our virtual machine.
So let's go to our machine powered off, of course, make sure it's powered off every time you have
to add a new disk or add resources, go to setting goals, storage, and then you'll see you have three
disk.
The first one you have is about your own Linux operating system disks that you created initially.
I think it's like 10 gig.
The second one you have is about that data disk and the third one we added Oracle Data Oracle, which
is one game.
So let's click here and you will notice right here the virtual disk size is one gig, but of course
it is running out of space.
We could extend it.
Now, remember one thing, other virtual environment like of enterprise level VMware or even Oracle
or read about the environment.
You will be able to extend this this space right here by by clicking and clicking on extend disk.
But I believe since this is a PC version, person version of virtual environments, you cannot extend
that.
So what do you have to do?
You click on your controller, add a new disk, add hard disk, create new disk, VDI next, dynamically
allocated next.
And the name you could just name the same way as the other one data oracle and put one here because
of course you can unnamed.
Exact same because.
Will be a conflict.
So now this is the second disc.
You know what it's better you put to this way, it's easier to differentiate the first one and the second
one.
So this is a two.
And I want to give it another extra one game to get one gig and click create.
So it has created two discs.
So basically what we are doing here is we are combining Oracle data, so data oracle with our data,
Oracle two.
So that is done.
Now click.
OK, go ahead.
Hit power on or start.
OK, so we have logged into our Linux machine, go ahead and become root.
Now let's run the Demises command and the disk or the petition that we are trying to extend.
Is this right here?
So if you look at it right now, this petition is mounted on Oracle and that this size is nine nine
seven, which is like a one gig, uses 33 meg and it's nine 65.
Now, we are assuming that right now the usage is instead of four, it's 100 percent.
So once we are going to add additional disk space to it instead of nine nine seven megabyte, it'll
become too great.
So let's go to our command at disk slash.
Well, let's pipe it to more and let's see what are the disk we have available then.
Steet, which is the root disk where we did installation CDB is where we did we created our data disk.
Then we have SDC, which is the Oracle disk that we used.
So now we should also have the new one, which we just created with the label SD D.
Let's see, hit enter.
See, right here, you just have to be very careful, because sometimes you throw so much information
on the screen, you can't really see where your desk is anyway.
So that's the desk s d d.
This is our new desk with one gig.
So now we going to do we're going to partition that desk the same way we partition any other desk whenever
we create a new one.
So to partition that desk, you run at desk slash dev just as D d and this is going to be your new desk
and end for new P for primary desk hit.
Enter for default or just hit one.
Would you like hit twenty 48 or just hit enter to default hit enter again for default value people petition.
You will see right here it is empty.
As soon as I assign a E to it it will see Linux, LVM, so Hitti again and again.
And you see this is a list of all the available file types that we assigned to it.
So we just pick eight E again for next LVM hit Enter again and now you'll see Linux LVM.
Now this is the system that's using its type of file.
It's going to be assigning it to now you hit W to create that partition so that partition is created.
The partition is SDD one you could do F desk again, hit out and do pipefitter more and you will see
as did one.
So right here, SDD one, it is created perfect.
All right.
So now you could just reboot the system real quick.
So it is updated to in the system again.
OK, once you have your system back online, you can log back in and become route
to a disk cell again and this time just typed SDD one just to make sure it's there if it's there.
Now it's time to extend the file system.
Slash, slash, mappa, slash Oracle, vtg dash oracle, underscore Elwick.
We are extending this one so the file system gets bigger.
So first we do Peevey display this will show us which group is associated with which disk.
So our concern is right here.
This one is DC one and it is associated with group Oracle Slash Reiji.
You can also run PB's.
It will also give you the same is pretty much the same information.
This disk is associated with this group.
So we want to add a new disk within this group.
And once we add that new disk that we created, then we will extend the group and we'll extend the logical
Wallingham as well.
So let's do the big display and let's do on our Oracle underscore Viji.
This is our group.
So you will see it also tells you the volume group size is 10 20 megabyte, which again, of course
is one gig.
So now let's create physical volume.
So we create slash dev, slash SDD one because we always have to create physical volume.
So it is successfully created.
Now we do the G extend.
We are extending the group, which is a group named Oracle
V G and we are associating that to s slash s so dev SDD one.
OK, so now it is extended with that disk partition because if you just say Viji extend Oracle underscore
vtg it will say hey I will extend it, that's fine.
But which disk I should leverage on our step on or included that disk within me to extend.
So you have to define that the disk is slash dev slash SDD one.
OK, so now that is done.
Now let's do of logical volume extend.
So logical wiliam extend is right here so you have to specify the size which is the command is minus
L and plus the size.
So one zero two four which is one gig.
So just put Meg here and then you specify dev mapper.
Now, which is right here.
What I would do is I would just move that, go up to RF disk command and I will just copy this entire
thing so I won't make a mistake because this is the logical volume that eventually you want to extend
and now it come down and paste it right here.
OK, so now we have extended and it says logical volume.
Oracle and the Security Oracle underscore Elvie successfully resized.
Awesome.
Let's extend the file system and the command to extend the file system as xpress underscore
grrl file system and then you hit Paiste hit enter and that should grow your file system DMI H and now
you will see slash dev slash mapa underscore Viji to Gayathri.
Oracle is now to gig.
Remember we had at one gig, now it's two gig.
That's how you extend a file system.
Once you extend it, you go back to your Oracle guy, tell him you have added new stories to your existing
mom point you did not have to create Flash Oracle to.