Hey, everyone, in this video, we are going to learn how we could implement advanced storage features
in our Linux system.
RedHat eight introduces the next generation volume management solution called Stratus.
Of course, that same feature or that same solution is available in Santos eight as well.
It uses thin provisioning by default.
Now, by the way, if you are using Red Hat or Santos seven, this feature is also available in Santos
7.5.
And later, the Stratus combines the process of creating logical volume management LLVM and the creation
of file system into one single management.
In LLVM, let's compare it with the LLVM.
In LLVM, if our file system gets full, you will have to extend it manually.
Well, whereas in Stratus it extends the file system automatically if it has available space in its
pool.
So in LLVM we have a volume group, so when the volume group let's say have 20 gig and your file system
has ten gig and it gets full, then you could actually go in and run the command lve extend to extend
that file system.
So but in Stratus it has made it a lot easier that as the file system grows, it will grow automatically.
You don't have to do nothing.
So in this lesson, we will learn how to manage multiple storage layers using Stratus local storage
management.
Okay, so here we have LLVM in LLVM.
If you notice the first on the left side, we have these physical disks.
So in my example you have for example, this two does, three does for disk five as many disks you have.
Then what you do is you combine all those disks and then you create a volume group with that volume
group created and then you go ahead and create a logical volumes.
With the logical volumes you create file system of of each logical volume and mount those file system.
Write well in Stratus, you have all those disks the same way as you have in LLVM.
You combine them and you put them in a pool.
For example, if you have a pool, these three three disks that we see on the left hand side, let's
say if they have ten gig each, so we combine them, we create a pool of 30 gig and then on top of that
we could simply create a file system, starting with, for example, ten gig.
Now, as we are adding space to our file system and it's keep going and growing and when it hits ten
gig and it needs, for example, another one gig or two gig, it will automatically extend that.
You don't have to go in and run LLVM extend command or anything.
Any manual process is needed.
It will automatically extend it up to the size of that pool, which is in our case, 30 gig.
All right, move on to actual workshop.
So to install the Stratus package, we will have to run command jam or DNF, install Stratus, Daschle
and another package, Stratus D, which is the daemon.
Then we will enable and start the service.
Then we will add a to five gig of new disk from our virtualization software, verify it at the OS level.
So to do that, we have we are using Oracle virtualization software layer and we'll create two new disks.
We will check that with the listing by listing the block disks.
Then we'll create a new stress pool and verify it.
And then we will go through extending our pool by adding the second disk.
First, we'll create the pool of of one five gig.
Then we add the next one, which is another five gig.
All right, So first thing first, let's go ahead and install our stratus packages that are needed to
manage it.
Okay, let me clear the screen.
So the very first thing we have to do is install the package.
So we'll do DNF or yum.
I would prefer that you do DNF so you could get used to it because DNF is going to replace your eventually
install stratus.
Daschle.
This is the command line that you would need and the demon stratus.
D minus y, meaning install all the dependency packages.
Just don't ask me.
Just simply go ahead and install them all.
But of course, before you run that, make sure your system has network connectivity because it's going
to go online under repositories and download those packages.
Okay.
That's pretty much --.
That was quick and the download and installation of these packages have been completed.
You could verify by running the command rpm q and grep for Stratus.
All right.
It is their strategies there.
And Travis Seely is there.
Beautiful.
Now, let's go ahead and enable the Stratus Service.
So for that, we will use System CTL.
Enable so it could start a boot time and do stratus.
D.
I'll check the status.
And it is loaded and inactive.
Now we need to start the service.
So we started check the status again to make sure the service is loaded, active and running.
And it is.
Okay, good.
So we got the required packages and services up.
Now, next thing is, now we need to add a two new disk through our virtualization into this virtual
box.
Okay, here we will go into settings.
There is one thing before you'd go into setting, What I want you to do is.
I want you to create a snapshot.
So in case you do some kind of misconfiguration, you could revert back to your snapshot to fix what
was done wrong.
So click click on Snapshot and click Take snapshot.
Name the snapshot, whatever that you do not want to do.
Snapshot.
For example, before Stratus.
Click.
Okay.
Okay, The snapshot is done Now In order to add the storage to your Linux machine, you have to power
off your Linux machine.
So go ahead and simply click on X and make sure you uncheck the restore current state and simply power
off the machine.
All right.
So machine has been powered off.
You could see right here it says powered off.
Now you go to settings.
Storage.
Click on the Control or SATA where you have your main primary disc.
You might see different disk names depending on your system.
You might see a couple of different other discs that were carved out earlier for LLVM practice.
Anyway, go ahead and click on right here.
Disc adds new storage attachment and hard disk.
And here I want you to click on Create.
VDI virtualbox disk image click next.
Dynamically allocated.
Leave that as is and I want you to pick five and click create.
Same thing.
Create another one.
Sorry.
Create.
VDI same process and click five.
Okay, So make sure you choose.
There's one that is added and 1a2 is added.
You need to add the second one again.
Click here again.
And right here, I'm sorry we picked two.
Now we need to pick three.
So both of them are at it.
Perfect.
Just make sure it's the right size.
Five gig.
Awesome.
Now go ahead and start your virtual machine.
Okay.
So verify those two discs has been added by running the command else list block device.
And you will see right here as DB for five gig as DC for five gig have been added.
Okay, So now you're going to create a new stratus pool and verify.
So for that, you run the command stratus pool, create the name of the pool, will just picking pool
one and the device dev as D.B..
And that's pretty much it.
Hit enter.
You got your problem back.
Verify that you got your pool created, Stratus pool list.
And here you have the list.
Okay, so you got your pool created.
Your pool name is right here.
The size is right here, and the physical size is right here.
Okay.
Now, what we need to do is we need to extend our pool.
Meaning?
We want to add this SDC into this pool.
Port.
That will do Stratus.
Pool.
Add dash data which pool re adding to pool one and which device as DC.
All right.
Now verified by running the stratus pool list and you will see it will show up right here as ten gigs.
So now our pool has been extended to ten gig.
All right.
Moving on to the next slide, we will create a new file system using Stratus, create a directory for
Mount Point and Mount File system, Create a snapshot for your file system and add an entry to FS tab.
All right.
Going back.
And so let's create a new file system now.
So let's clear the screen and type stratus file system.
Create.
Poole one.
And FS one.
So I just pick the name of the file system.
You could pick any name you would like.
What did I do wrong?
Oh, my Stratos command is wrong.
Okay.
Stratus file system, create pool one, FS one.
Now, let's verify if that file system is created successfully.
File system list.
All right.
It did it.
The pool is right here.
The file system is here.
And the file system size is 546, which means first file system will start with 546.
Because it does that, then provisioning it.
Always going to start with that and it will grow as you are adding more data to your file system.
Now it's time to create a directory so we could mount this file system to a directory.
So I'm going to choose a name.
Big data as the name of the directory.
Hit enter.
Now mount that file system stratus.
Sorry.
I'm missing in my.
Slide a missing dev here, so you could just put the dev stratus.
Cool.
One FS one.
Because if you notice right here, this is the actual device.
I skipped the dev directory anyway, you should not skip it because if you're following me as exactly
what I'm doing now, we have that amount.
Now where are we going to mount that?
We going to mount it to Big data, which is the directory that we created it.
Enter.
Perfect.
Now let's check if it is mounted.
LSB, l k list block devices.
And you're going to notice right here is this big data.
Big data.
It is going to show you a couple of times.
Three times.
It's just a how status create a record of its file system mount.
You can also do DF minus h command to see where your file system is mounted.
Right here.
This is your stratus file system.
It is thin provisioning, as you could see, and its size is one terabyte and it is mounted on big data.
Now you're probably thinking, Hey, isn't that supposed to be ten gigabytes, one terabyte?
Well, by default it's in the code off the stratus.
That's how it's built.
It will, it will always show you as a one terabyte.
So you could just simply ignore that.
But if you wanted to know the actual size, you could always run stratus.
File system list.
And it will give you the actual size that is being used.
All right.
Next thing is, we could create snapshots off of our file system.
And the command for that is Stratus File system snapshot.
It's not a poor name.
And file system, which is FS1 and what do you want to name that file system and you're going to create
a snapshot.
So for me, I'm just going to create FS one dash snap.
All right.
So it could take some time.
But again, it depends on the size of your file system.
Our file system size is ten gig, so it shouldn't take that long to create a new snap of that file system.
There you go.
It's done.
Let's verify it by running straight file system list.
And now you're going to see two file system.
One is FS one and one is FS one snap.
You see, it's become so easier in case you are doing some data, data warehousing, and you want to
create a copy of your entire file system.
That's the best way to go about it.
Now, the last thing that we have to do, which I'm just going to show you right here on the slide,
is if you want to add that entry into ZFS tab, in case you want this file system to be mounted at boot
time, and for that you have to do the juju uid equal to uid off the file system, which is right here.
This is the UAW.
You could get and slash the FS1 space x F first, which is the file system, type the default, and
then you have to put in these parameters in x dash system.
DD dot requires equals stratus dot service, which basically is telling FS tab that do not mount this
file system unless the system starts the stratus D daemon and then pretty much the same default options
at the end, which is 0-0.
So that's how you go about doing implementing the advanced storage feature using Stratus.