All right.
So you needed to create a new file system.
In case you don't have the partition,
you need to start by creating the partition.
It happens that I had a technical issue,
and for that reason, I needed to change my machine.
So I'm going to create a new partition on my SDB device,
making a partition number 3 and with a size of 4 gigabytes.
There we go.
W to write.
And now I can create my file system MKXFS on dev SDB 3.
Now, MKXFS is not the only thing that we wanted in this lab.
We also wanted to generate a new UUID.
So let me start by showing you block ID.
And block ID, or BLKKID, is showing the current UUID
that has been generated right here.
Notice the name.
It ends 9AE3.
So if I want to generate a new UUID,
I can use XFS admin minus U generate on dev SDB 3.
And there you can see that the new UUID has been generated.
And block ID is going to confirm that SDB 3 doesn't end in AE3
anymore.
So here we have it.
This is the UUID.
Now, I want to show you something cool.
I want to mount this file system by using the UUID.
Of course, in a graphical user interface,
you can easily use your mouse.
But what are you going to do in a non-graphical user interface?
Well, there I would use BLKKID.
And I would use a pipe and send the output to AWK.
And next, I'm going to tell AWK to look for SDB 3.
And then I want it to print $2, which is the second field.
And there we go.
Here we have the UUID.
Now that I have isolated my UUID from the command line,
I can use command line redirection.
Don't forget to use a double redirector
and not a single one to write the output to etc fstab.
And then I need to mount it.
So let's mount it on the directory new.
Need to have something as a name.
And in etc fstab, I can see the UUID is waiting for me.
And I'm going to mount it on slash new
with XFS as the file system and 0 and 0 as the mount options.
So to test, mount minus A is always a good test.
And oh, well, I'm happy I did it because you
can see it's complaining about an unknown parameter.
And is there a reason why we get an unknown parameter?
Absolutely.
Do you see what's going on?
We are missing the defaults option.
There is no line with the file system mount option.
And for that reason, it was complaining.
That is why mount minus A is convenient
because if you just reboot, your reboot will fail
and you need to go into troubleshooting.
So now if I use mount minus A again,
it's only giving me a hint about systemctl daemon reload,
which I choose to ignore.
My file system should be mounted.
LSBLK is showing it.
And there we go.
SCB3 is mounted on the partition slash new.
So that is what I had in mind for this lab.