Untitled Quiz
48 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary function of a file system?

  • To enhance graphics rendering in operating systems
  • To organize and identify files on a storage device (correct)
  • To compress files for storage efficiency
  • To execute network communication protocols
  • Which file system is known for its security features?

  • NTFS (correct)
  • ext4
  • RAW
  • FAT32
  • What does the acronym NFS stand for in the context of file systems?

  • Non-Functional Storage
  • New File Structure
  • Networked Formatting System
  • Network File System (correct)
  • Which of the following file systems is standard on GNU/Linux?

    <p>ext</p> Signup and view all the answers

    What does a RAW file system indicate about a storage drive?

    <p>The drive is not processed or formatted</p> Signup and view all the answers

    Which variant of the FAT file system is specifically used by early Windows operating systems?

    <p>FAT16</p> Signup and view all the answers

    Which file system is more effective against small- and medium-sized files?

    <p>ext</p> Signup and view all the answers

    What role does drive management software serve in a computer system?

    <p>It manages and controls drive storage</p> Signup and view all the answers

    What is the purpose of the -l option in the fdisk command?

    <p>To list the partition tables of peripheral devices.</p> Signup and view all the answers

    What command is used to create a partition in fdisk interactive mode?

    <p>n</p> Signup and view all the answers

    What does the -s option do in fdisk?

    <p>Prints the specified partition size in sectors.</p> Signup and view all the answers

    Which command would you use to delete a partition in fdisk interactive mode?

    <p>d</p> Signup and view all the answers

    How can you save changes and exit in fdisk?

    <p>w</p> Signup and view all the answers

    What does the command 't' accomplish in fdisk?

    <p>Change the system ID of a partition.</p> Signup and view all the answers

    In fdisk interactive mode, what would pressing 'm' provide?

    <p>Display the help menu.</p> Signup and view all the answers

    What command would you use in fdisk to list existing partitions?

    <p>p</p> Signup and view all the answers

    What does the IDE interface refer to in terms of drive technology?

    <p>It is the earliest general standard for hard disk drives</p> Signup and view all the answers

    Which drive interface is specifically designed for high-performance use in servers?

    <p>Small Computer System Interface (SCSI)</p> Signup and view all the answers

    What is a disadvantage of using SCSI drives compared to SATA drives?

    <p>Higher cost and louder noise</p> Signup and view all the answers

    What command is used in Linux to view all drives in the system, including mounted and unmounted ones?

    <p>fdisk -l</p> Signup and view all the answers

    Which statement accurately describes Fibre Channel (FC) interfaces?

    <p>They enhance I/O performance using fiber optics.</p> Signup and view all the answers

    What distinguishes Serial Attached SCSI (SAS) from traditional SCSI?

    <p>It provides improved performance through serial connections.</p> Signup and view all the answers

    Which of the following is NOT a characteristic of SCSI drives?

    <p>Lower noise levels compared to SATA drives</p> Signup and view all the answers

    In terms of storage media, what is the main distinction between HDD and SSD?

    <p>SSDs have no moving parts, while HDDs do.</p> Signup and view all the answers

    What is the primary purpose of swap space in a system?

    <p>To temporarily store data that is not in use</p> Signup and view all the answers

    How does increasing swap space size compare to adding physical memory in terms of cost-effectiveness?

    <p>Swap space increase is more cost-effective.</p> Signup and view all the answers

    What system feature commonly utilizes swap space when the system hibernates?

    <p>Memory data storage</p> Signup and view all the answers

    Which command is NOT used in creating a swap partition?

    <p>mkdir</p> Signup and view all the answers

    What is the recommended swap size for a system with 6 GB of RAM?

    <p>6 GB</p> Signup and view all the answers

    What is the main difference between a swap file and a swap partition?

    <p>Swap files can coexist with other files, whereas swap partitions cannot.</p> Signup and view all the answers

    What must be done after creating a swap file for it to be functional?

    <p>It needs to be formatted and enabled.</p> Signup and view all the answers

    What is the recommended swap size for a system with more than 8 GB of RAM?

    <p>8 GB</p> Signup and view all the answers

    What must be created after an extended partition in order to utilize the allocated space?

    <p>Logical partition</p> Signup and view all the answers

    What does entering the letter 'e' during the fdisk process accomplish?

    <p>It creates an extended partition</p> Signup and view all the answers

    What is a significant limitation of the old MBR partitioning scheme?

    <p>Maximum partition size of 2 TB</p> Signup and view all the answers

    What is the function of the 'w' command in the fdisk process?

    <p>To save changes and exit</p> Signup and view all the answers

    During partition creation, what happens when you enter 'p' in fdisk?

    <p>It displays the partition layout</p> Signup and view all the answers

    What should be entered to create a logical partition after an extended partition has been made?

    <p>Enter n</p> Signup and view all the answers

    What is a major advantage of using the GUID Partition Table (GPT) over MBR?

    <p>Supports more than 4 partitions</p> Signup and view all the answers

    What does entering a default value during partition creation typically mean?

    <p>Using the maximum allowable size</p> Signup and view all the answers

    What does the command 'mkfs' primarily do?

    <p>It formats a specified partition and creates a file system.</p> Signup and view all the answers

    Which command option allows for verbose output when using mkfs?

    <p>-V</p> Signup and view all the answers

    Why must a formatted drive be mounted in Linux?

    <p>Because of the 'Everything is a file' design in Linux.</p> Signup and view all the answers

    What is the default file system type specified by the mkfs command in Linux?

    <p>ext2</p> Signup and view all the answers

    What command is used to format a partition named sdb2 in ext4 format?

    <p>mkfs.ext4 /dev/sdb2</p> Signup and view all the answers

    What happens to a drive when it's mounted?

    <p>It is linked to a file or directory for access.</p> Signup and view all the answers

    What command can you run after formatting to view information about the drive?

    <p>ll /dev/sdb2</p> Signup and view all the answers

    Which would you use to check a partition for bad blocks before formatting?

    <p>-c</p> Signup and view all the answers

    Study Notes

    File System and Storage Management

    • This course covers basic file systems, drive storage, and logical volume storage.
    • It details how to manage and use the file system and storage, along with common commands.
    • The course aims to provide understanding of basic file system and storage concepts, mounting and using storage drives, and managing logical volumes.

    Objectives

    • Students will gain knowledge of fundamental file systems and storage concepts.
    • Students will learn how to mount and use drive storage.
    • Students will understand methods for managing logical volumes.

    Contents

    • Basic Concepts of File Systems:

      • File Systems on openEuler
      • Swap Space
    • Mounting and Using Drive Storage:

      • Drive Basics
      • Drive Partitioning
      • Formatting and Mounting
    • Logical Volume Management:

      • Logical Volume Basics
      • Managing Logical Volumes
      • Dynamically Resizing Logical Volumes

    File System Overview

    • A file system is a method and data structure used by an operating system to identify files on a storage device.
    • It's a way to organize files on a storage device.
    • A file management system (or file system) manages and stores file data within an OS.
    • Has user-friendly interfaces and drive management software akin to middleware.
    • Manages underlying storage hardware, like drives and partitions.
    • Includes APIs for software stack object control and management.

    File System Types and Application Scenarios

    • Common File Systems and their Application Scenarios:
      • FAT (FAT16, FAT32): Used by Windows 9X OSs.
      • NTFS: A security-based file system used by Windows NT (updated NTFS 5.0 in Windows 2000).
      • NFS: Network File System used for file sharing between Unix systems.
      • RAW: Represents a drive that's not processed or formatted.
      • ext (ext2, ext3, ext4): A standard file system for GNU/Linux, excellent for small and medium-sized files.
      • XFS: High-performance log file system developed for IRIX OS and ported to Linux kernel, good for large files.

    File Systems on openEuler

    • openEuler kernel is derived from Linux, supporting many file systems (Btrfs, JFS, ReiserFS, ext, ext2, ext3, ext4, ISO 9660, XFS, Minix, MSDOS, UMSDOS, VFAT, NTFS, HPFS, NFS, SMB, SysV, PROC)
    • The default file system on openEuler is ext4.

    Swap Space

    • Swap space is a partition or file on the disk.
    • When RAM is insufficient, less frequently used data is moved to swap space, freeing up RAM for other processes.
    • Data in swap space is loaded back into RAM when needed.
    • Total virtual memory is the sum of physical memory and swap space.
    • Increasing swap space is often more cost-effective than adding RAM for more memory when necessary.
    • Improves overall system performance.
    • Used for Linux hibernation (saving memory data during hibernation).

    Swap Space Configuration

    • Swap space comes in two forms: partition and file.
    • Partition is an independent drive.
    • File is a special file within the file system and is separate from the system and data files.
    • Creating swap partition involves using tools like fdisk, mkswap, and swapon.
    • Creating swap file involves creating a file, using mkswap to format it, and then using swapon.
    • Recommended swap sizes vary according to RAM size (2x RAM for low RAM, same as RAM for medium RAM, 8 GB for high RAM).

    Drive Types

    • Storage media: Hard disk drives (HDDs), Solid-state drives (SSDs)
    • Interface types: IDE, SCSI, SATA, SAS, FC

    Drive Interface Description

    • Integrated Drive Electronics (IDE): Early general standard used in HDDs.
    • Serial ATA (SATA): Distinctive from IDE and is a serial port.
    • Small Computer System Interface (SCSI): Used in servers; has characteristics of high performance and stability, but also high cost and loud noise.
    • Fibre Channel (FC): Enables drives to connect directly via optical fibers, improving high-throughput performance for intensive systems.

    Viewing Drive Information on Linux

    • fdisk -l: Lists information about all drives in the system (mounted and unmounted).
    • df -h: Displays mounted file systems, showing size, usage, and availability.

    Drive Partitioning

    • Dividing a drive into logical storage units (partitions).
    • Allows system administrators to use different partitions for different functions.
    • Allows restrictions on available space for users or applications.
    • Enables booting into multiple operating systems from a single drive.
    • Separates operating system files from program and user files.
    • Creates a dedicated area for virtual memory swapping.
    • Restricts drive space usage, enhancing diagnosis tool and image backup performance.

    Drive Partition Types

    • Primary partition: Basic, non-partitioned drive; can't be made into other partitions.
    • Extended partition: Holds logical partitions.
    • Logical partition: Multiple logical partitions can be created within an extended partition.

    Drive Partition Naming

    • Linux uses device names (e.g., /dev/hda, /dev/sda) instead of drive letters.
    • /dev/ directory: where device names are stored.
    • xxyN: Common naming format:
      • xx represents the device type (hd for IDE, sd for SCSI, fd for floppy, vd for virtio).
      • y represents the device number.
      • N represents the partition number.

    Drive Partitioning Scheme - MBR

    • MBR: Master Boot Record partitioning scheme, used in BIOS-based systems.
    • MBR is a boot sector at beginning of the drive.
    • SCSI drives can have a maximum of 15 partitions (4 primary, 12 logical).
    • IDE drives have a max of 63 partitions (4 primary, 60 logical).
    • Maximum drive/partition size is 2TB when using MBR scheme due to 32-bit size representation.

    fdisk Drive Partitioning Utility

    • Traditional Linux drive partitioning utility; does not support partitions larger than 2TB.
    • Uses command syntax fdisk [options] parameter.

    fdisk Interactive Mode

    • Select drive, then use interactive commands to manage partitions (using commands a, b, c, d, m, n, 0, p, q, s, t, u, v, w).

    Drive Partitioning Scheme - GPT

    • GUID Partition Table (GPT): Increasing drive sizes, allowing larger partitions, replacing the traditional MBR.
    • Each partition has a Globally Unique Identifier (GUID).
    • Used for UEFI systems. As GPT uses 64 bits for logical block addresses, larger partition sizes are possible (up to 18 EB).
    • No primary or logical partitions; supports a maximum of 128 partitions..

    parted Drive Partitioning Utility

    • parted: More user-friendly partitioning utility, supports partitions beyond 2TB.
    • parted [options] [device [command [options...]...]]: Basic command syntax

    Format the Drive

    • mkfs: Used to format partitions into different file systems.
    • Formatting partitions usually deletes existing files from the volume (ensure you've backed up any necessary data before formatting).

    Drive Mounting

    • Drives must be mounted before use.
    • Mounting links drives to a directory, providing access.
    • Temporary mounting: Temporary connections. Becomes invalid after reboot
    • Permanent mounting: Automatically mount devices on boot; edits /etc/fstab file to configure.

    Introduction to fstab

    • fstab (/etc/fstab) file stores static information for automatic file system mounting during startup in the OS.
    • Format: [file system] [directory] [type] [options] [dump] [pass]

    Key Parameters in fstab

    • Explains parameters used in the /etc/fstab file. (e.g., auto, ro, rw, user, nouser, dev/nodev, noatime/nodiratime, defaults, sync/async, suid/nosuid, dump, pass).

    Logical Volume Management

    • Logical Volume Management (LVM) adds layers above drives and partitions and below file systems, enhancing manageability.
    • Uses physical extents (PEs) and logical extents (LEs). A physical volume (PV) is an entire drive or a partition. A logical volume (LV) is a logical device to users. PVs can be combined in a volume group (VG) and converted to LVs.

    Logical Volume Basics

    • Uses logical extents (LEs), where each LE is the same size as the PE.
    • Logical Volume (LV): A logical unit that interacts with users for storage.
    • Physical Volumes (PVs): The actual drive/partition on physical hardware.
    • Volume Group (VG): A collective unit containing physical volumes for managing logical volumes (LVs)
    • PVs are combined to provide capacity allocation; each LVM system can have multiple VGs. LVs are built on the VG, which manages the PVs.

    Advantages of Logical Volumes

    • Flexible capacity: Modifying capacity of an LV without changes to the underlying hardware.
    • Scalable storage pools: Combining multiple PVs into VGs to create scalable storage pools.
    • Easy device naming: Easier for users to manage and access storage.
    • Disk striping: Improves performance by spreading data across multiple disks.
    • Volume mirroring and snapshotting: Facilitates data redundancy and backup operations.
    • Online data reallocation: Shifting data to maximize storage efficiency while the system is running.

    Dynamically Resizing Logical Volumes

    • Expanding/shrinking capacity of an LV (logical volume) without unmounting it.
    • Expanding: Checks volume group space, then extends capacity using lvextend command.
    • Shrinking: Determines target size, unmounts, performs check, using resize2fs command, and the lvreduce command to reduce the LV size.

    Changing Logical Volume Capacity

    • lvresize: Command used to adjust LV size (increasing/decreasing).
    • lvextend and lvreduce: Functions within lvresize used for expanding and shrinking capacity.

    Quiz

    • Question 1: Correct command for formatting /dev/hdb6 is mkfs -t ext4 /dev/hdb6.
    • Question 2: True. Reducing LV capacity is risky due to the need to unmount and check the file system forcibly.

    Summary

    • This course covers file system concepts, drive mounting, and logical volume management.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    More Like This

    Untitled Quiz
    6 questions

    Untitled Quiz

    AdoredHealing avatar
    AdoredHealing
    Untitled Quiz
    19 questions

    Untitled Quiz

    TalentedFantasy1640 avatar
    TalentedFantasy1640
    Untitled Quiz
    55 questions

    Untitled Quiz

    StatuesquePrimrose avatar
    StatuesquePrimrose
    Untitled Quiz
    50 questions

    Untitled Quiz

    JoyousSulfur avatar
    JoyousSulfur
    Use Quizgecko on...
    Browser
    Browser