2.7 Linux File Systems

# Data storage types

  1. Block Level
    1. offered directly to the Operating System as raw devices

    2. controlled by the OS, which can create partitions and file systems on them

    3. cannot be shared across servers

    4. types of block-level storage solutions: DAS (Direct Attached Storage), SAN (Storage Area Network) systems

    5. DAS (Direct Attached Storage):
      1. a DAS is anything that is directly attached to a server or computer

      2. a DAS device could be a single internal hard disk or multiple external hard disks (JBOD)

      3. there are no networking layers between the computer and the storage

      4. protocols: SATA, SCSI, SAS

      5. for redundancy and/or performance disks can be clustered in RAID

    6. SAN (Storage Area Network):
      1. an enterprise system that provides access to consolidated block-level data storage

      2. devices exposed by SANs appear to the operating system as locally-attached devices

      3. comprised of dedicated hardware managed by a specialized software

      4. protocols: FCP (SCSI over Fiber Channel), iSCSI (SCSI over TCP/IP), FCoE

  2. File Level
    1. data is stored as files and presented to OSes as a hierarchical directories structure

    2. file access management features, such as ownership and permissions

    3. can be shared across servers

    4. protocols: NFS, SMB/CIFS

    5. devices that offer file-level access are called NAS (Network Attached Systems)

  3. Object Level
    1. an approach to address and manipulate data storage as discrete units, called objects

    2. keeps the blocks of data that make up a file together and adds all of its associated metadata to that file

    3. also adds extended metadata to the file and eliminates the hierarchical structure used in file storage, placing everything into a flat address space, called a storage pool

    4. it is generally slower than a file or block storage system, but it is highly scalable

    5. Amazon Simple Storage Service (Amazon S3), OpenStack Swift, Ceph

Disks, partitions

  1. disks are just raw physical/virtual means to store data, what lacks is an organization

  2. that organization comes in the name of partition

  3. a partition is a logical form of boundary, it is used to divide the disk into logical units

  4. partitions store data, but where are partitions stored?

  5. partitions are stored in what’s called a partition table

  6. partition tables store the data associated with partitions, where a partition starts, where a partition, etc

  7. however partitions are not enough to store data in an ordered manner

  8. to do that we need a file system

  9. a file system takes care of storing pieces of data - files

  10. files themselves are just a bunch of data that are stored through the file system, which resides in a partition, which is recorded in a partition table, all of this, inside a disk

Logical Volume Manager

  1. LVM is a storage abstraction layer that allows for very flexible management of block-level devices

  2. provides features like the ability to add disk space to a logical volume and its filesystem while that filesystem is mounted and active

  3. allows for the collection of multiple physical hard drives and partitions into a single volume group which can then be divided into logical volumes.

  4. terminology:
    1. physical volumes: physical disks, or disk partitions

    2. volume groups: seen as a “virtual partition” which comprises an arbitrary number of physical volumes

    3. logical volumes: contained in the volume groups they can be bigger than any single physical volume you might have. These will be formatted with a file system

File systems

  1. a file system is a structured representation of data and a set of metadata describing this data

  2. it is applied to the storage during the format operation

  3. common file system types: ext3, ext4, xfs, fat, ntfs; nfs, smbfs/cifs

Questions

  1. What is the difference between block-level and a file-level storage?

    1. Block-level storage is offered directly to the Operating System as raw devices, while file-level storage is stored as files and presented to OSes as a hierarchical directories structure.

    2. Block-level storage is stored as files and presented to OSes as a hierarchical directories structure, while file-level storage is offered directly to the Operating System as raw devices.

    3. Block-level storage is stored as files and presented to OSes as a hierarchical directories structure, while file-level storage is offered directly to the Operating System as raw devices.

    4. Block-level storage is offered directly to the Operating System as raw devices, while file-level storage is stored as files and presented to OSes as a hierarchical directories structure.

  2. What is the difference between a disk and a partition?

    1. A disk is a logical form of boundary, it is used to divide the disk into logical units, while a partition is just raw physical/virtual means to store data.

    2. A disk is just raw physical/virtual means to store data, while a partition is a logical form of boundary, it is used to divide the disk into logical units.

    3. A disk is a logical form of boundary, it is used to divide the disk into logical units, while a partition is a logical form of boundary, it is used to divide the disk into logical units.

    4. A disk is just raw physical/virtual means to store data, while a partition is just raw physical/virtual means to store data.

  3. What is the difference between a partition and a partition table?

    1. A partition is a logical form of boundary, it is used to divide the disk into logical units, while a partition table is just raw physical/virtual means to store data.

    2. A partition is just raw physical/virtual means to store data, while a partition table is a logical form of boundary, it is used to divide the disk into logical units.

    3. A partition is a logical form of boundary, it is used to divide the disk into logical units, while a partition table is a logical form of boundary, it is used to divide the disk into logical units.

    4. A partition is just raw physical/virtual means to store data, while a partition table is just raw physical/virtual means to store data.

  4. What is the difference between a partition table and a file system?

    1. A partition table is a logical form of boundary, it is used to divide the disk into logical units, while a file system is just raw physical/virtual means to store data.

    2. A partition table is just raw physical/virtual means to store data, while a file system is a logical form of boundary, it is used to divide the disk into logical units.

    3. A partition table is a logical form of boundary, it is used to divide the disk into logical units, while a file system is a logical form of boundary, it is used to divide the disk into logical units.

    4. A partition table is just raw physical/virtual means to store data, while a file system is just raw physical/virtual means to store data.

  5. What is the difference between a file system and a file?

    1. A file system is a structured representation of data and a set of metadata describing this data, while a file is a logical form of boundary, it is used to divide the disk into logical units.

    2. A file system is a logical form of boundary, it is used to divide the disk into logical units, while a file is a structured representation of data and a set of metadata describing this data.

    3. A file system is a structured representation of data and a set of metadata describing this data, while a file is a structured representation of data and a set of metadata describing this data.

    4. A file system is a logical form of boundary, it is used to divide the disk into logical units, while a file is a logical form of boundary, it is used to divide the disk into logical units.

Answers

  1. a

  2. b

  3. c

  4. c

  5. b