Storage Media
  1. Mounting and Unmounting.
    1. A Linux file system is constructed of storage on many devices.
    2. Use df to see what's there (or df -h).
      1. Many of these are "virtual" file systems.
      2. Look for the real device names, like /dev/sda3
      3. Red-Hat based systems often have /dev/mapper/whatever, which represent storage pools.
    3. The /etc/fstab lists the volumes.
      1. Each entry maps a device to a file system location.
      2. Devices are traditionally named by hardware path in /dev.
      3. Now often named by LABEL or UUID (blkid, tune2fs).
    4. Volumes can be added or removed from the fs using the mount and umount commands.
    5. On current systems, this is done automatically.
      1. The hideously complicated udev system handles various events.
      2. It executes mounts and umount when devices are plugged in and removed.
      3. Servers often use explicit mounts.
  2. Formatting a volume.
    1. Physical devices are divided into partitions.
      1. The partitions on a disk are recorded in a partition table, usually at the start of the physical volume.
      2. Manipulate PT with fdisk.
        1. Legacy PC partitioning is MBR (Master Boot Record). Still seems most common.
        2. Newer one seems to be GPT (GUID Partition Table), which has fewer limitations.
        3. There are others.
    2. File systems are built inside partitions,
    3. The fsck program verifies the condition of a file system.
      1. In the past, commonly run when the system is booted after a crash. Fixes OS problems.
      2. Now used more rarely.
  3. Book mentions floppy drives.
  4. Raw copies
    1. The dd command is used to copy raw volumes.
    2. Copies a file system, not the files.
      1. Often has been used to copy disk images to volumes.
      2. Clone a drive.
  5. Creating a CDROM
    1. Creating an image. mkisofs or genisoimage
      genisoimage -o imagefile.iso -R -J directory
    2. Can mount the image with mount -o loop imagefile.iso /mnt/tmp
    3. Writing the image to disk wodim. wodim imagefile.iso, or wodim dev=/dev/cdrw imagefile.iso.