1, review the contents of this course;
2, summarize the Disk Management and file system Management design of the use of various commands, and note certain examples;
File System Properties View and adjustment tools:
E2label
E2lable DEVICE [LABEL]
Tune2fs
Displays the properties of the Ext series file system, or adjusts its properties;
-L: Displays information in the Super block, and displays information about the properties and layout of the entire file;
-L ' LABEL ': Modify the volume label;
-M #: Adjust the percentage of administrative space reserved to administrators;
-J:EXT2-Ext3
-O: File System Properties start or close
-O: File system default mount option enabled or closed
DUMPE2FS:
-H: Displays only the Super block information;
File System Detection:
Fsck:filesystem Check
FSCK-T type
Fsck.type
-A: Auto fix error
-r: Interactive fix error
-F: Force detection
E2fsck:ext Series file system-specific detection and repair tools;
-Y: Auto Answer "yes"
-f:force
File system mount and use:
Kernel--ROOTFS (partition)
ROOTFS Partition:
Bin, Sbin, etc, Lib, lib64, Dev, tmp, proc, SYS
/sbin/init
The additional file system is associated with an existing directory of the root file system, which makes this directory the behavior of accessing the portal as other file systems, called Mount;
The process of releasing this association: uninstall;
Mount points: mount point, device mounted to directory;
Note: After the mount point is mounted, its internal files are temporarily hidden, and an empty directory is used as the mount point;
Mount Method:
Mount: Displays all devices that are already mounted on the current system by reading the/etc/mtab file;
MOUNT-A: Mounts all file systems in the/etc/fstab file that support automatic mounting;
mount [Options] [-o options] DEVICE mount_point
[Options]: Command options
[-O options]: Mount options
Device: Devices to be mounted
(1) Device file:/dev/sda5
(2) Volume Label:-L ' LABEL '
(3) uuid:-u ' UUID '
(4) pseudo file system name
Mount_point: Mount point
Common options:
-T type: File system type
-r: Mount this file system as "read-only" mode
-W: Mount this file system in read-write mode
-N: Each file system will automatically update the/etc/mtab file when it is mounted,-n is used to prohibit this function;
At this point, if you want to view all the file systems that are mounted: cat/proc/mounts
-A: Automatically mount all devices that support automatic mounting;
-B: Bind the directory to another directory;
-O mount option:
Async: Async Mode
Sync: Synchronous mode
Atime/noatime: Whether to update the access timestamp;
Diratime/nodiratime: Whether to update the access timestamp of the directory;
Auto/noauto: Whether this device is allowed to be automatically mounted;
Exec/noexec: Whether the application is allowed to execute on this file system;
Dev/nodev: Whether to support the use of device files on this device;
Suid/nosuid:
Remount: Re-mount
Ro
rw
User/nouser: Is it permissible to mount the device normally;
ACL: whether to support the use of FACL on this device;
DEFAULTS:RW, suid, Dev, exec, auto, Nouser, and Async
Umount: Uninstall command
# Umount DEVICE
# Umount Mount_point
To view the process that is accessing the specified mount point:
# fuser-v Mount_point
Terminates all processes that are accessing the specified mount point:
# fuser-km Mount_point
Swap partition:
Free command:
View the usage status of memory and swap
-M: in megabytes
-G: in gigabytes
Mkswap: Creating Swap partitions
mkswap [option] DEVICE
-L ' LABEL '
Swapon: Enable swap partition
swapon [option] [DEVICE]
-A: Activate all swap partitions
-P Priority: set its precedence;
Swapoff: Disable swap partition
swapoff [option] [DEVICE]
A view of space occupancy information such as file systems:
Df:disk Free
-h:human-readable
Number of-i:inode
-P: Output in POSIX-compatible format
Du:disk usage
-h:human-readable
-s:summary
File system-related Mount profile:/etc/fstab
Each row defines a file system;
Device to mount or pseudo file system mount point file System type Mount options dump frequency self-test order
Devices to mount:
Device files, label=, uuid=, pseudo file system names
Mount Options:
Defaults
Dump frequency:
0: No dumps
1: Daily dumps
2: Dump every other day
Self-Test order:
0: No self-test
1: First self-test, usually only/only 1
2:
Linked files on the file system:
Hard Links:
Two paths pointing to the same inode
cannot be performed on the directory;
cannot be done across partitions
Multiple different paths pointing to the same inode; Creating a hard link to a file increases the reference count of the inode; deleting a hard link deletes only one of its access paths, and only the last path is deleted;
Symbolic Links:
The data of the linked file points to another file path;
Can be done to the directory;
can span partitions;
Point to another file path, not an inode;
Creating a symbolic link to a file does not increase its reference count, and deleting the original file will not make the symbolic link file.
ln [-S] SRC DEST
-s:symbolic Link
-v:verbose
File system and Disk Utility summary