Hey guys and welcome back.
So in this nugget right here, what I want to talk to you about is iSCSI.
Now if you are unfamiliar or can't quite remember what a SCSI drive is, let me just show you
what they are.
So we can see here what a SCSI device this is what it looks like here.
And it was as we can see here once very common for connecting small to medium sized computers
over this particular cable.
But like we see here there are now faster standards such as USB.
In fact let me just quickly get a better image.
You can kind of see these ports here this is what we're talking about.
Now obviously this is all about having a physical connection.
So that would mean having a computer here and one close enough whereby you could attach
a SCSI and have that connection.
But this was obviously very very limited and because of this something else was invented
effectively this was iSCSI which is the purpose of what we're going to talk about in this
nugget.
Now what iSCSI is it is internet small computer system interface.
So what we're really talking about is getting that SCSI connection but instead of a physical
connection connecting a cable we're going to have this connection over the network.
So instead of using wires and cables we will enable this connection directly using TCPIP.
Now in order to be able to understand iSCSI we have to understand some basic concepts.
Now the first concept is going to be a target.
The second concept is going to be an initiator.
Also we have the term WWID which is a world wide identifier.
And the last term is a LUN.
This is a logical unit number.
So let's talk about what a target is first then.
So when we talk about a target what we're actually referring to is the actual storage
device itself.
So this can be a server that is on your local network.
It can be a server that you're reaching over the internet or over a wide area network.
But really this target is the storage device that is being shared that people want to make
use of.
And really people are going to want to reach over the network and use this storage device
as if it was another hard disk.
Like I say this is known as the target.
Now who actually wants to use this storage?
This is going to be the initiator.
So the person who wants to make use of this storage, this SCSI storage they're going to
act as a client and they will connect in to the target.
So think about it like this we've got this big target right here with some SCSI configuration.
This is the target.
We have a little computer over here.
This is going to be the initiator.
The computer can make this connection to the target over the network.
Like I say not just a physical SCSI cable.
And the server is going to present this storage to the initiator and it will just appear locally
on the initiator's device like another disk.
So let's imagine before the connection the only hard drive on the initiator is SDA.
Once they make that connection over the network, this storage will just appear like another
disk SDB to use an example.
Now in order for this operation to work we do need to have other information in play.
This primarily one of the things you need to know is the WWID like I said the Worldwide
Identifier.
This number has to be absolutely unique throughout the entire world.
And the reason why is that so SCSI devices that are connected to the internet can actually
identify and separate each other.
There are no duplicates going on here so no confusion.
You can kind of conceptualize this as a MAC address on your PC.
The way a MAC address is going to be unique to a physical device.
The WWID is also going to be unique worldwide.
Now the last thing we need to know is this concept of a LUN the logical unit number.
This is going to be what the target i.e. the server actually uses to identify an iSCSI
device.
So each iSCSI device will have that LUN.
Now one thing we want to remember here is that with respect to the WWID this has to
be unique across the entire world.
This is a globally unique identifier.
Whereas when we're talking about the logical unit number this only has to be unique on
the local network.
Now with respect to what we were talking about we have our target here which would be our
server and our little initiator.
For the purposes of the L-PIC 2 examination all we really have to focus in on is understanding
these key concepts and understanding how the initiator configuration works.
So this is the configuration that we're going to focus in on.
So what I shall do is I shall show you how we can install our basic initiator package.
So what I'll have to do is the sudo apt install and it's going to be open hyphen iSCSI and
to enter type in my password and I'll say yes.
Okay now what I'll do is I'll just check my IP address.
So my IP address is 192.168.0.65.
Since I am pretending to be the initiator over here this is going to be my IP address.
So 192.168.0.65.
Now let's say we had a target over here and the target which was acting as the server
effectively had an IP address of 192.168.0.99 let's just say.
So we have our IP address here, we have the server IP address here, we would want to make
our connection to the target and then the target can serve up over to us this LUN this
logical unit and we can then mount this LUN on our system.
That would just appear to us like we've just installed another hard drive.
So the command that we could actually use to see the name of the targets that are provided
by this iSCSI server would be as follows.
We would say iSCSI ADM for admin.
I'm going to say dash M for the modes and we're going to say discovery and then dash
T for the target and we could specify a particular target that was configured on that device.
And we just say 192.168.0.99.
I'll just say it was called target 01 and then I would say dash P for the portal which
would just be the address of the remote server and this is ultimately how we could see the
targets provided by an iSCSI server.
Now again, this part of the configuration here might be a little bit confusing.
That is because that would actually have to be specified over on the target configuration
which like I say is actually not part of the LPIC2 examination.
So this actual config would actually be specified in a particular configuration file and this
part here is just the IP address of that server.
So really all we are focusing on is we have this iSCSI ADM command.
We can discover particular targets, whatever their name may happen to be in that particular
configuration file.
We don't have to worry about that.
And then who do we actually want to send this to, i.e. the target's IP address.
And assuming we do have such a server that does exist which has this IP address and in
its configuration file which we don't have to worry about, has this particular configuration
that ultimately we would be able to discover this target.
Now what we talked about was a simple discovery.
Okay, we here as the initiator, we just have to send out this discovery with information
relating to the server's IP address and whatever the server may have configured on its own
system right here.
But it may not be quite as simple as that.
The server may actually require things like authentication.
So when you try to discover its services, it's not enough for you just to type in the IP
address or whatever it may be.
You also may have to provide some authentication credentials as well as potentially other
configuration settings.
Now, what we want to be remembering for the purposes of the examination is the location
of where we could do such a thing.
The configuration settings for our iSCSI initiator.
Now this is going to be in a very particular location and this is really something that
we want to be focusing on.
And this is going to be in, I'll say, CIDO, NANO because we're going into the Etsy directory.
And then iSCSI.
And then it's going to be iSCSI-D.conf.
If I open this up right here, we can see this is the open iSCSI default configuration.
Now we can see here how we can actually start our particular service.
If we scroll on down, we can see we have chap settings for particular authentication.
We can add in a authentication username, authentication passwords.
We can have discovery session, authentication, and a whole bunch of other information relating
to timeouts, so on, so forth.
The actual details of this configuration file are not so much to concern.
Just that you may have to toggle particular settings as the initiator and the location
where you would do such a thing would be in Etsy, iSCSI, iSCSI-D.conf.
Really try to remember those settings.
So between the iSCSI-D.conf file and the iSCSI-ADM command, as an initiator, you can ultimately
discover targets on a particular server that will lend to us these particular storage services
that are being shared over a network without the need for a traditional SCSI cable connection
between the two devices.
All of this facilitated over the network via TCP-IP.
And those really are the main points that we have to understand for the purposes of
the LPIC2 examination objectives.
OK, that looks like I hope this has been informative for you and I'd like to thank you for viewing.
Thank you.