Chapter5: Mounting and Managing Files
Differences Between Windows 10 and CentOS 7 File System Mounting
File System Mounting Approaches
Windows 10: Assigns drive letters to partitions, volumes, and CD ROM drives automatically.
Example: Lights turn on in every room of a house as soon as you enter.
CentOS 7: Requires user action to mount file systems, allowing for optimized performance.
Example: Only lights in rooms that are entered are turned on, conserving energy.
Accessing Storage Areas
Windows 10 Storage Access
Drives are mapped by default; user intervention is minimal.
Removable drives (e.g., USB) are mounted upon insertion and must be dismounted before removal.
Creating Mounted Drives in Windows 10
Mounted drives can be created using the Disk Management Console.
Drive paths can replace traditional drive letters, making data accessible through specific folders.
Example: Move "documents" folder to another drive and mount it as C:\Documents.
Mounting File Systems in CentOS 7
General Process
Mounting makes a file system accessible at a designated mount point.
Root or super user access required to mount new partitions, while certain partitions auto-mount at boot.
Configuration
Entries must be added to the /etc/fstab file to mount certain partitions automatically on boot.
Mounted partitions appear integrated into the local directory structure.
Mount Command
Syntax:
mount -t <type> <device> <mount_point>
Options: Mount as read-only (-r), mount writable (default).
Supported file system types: ext4, ext2, ext3, ISO9660, NTFS, and others.
File System Management in Windows 10
Local Disk Properties
Access these settings via the Computer console and requires administrative rights.
General Tab:
Displays used and free space, total capacity, and options for disk cleanup and indexing.
Tools Tab:
Includes options for Error Checking and Disk Defragmentation.
Hardware Tab:
Provides details and properties for all drives.
Sharing Tab:
Manage sharing settings for drives based on administrative privileges.
Security Tab:
Allows for NTFS permissions management to control data access.
Quota Tab:
Allows tracking and control of disk space usage per user. Enables/Disables quotas.
File System Management in CentOS 7
File System Checking and Repair
Use
fsck
command for checking and repairing file systems.Automatic checks happen during boot.
Disk Usage Management
Use
df
to report disk space usage.Use
du
to display disk usage of files and directories recursively.
Swap Space Management
free
command displays used and free memory, including swap space.Swap is helpful for managing memory when running multiple programs.
Swap partitions can enhance performance due to the contiguity of disk blocks.
Key Commands in CentOS 7
Mounting Command
General syntax for mounting:
mount [options] <device> <mount_point>
Unmounting Command
Use
umount
followed by the directory or device name to detach file systems.
Conclusion
Windows 10 is user-friendly, automatically providing storage access but can hinder performance.
CentOS 7 requires manual mounting, optimizing performance at the cost of convenience.
Each system has unique utilities for file system management, reflecting different philosophies in user experience.