Storage.
OK, what is storage?
Storage is, of course, is a hard disk in your computer, right when you go buy a computer.
What do you look for?
You look for memory.
You look for CPU and that thing.
You look for how much disk space it has.
So there are three types of storage that are attach to your computer.
The first one is local storage, which is inside of your computer, which comes pre-built, reconfigured
inside of your computer.
The second type of storage is San.
It stands for Storage Area Network.
What it does, it attaches to your computer through fiber.
Cable fiber cables are now coming in with a gig of speed and 16 gigabit of speed.
So anything that is attaches to your computer through fiber cable and your fiber cable adapter that
as a storage area network.
And the third one is NÁS, which is network attached storage, which means anything that you attaches
to your computer through Nafez or through an IP or through a Cat five cable, anything that is attached
that is NASSE.
Also in Windows.
Sambor is attached through the IP and the folder and it is shared from a remote computer and then you
mount it to your computer.
And that type of atash storage is called Nasse.
The reason I am including this storage lesson in this in this training is because many times you will
be asked in your interview that what kind of stories you have worked on or if you know anything about
what San is or what NASA's.
So please be familiar, spend some more time and Google it if you have to, to find out what exactly
these stories are.
Disputations in this lesson, we will learn a couple of commands that are used to to show which filesystem
has been partitioned, whereas a petition to and what is your local filesystem DESC size?
The first command is D.F., which tells you your disconfirmation, how much disk is used, where is
it partition to?
And the second one to tell you how much the disk total size is and how many petition's has been created
out of the disk.
So let's try both of these disk commands in our Linux environment.
The first Kaimanawa to type is just D.F. and just by typing D.F., the first column is tell you where
is this file system is coming from the size use available in percentage and mounted.
You could run D.F. minus eight command and you will get the human readable output which will be in gigabyte,
the percentage.
And which where is it mounted to.
The next comment is F disc f desc without any option is now going to give you anything.
So oftentimes it is used with an option minus L when you type F dis minus L, you will see right here
the disc size.
Let me do let me make this a little bigger.
OK, so when we type F minus L, you will see that the disc is petition to slash Dev SDA just one petition
and it is 10 gig of space.
And right here it is telling you it is mounted on SDK one, which is Linux and the other one is sorry.
The first one is the swap and the one is the actual disk.
And it gives you some more information about the disk.
What is each size mounted for, if you'd notice here?
The first one.
The second one.
Here is his S.O.S Foop, and I created a swap for one gig and that's what it's telling me, that the
SEC this the first partition, which is right here, is my Montello swap and the rest is mounted on
our dev map or Centaurus Root, and which is almost eight and a half KIC.
So that's why these files of these commands are used for.
It is very useful when you want to add a new disk to your system and then after adding it, you want
to initialize it, you want to partition it and you want to mount it to you, to your mom points.
Adding desk and creating new petition now this time we're going to talk about how can we add a new desk
to our existing Linux system and then create a petition, of course, mount that petition.
The purpose behind adding a desk is most of the time you run out of this space or sometimes when your
computer running multiple application, maybe one petition is required for one application and the other
petition is required for another application.
So that's why you add a new disc's.
And, of course, the commands that we will be using in this lesson in Oregon, death and desk, before
we get into the next machine, I want you to open up your Oracle virtual box, because that's where
we're going to add the virtual disk.
Since we do not have a physical server that we're working on in a physical system, you would, of course,
have to pull the server out, add a new disk if you have a slot and then bring the system.
But now, since we are working on a virtual environment, it's a lot easier to add disk.
Let's go into our virtual box.
OK, this is our shoebox before we could do anything, I want you to if you are not on the screen,
if you are on this screen, I want you to go to snapshot right here and create a snapshot.
And just name it anything you want that will make you remember snap shot before heading desk click,
OK?
The reason I'm creating the snapshot is in case you make a mistake while adding a desk.
This will make your system unable to put.
So it's always easier to report back to your original snapshot to this where you don't lose anything.
So now, since you have the snapshot, it's done.
Now I want you to go setting and then go to storage and click on controller.
And then click on ADD new disc.
And it will ask you optical device, which is CD rom or add a new disc, so just click on add a new
disc, it will ask you, do you want to choose an existing disc or create a new one?
Click on your desk.
Leave the default by mousepox desk image click next.
Dynamically allocated, that is OK, keep in default.
And pick a name, any name you like, let's call it data desk, and I want you to pick two gig instead
of eight gig 2.0 space and GBE click on CREATE.
So once you create, you will see you have a new desk.
Now click OK.
So now it's time to power on your machines, you click on start.
OK, now I want you to become moot.
OK, randomisation come in and you'll see right here, this is the main desk that we have is mounted
on route now run F disk minus L.
You could do more because it will come up with additional information.
So when you do more, you'll notice the first step that we have the we added while we were building
the system the first time is what we get, which is there, and it is SDA and it has two partitions,
one for swap and one for the M.
The second is that we add it is right here.
You notice this desk has two one four seven megabyte, which is about two gig and has unit sectors and
all the information there.
The other two information, this one is about the partition information about the first disk.
This one is telling you the center was route partition and the swap partition.
So we have to work on this one, which is the new one that we added.
Now I want you to run half disk.
Slash Dev, slash SDP, which is the name of the disc.
They are using utility ethics to create a new petition, so he had hit enter when you hit enter, you
will notice it will bring up to the FTC menu or at FTC.
Paul will tell you.
Welcome to the FTC.
Utility changes will remain in memory only until you decide to write them.
Be careful before using the right command.
Of course we are careful.
If you make a mistake, we could always revert back to a snapshot.
So now in this menu you have a different command, but type helped, so you will see the different commands
that are available for us.
Here are the lists of different commands.
You could review it one by one.
The one we need to pick is this one new because we are creating a new partition.
So click and Venu now, what is this petition type primary or extended via primary, doing it, doing
a new desk.
So click P or just hit enter because by default is picking P, then primary petition no default one,
pick one, type one or just enter the sector to 048.
Yes, I want to leave the default to 048.
The last sector is for one 940, two or three.
That is finally with default.
If you want to change that, the size of this petition you see right here it same size.
So let's say if you want to create to petition and each one gig then you could do is plus one and G
and this will create one petition.
So we want to use the entire desk to his desk for one petition.
That's fine.
So now it's done says it.
Petition one of Linux type type Linux, end of size two is set now.
It is not created until we do W.S. right here.
This is right table to disk.
And if you remember at the beginning when we were F desk, it says it will be in memory until you do
w w hit enter and it is done.
Calling Ottone what to reread petition tabled thinking this done so now the disk is done.
If you run f disk again on just myself and you will see right here then as DB one automatically when
you create one petition, first petition it assigns the number one.
Now the.
Volume is created.
Now we have to assign a file system type, so if you remember, file system types are like a different
type of file systems.
We have X, Etext, two, three, four, Zephyrs, Activia and TFSA.
There are different types of file system.
The latest one that we have in Lennix is X efforts to make that file system you have to run command
M.K. FRSS make file system dot x surface.
This is a command and then you have to specify your volume as DEEDI one, which is a device of course,
and you hit enter.
When you hit enter you will get all their message, but all the details, how the file system created
what the other information size sector and a whole bunch of stuff.
So now it is created.
Now what do we do with that?
Now we have to mount it to a certain point.
That's why we make we're going to make a use out of it.
Right.
So I want you to create a directory and Kadivar under route and call it data center.
Now, this is created.
If you do this to slash, you will see it is created right here.
Now, are we going to mount that to our petition?
So the command will be mount slash, dev slash as DB one, which is our volume space data.
So we are mounting that petition that we created to a file system, to a directory that we just created
slash data center.
It is mounted.
How do we verify?
Now you run the F minus H and you will see.
Right here at the bottom, it created our petition.
There you go, see, so now we could right to it, whatever that we wanted to do.
Now, every time your system reboots, it will now mount this.
So how can you make make it enable that it will get mounted.
And a system reboot is you have to add an entry into a Farstad file tab, has all the information about
your petitions.
You had it come down all the way to the bottom, Pithole and use to add a new line then type slash dev
sd b one.
Remember, this is the volume, right?
We created a new partition tab where our remounting it to be mounting it to slash data, right.
Yes.
Then tab the next one column is what type of system is it.
Is X as file system tab.
Then the rest leave that default and then tab zero tab zero.
Those two zeros that are added mean something.
These are the options that it would run file system check when the system but are not.
So you could look into it in more detail by running man on that first tab command just type man if tab
or just search it online and you will find meaning of every field in it.
Make sure you don't make mistake.
If you make a mistake you will have a problem booting your system.
Then you would have to revert back to your snapshot.
That's why I ask you to create a snapshot again, read it again and make sure you are typing it correctly.
So now it's done it escape, right?
Quit and enter.
So now when I do in it's six, you'll see the system will boot and when it boots up it will have that
slash data mounted.
OK, when you log in, open up a terminal and now D minus H and you will see right here, then CDB one
is automatically mounted.
And the reason it is mounted is because we have that added in our first tab file to unmount it.
If you want to unmowed, for example, just become root and hit into your password and type you mount
slash at the point hit enter and you will see it is gone.
It's no longer there.
If you want to mount bakin mounted again, you have to run, mount the whole command or you could simply
type Mount Mindstate.
What this will do is it will go into at CFS tab and see what are the mounts, what other file petition
that I have to mount.
And it was mounted.
All of them.
You see the bottom, it mounted back again.
So anyway, you could leave that data in, you could leave this disc if you want to, or you could remove
it.
It's up to you.
But if you had made a mistake and your system is not coming up, you could always go back to your Oracle
a box and then you could stop your machine and revert back.