Linux disk management 1: Linux disk management
Linux disk management:
MBR: Master Boot Record (512 bytes)
Master Boot Record
Main Boot Record
446 bytes: BootLoader, system boot program
64 bytes:
16 bytes: indicates a partition for each 16 bytes.
2 bytes: Magic Number
55AA
Ln [-s-v] SRC DEST
-S indicates soft connection
-V shows the creation process
No option indicates creating a hard link
Hard link:
1. It can only correspond to files and cannot correspond to directories.
2. Cross-file systems are not supported;
3. Creating a hard link increases the number of times the file is linked.
Symbolic Link:
1. Applicable to directories
2. Cross-File System
3. no increase in the number of connected files
4. Its size is the number of characters contained in the specified path
Du:
Du-sh
Df:
Device File:/dev
B: Block devices
C: character device
Mknod
Mknod [options]... name type [major minor]
-M MODE
Name of the device file of the hard disk device:
IDE, ATA: hd
SATA: sd
SCSI: sd
USB: sd
A, B, c,... to distinguish different devices of the same type
IDE:
First IDE port: master and slave
/Dev/hda,/dev/hdb
Second IDE port: master and slave
/Dev/hdc,/dev/hdd
Sda, sdb, sdc ,...
Hda:
Hda1: the first primary Partition
Hda2:
Hda3:
Hda4:
Hda5: the first logical Partition
Check that the current system recognizes several hard disks:
Fdisk-l [/dev/to/some_device_file]
Manage disk partitions:
Fdisk/dev/sda
P: displays the partition of the current hard disk, including unsaved changes.
N: Create a New partition.
E: extended partition
P: Primary Partition
D: delete a partition.
W: Save and exit
Q: Do not save and exit
T: Modify the partition type.
L:
L: Display All supported types
Partprobe
Reload the Partition Table
File systems supported by Linux: