ITS 2330 - Linux III

Chapter 5: Administering Advanced Storage Devices

Objectives:

This lesson takes place in week 6. Objectives important to this lesson:

  1. RAID
  2. Storage Device Access
  3. Logical Volume Manager
Concepts:

Chapter five begins with a discussion of RAID, variously called Redundant Array of Independent (or Inexpensive) Disk (or Drives, or Devices). The general idea is that multiple linked drives are used features that are not available in other ways. That's a little general, but some early levels of RAID service provide only one benefit, and others provide different benefits. Here is a video with more levels than you usually hear or read about:


If the presenter in the video above is a little slow for you, follow this link to a site that sells drives for each of the RAID types they cover. It is quick to go through, partly because it used to be animated but the death of Flash seems to have pushed them into static images.

Having introduced the concepts from several RAID levels, the text discusses using software to support a chosen level on a Linux system.

  1. First, use the uname -r command to get the version of your kernel. It must be 2.6 or later to support RAID.
  2. Next, check whether mdstat file exists on your system with the command ls /proc/mdstat. If not, your system is probably not running a RAID configuration.
  3. To implement a RAID level, use superuser privileges to run the command sudo modprobe raidx
    where x is an integer representing a real RAID level. The text example uses the integer 6. There was no error message generated, so it probably worked. The text tells we could use this command with the values 0, 1, 4, 5, 6, or 10. An error message as shown at the bottom of page 205 indicates an unsupported level.
  4. Check whether the modprobe command worked by entering cat /proc/mdstat. If RAID is implementable, there will be contents similar to those shown halfway down page 205. In the text example, the system being examined is responding that it supports RAID levels 4, 5, and 6.
  5. Check whether mdadm module is installed. 
    • On an Ubuntu system enter dpkg -s mdadm
    • On a Red Hat system, enter rpm -qa | grep mdadm
  6. If you need to install mdadm on an Ubuntu distro, enter sudo apt-get install mdadm

The text warns us that the next step should be partitioning the drives that will be used in the array. Do NOT create the array until you have done the partitioning. So, following the text, the next several procedures have steps of their own, so don't start this unless you mean it. The following pages discuss:

  • disk partitioning
    Partitions are limited by rules that were made long ago and far away, for DOS (Disk Operating System) which was a big deal when it was created, but it seems very dated now. Some rules about partitions:
    • a hard drive can have up to 63 partitions if it is an IDE, ATA, or SATA drive
    • a hard drive can have up to 15 partitions if it is a SCSI drive (which almost no one uses, thank goodness)
    • a hard drive can have up to 4 primary partitions, and you can only boot from primary partitions
    • you can only subdivide 1 of the primary partitions into logical partitions, which makes it an extended partition; tricky part: you can't actually store anything on the extended partition, but you can store things on the logical partitions that are parts of it
A common partition scheme is to create three primary partitions, sized according to expected need, and one extended partition that takes up the rest of the hard drive, which can then be subdivided as needed into logical partitions.
  • array creation
  • checking the array
  • adding a filesystem and mounting it
  • saving the RAID configuration

In the section on Monitoring the RAID Array, starting on page 216, note the list of monitor code events that relate to various problems with the array. For a technology that is meant to result in improved data reliability, there are a lot of things to worry about.

The first topic is drive interfaces you may run into, which is a moving target. New ones will be added, and old ones will still be found on old equipment.

Page 221 begins the chapter section on Adjusting Storage Devices. The author tells us immediately that this is typically not required, but make it sound like legacy knowledge that a certification test will ask about. If you are one of the rare students who likes to read, follow this link to a very good article on hard drives and arrays, which also includes a nice video on choosing an SSD.

Moving back to the chapter, the next several pages discuss utilities, some of which you will know. I will call your attention to sysctl, which is better documented and less destructive than some others,

The usual recommendation about logical volumes is made in the text, that we should use LVM, Logical Volume Manager. It allows multiple partitions to be treated as one logical volume, hence the name of the utility. The use of LVM is discussed through the end of the chapter. The video shown below will walk you through the basics in about five minutes.


New stuff: we are trying to add more material about Wireshark, but many videos about it were made with older interfaces. The video below was made late in 2020, so the interface is current. Even better, the presenter is a great speaker, and he walks you through a man in the middle attack with great enthusiasm.