Docsity

Linux Filesystem Administration: Device Files, Filesystems, and Hard Disk Partitioning, Slides of Advanced Operating Systems

Partial preview of the text

Download Linux Filesystem Administration: Device Files, Filesystems, and Hard Disk Partitioning and more Slides Advanced Operating Systems in PDF only on Docsity!

Chapter 6

Linux Filesystem Administration

Objectives

  • Identify the structure and types of device files in the /dev directory
  • Understand common filesystem types and their features
  • Mount and unmount floppy disks to and from the Linux directory tree
  • Mount and unmount CD-ROMs to and from the Linux directory tree
  • Create hard disk partitions

The /dev Directory

  • Device file: File representing a system device
    • Typically found in /dev directory
  • Character devices: Transfer data to and from

system character by character

  • Block devices: Transfer chunks or blocks of

data using physical memory as a buffer

  • Fast data transfer
  • CD-ROM, HDD, floppy disks

The /dev Directory (continued)

Table 6-1: Common device files

The /dev Directory (continued)

  • Major number: Points to the device’s driver in

the Linux kernel

  • Minor number: Indicates the particular device
  • Device file type (block or character), major

number, and minor number make up a device file’s unique characteristics

  • mknod command: Can be used to re-create a

corrupted device file

  • Must know file type, major, and minor numbers

Filesystems

  • Filesystem: Organization imposed on physical

storage media

  • Formatting: Creating a filesystem on a device

Filesystem Types (continued)

Table 6-2 (continued): Common Linux filesystems

Mounting

  • Mounting: Making a device accessible to users

via the logical directory tree

  • Mount point: Directory to which a device is

attached

  • Any existing directory can be a mount point
  • Root filesystem: When Linux filesystem first

turned on, a filesystem on the hard drive is mounted to the / directory

  • Contains most OS files

Mounting (continued)

Figure 6-2: The directory structure after mounting a floppy device

Mounting (continued)

  • mount command: Used to mount devices to

mount point directories

  • With no options or arguments, lists currently mounted filesystems
  • umount command: Used to unmount devices

from mount point directories

Working with Floppy Disks (continued)

Table 6-3: Commands used to create filesystems

Working with Floppy Disks (continued)

  • /etc/fstab file: Used to mount devices at boot

time

  • Also consulted when users do not specify enough mount command arguments
  • Six fields: Device to mount, mount point, type, mount options, dump#, fsck#

Working with Floppy Disks (continued)

Figure 6-3: Mounting a floppy device using a GUI environment

Working with Floppy Disks (continued)

Figure 6-4: Accessing filesystem devices in the KDE desktop