Linux is very flexible with regard to storage.
So let's say the square box is your computer and in your computer there's a hard disk.
The circle represents your hard disk.
Then the minimal thing that you need to do in your hard disk is to create partitions.
These partitions are for logically distinguishing the files that you are going to put on your hard disk.
Partitions, however, are relatively inflexible.
And that is why inside the partitions you can go for a different solution.
And that is the logical volume.
So what would you do? Well, you would use the partition which is then
known as physical volume, and put it in kind of a storage cloud.
That is what you call the volume group.
And from this volume group you can define your logical
volumes like LV1 and LV2 and LV3 and so on.
Where the advantage of these logical volumes is that you introduce flexibility with regard to your storage.
One important feature is that you can resize them very easily.
So partitions and logical volumes are very important in Linux.
But there's also an option to work with external storage.
You can use SAN or nas, and on the SAN or NAS you can have multiple disks available
and you can make them accessible from your Linux server by using storage protocols like ISCSI or Fibre
Channel. And the result is that you will see them as a disk on your computer.
And the next question is, how are you going to work with them? Well, the first thing to do
is lsblk. LSBLK is listing block devices and that allows you to see all of your storage devices.
Okay, so let's have a look at the common Linux block device overview.
So there is DEV sda, which is the first SCSI or SATA hard disk.
Dev SDB would be the second disk. South Dakota stands for
SCSI disk, and A and B is the disk names.
We have dev vda, which is commonly used for a KVM hard
disk, and dev nvme0, n1, which is your first nvme hard disk.
Normally the first hard disk is a, the second hard disk
is b, and so on. But in nvme you use numbering.
So nvme0 is for bus 0 and n1 is node 1, which is
the first disk, and n2 will be the second disk, and so on.
Also commonly seen is dev sr0, which is what you use for an optical drive.
How can we verify all of that? That would be the LSBOK command. Let me
show you the LSBOK command for an overview of what is on a system.
Sudo lsblk showing my block devices.
What I've got here is an SR 0 and an NVME 0 and 1.
Now, on this NVME 0 and 1, we have a couple of partitions and there is LVM
logical volumes as well. In the next couple of lessons, you'll learn how to work with these.