Linux System Administration 06-- Disk Management

First, the disk structure

1, the physical structure of the hard disk

Discs: 1-3 platters, each platter has two sides

Head: the head on each side a

2, the hard disk data structure

Sector: The disk is divided into a plurality of fan-shaped area, storage area for each sector of 512 bytes

Track: unified disc concentric circles of different radii

Cylindrical: cylindrical surfaces having different radii, the radius of the same configuration

3, the storage capacity of a hard disk head * = Number of tracks (cylinders) * the number of sectors per track * bytes per sector

 

Second, the disk interface

Individual level: IDE, SATA

Enterprise: FC interfaces

300-600: SAS, SCSI Interface

Hard drive size: 2.5

Desktops: 3.5

 

Three, MBR

1, MBR (Master Boot Record, 512 bytes total)

2, position: located at the first physical sector of the hard disk, tracks 0, 0 cylinders

3, the master boot program and includes a hard disk partition table. Partition table recording area of ​​four partitions, each partition representing recording region 16 bytes of 64 bytes. 446 bytes for storing the master boot program, 2-byte checksum.

 

Fourth, the disk partition represents

1、/dev/hda5

/ Dev /: hardware catalog file is located

hd: represents the IDE devices.

sd: the SCSI device

a: hard disk sequentially, with the letters a, b, c ...... represents

5: the first logical partition extended partition

2, only four primary partition the hard disk, the primary and extended partitions limited number of 1 to 4. Extended partition divided into logical partitions, the logical partition number is always started from the 5

Fifth, the file system: organize file storage

1, ext4: fourth-generation extended file system

     List storing files and directory partitions

     A typical journaling file

     The system is used by default

2, swap, swap file system (similar to virtual memory)

     Create the swap partition for linux system

3, linux supports other file types

     FAT16、FAT32、NIFS、XFS

 Sixth, to detect and confirm the new format the hard disk fdisk -l

1, format: fdisk the -l

     Boot: whether the boot partition. Is the case with "*" logo.

     Blocks: block default size 1024 bytes

Seven hard disk partition plan

1, format: fdisk   [disk device]

     p: View a list of partition information

     n: New Partition

     d: delete partition

     w: Save the partition settings and exit

     q: give up the partition settings and exit

     t: Change Partition Type

     ctrl + backspace: delete character input error

2, after saving, loading area list for zoning changes

     partporbe   /dev/sdb

3, more than the size of the partition plan of 2T parted command

   mklabel: change the file type hard disk

   mkpart: partition

   rm 3: Delete Partition 3

Guess you like

Origin www.cnblogs.com/tanxiaojuncom/p/11288236.html