Download presentation
Presentation is loading. Please wait.
Published byDarren Carpenter Modified over 9 years ago
1
Linux+ Guide to Linux Certification Chapter Six Linux Filesystem Administration
2
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
3
Objectives Create hard disk partitions Mount and unmount hard disk partitions to and from the Linux directory tree Monitor free space on mounted filesystems Check filesystems for errors Use hard disk quotas to limit user space usage
4
The /dev Directory Device file –File used by Linux commands that represent a specific device on the system –These files are typically found in the /dev directory Character devices –Transfer data to and from the system one data bit at a time
5
The /dev Directory Block devices –Storage devices that transfer to and from the system in chunks of many bits by caching the information in RAM –Are represented by block device files –Can transfer information must faster than character devices
6
The /dev Directory Table 6-1: Common device files
7
The /dev Directory Table 6-1 (continued): Common device files
8
The /dev Directory Major number –Used by the kernel to identify what device driver to call to interact properly with a given category of hardware Minor number –Used by the kernel to identify which specific hardware device, within a given category, to use a driver to communicate with
9
Filesystems Filesystem –The organization imposed on a physical storage medium that is used to manage the storage and retrieval of data Formatting –The process where a filesystem is placed on a disk drive
10
Filesystem Types Table 6-2: Common Linux filesystems
11
Filesystem Types Table 6-2 (continued): Common Linux filesystems
12
Mounting Mounting –Process used to associate a device with a directory in the logical directory tree such that users may store data on that device –Term originated in the 1960s, when information was stored on large tape reels that had to be mounted on computers to make the data available Mount point –Directory in a file structure to which something is mounted
13
Mounting Figure 6-1: The directory structure prior to mounting
14
Mounting Figure 6-2: The directory structure after mounting a floppy device
15
Mounting When the Linux filesystem is first turned on, a filesystem present on the hard drive is mounted to the / directory Root filesystem –Filesystem that contains the most files that up the operating system –Should have enough free space to prevent errors and slow performance
16
Working with Floppy Disks When transferring small amounts of information from computer to computer, it is commonplace to use floppy disk removable media to store the files –However, floppy disks must be prepared before they are used in Linux Recall that each disk device must be formatted with a filesystem prior to being used to store files
17
Working with Floppy Disks Table 6-3: Commands used to create filesystems
18
Working with Floppy Disks Table 6-4: Commands useful when mounting and unmounting filesystems
19
Working with Floppy Disks Figure 6-3: Mounting a floppy device using a GUI environment
20
Working with Floppy Disks Figure 6-4: Viewing the contents of a floppy device in a GUI environment
21
Working with Floppy Disks Figure 6-5: Unmounting a floppy device in a GUI environment
22
Working with CD-ROMs Linux systems have an ATAPI compliant IDE CD-ROM drive that attaches to the mainboard via an IDE ribbon cable –These CD-ROMs act as a normal IDE hard disk, and must be configured on of the four configurations below, as seen with their associated device files: Primary master (/dev/hda) Primary slave (/dev/hdb) Secondary master (/dev/hdc) Secondary slave (/dev/hdd)
23
Working with Floppy Disks Figure 6-6: Viewing the contents of a CD-ROM in a GUI environment
24
Working with Floppy Disks Figure 6-7: Unmounting a CD-ROM device in a GUI environment
25
Working with Hard Disks IDE hard disk drives attach to the mainboard with an IDE cable and must be configured on one of four configurations, each of which has a different device file: –Primary master (/dev/hda) –Primary slave (/dev/hdb) –Secondary master (/dev/hdc) –Secondary slave (/dev/hdd)
26
Working with Hard Disks SCSI hard disks are well-suited to Linux servers that require a great deal of storage space for programs and user files Different device files associated with SCSI hard disks: –First SCSI hard disk drive (/dev/sda) –Second SCSI hard disk drive (/dev/sdb) –Third SCSI hard disk drive (/dev/sdc)
27
Working with Hard Disks Different device files associated with SCSI hard disks (continued): –Fourth SCSI hard disk drive (/dev/sdd) –Fifth SCSI hard disk drive (/dev/sde) –Sixth SCSI hard disk drive (/dev/sdf) –And so on
28
Hard Disk Partitioning Recall that hard disks have the largest storage capacity of any device used to store information on a regular basis –This poses some problems, because as the size of a disk increases, organization becomes more difficult and the chance of error increases Partition –A physical division of a hard disk drive
29
Hard Disk Partitioning It is good practice to use more than just two partitions on Linux system as this division can be useful to: –Segregate different types of data –Allow for the use of more than one type of filesystem on one hard disk drive –Reduce the chance the filesystem corruption will render a system unusable –Speed up access to stored data by keeping filesystems as small as possible
30
Hard Disk Partitioning Tracks –Area on a hard disk that form a concentric circle of sectors Sector –Smallest unit of data storage on a hard disk Block –Unit of data commonly used by filesystem commands
31
Hard Disk Partitioning Cylinder –Series of tracks on a hard disk that are written to simultaneously by the magnetic heads in a hard disk drive Figure 6-8: The physical areas of a hard disk
32
Hard Disk Partitioning Table 6-5: Common hard disk partition device files for /dev/had and /dev/sda
33
Hard Disk Partitioning Figure 6-9: A sample Linux partitioning strategy
34
Hard Disk Partitioning Figure 6-10: A sample dual-boot Linux partitioning strategy
35
Working with Hard Disk Partitions Disk Druid is an easy-to-use partitioning tool used with Red Hat Linux, specifically designed for installation only To create partitions after installations, you use the fdisk command To use the fdisk command, you simply specify the hard disk partition as an argument
36
Disk Usage There may be several filesystems mounted to the directory tree The more filesystems that are used, the less likely it is that a corrupted filesystem may interfere with normal system operations Conversely, using more filesystems typically results in less hard disk space per filesystem and may result in system errors if certain filesystems fill up with data The easiest method for monitoring free space by mounted filesystem is to use the df (disk free space) command
37
Checking Filesystems for Errors Filesystem corruption –Errors in a filesystem structure that prevent the retrieval of stored data Syncing –Process of writing data to the hard disk drive that was stored in RAM Bad blocks –Those areas of a storage medium used by filesystem commands
38
Checking Filesystems for Errors Table 6-6: Common options to the fsck command
39
Hard Disk Quotas Soft limits –Limit imposed that can be exceeded for a certain period of time Hard limit –Limit imposed that cannot be exceeded
40
Chapter Summary Disk devices are represented by device files that reside in the /dev directory Each disk drive must contain a filesystem, which is then mounted to the Linux directory tree for usage using the mount command Hard disks must be partitioned into distinct sections before filesystems are created on those partitions
41
Chapter Summary There are many different filesystems available to Linux It is important to monitor disk usage using the df, du, and dumpe2fs commands to avoid running out of storage space If hard disk space is limited, you can use hard disk quotas to limit the space that each user has on filesystems
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.