Linux system partition and format

 

System partition

  1. Disk partition (logically)

The purpose of data access and access easier, the large partition into smaller partitions

1)  partition table: the MBR partition table (MBR partition table): maximum support 2.1TB hard disk (not larger hard disk but can not be used to identify up to 2.1TB). It supports up to four partitions (per hard disk).

GPT partition table (globally unique identifier partition table): Support 9.4ZB hard disk (1ZB = 1024PB, 1PB = 1024EB, 1EB = 1024TB). The number of partitions supported theoretically there is no limit, but the limit of 128 primary Windows partition.

2)  partition type ( the MBR)

Primary partition: You can only have up to four

Extended partition (breakthrough at most four partitions limits): each hard disk up to a extended partition, the primary partition plus up to four extended partition, the extended partition can not be formatted data can not be written, only contains logical partitions. DETAILED hard disk interface set depending on the number, at least 10.

More logical partitions can be divided, no matter how logical partitions are partitions from number 5 to start.

  1. format

Partition light has not yet written data needs to be formatted.

Formatting is not to delete data (data only cover), but to write to the file system

Format: (high-level format), also known as a logical format, the purpose is to write the file system ( the FAT16, the FAT32, the NTFS EXT2, EXT3, EXT4 etc.) writing the specific data in a specific area of the disk, divided in a partition allocation table used to store files, directories, disk space used for file management.

block: 4KB data blocks (not necessarily in a row, the system will try next) is the smallest unit of data storage, which means that when less than 4KB, the extra space will be wasted, and this is why the label and the actual capacity of the hard disk gap.

Inode: I node 128B byte size of main memory Inode permission number of time, almost every file has a node number. There may be filled (fixed size) do not unlimited upload an empty file.

Device file name and mount point

  1. Device file name: / dev / hda1 (IDE hard disk interface)

/ Dev / sda1 (SCSI hard disk interface, SATA hard disk interface (currently used))

Under Linux also recognized as a USB interface SATA

Wherein A represents a first hard disk, numeral 1 denotes a first partition, the second block sdb5
first logical partition of the SATA hard drives.

  1. Mount points (equivalent to a Windows drive letter, there are differences)

Use empty directory already exists as a mount point, all the empty directory (addition / bin / lib / except etc)

And a Windows drive letter is basically the same effect, entry into the partition to access the data. The process equipment and be connected to the mount points mount.

Mount:

Must be partitioned: / (root partition)

   swap partition (swap) --- virtual memory (when lack of real machine memory, help expand memory)

If that memory is less than 4GB, swap it should be twice the memory

If that memory is larger than 4GB, swap and memory consistent on the line

Experimental environment is not more than 2G

Recommended Zoning: / the Boot (boot partition, 1GB) any system at boot time should release part of the space (tens M), is insufficient space systems can not be opened. ---- production environment must exist

Frequent Partitions: / Home (for file servers)

  / Www (a web server)

Guess you like

Origin www.cnblogs.com/plutozzl/p/11258576.html