Linux----Hard disk partitioning

Source: Internet
Author: User
Tags ide hard drive

Hard disk Partitioning
    • Divide a large hard drive into small logical partitions
Partition type Primary partition
    • There can be up to 4
Extended partition
    • There can be at most one
    • Primary partition + extended partition up to 4
    • Features of Extended partitioning
      • An extended partition cannot be formatted or holds data, but can be used to store logical partitions
Formatting
    • That is, logical formatting (advanced formatting), to write to the file system on the hard disk

    • Writes specific data to a specific area of the disk based on a user-specified file system, and draws a partition that contains disk space for file allocation tables, table of contents tables, etc. for file management

      • File systems that Windows can recognize: FAT16, FAT32, NTFS
      • Linux recognized file system: EXT2, EXT3, EXT4 (centos6.3,4kb space, if a file larger than 4Kb, such as 6Kb, then will occupy 2 units)
    • Objective:

      • Writing to the file system on the hard disk
        1. Divide the hard disk into chunks of equal size (block) according to the rules of the file system
        2. Set up a list of I nodes, find the file by the I node number to find the location of the file, take out the data
    • Disk Grooming:

      • The data blocks that hold the same file are allocated as much as possible to benefit the reading of the data
Hardware Device file name

Define a device file name for each partition

    • IDE hard drive:/dev/hd[a-d]
    • Scsi/sata/usb hard drive:/dev/sd[a-p]
    • Optical drive:/dev/csrom or/dev/sr0
    • Floppy:/dev/fd[0-1]
    • Mouse:/dev/mouse
Partition Device file name
    • Add a number directly to the hardware device file name
      • /dev/sda1Indicates SATA, SCSI hard Drive interface
      • Attention
        • Logical partitions in an extended partition can only start at 5, and 1-4 can be left to primary and logical partitions
Mount
    • A mount in Windows is called an "allocation letter", and the process of assigning a drive letter to a partition in Linux is called mounting, and the drive letter is called a mount point in Linux
    • You must specify a mount point for the partition before you normally use the partition, and the mount point must be an empty directory
Must be partitioned
    • Linux will empty directory name as a drive letter, in theory any directory can be used as a drive letter, but some do not
    • Must be partitioned
      • /Root partition
      • swappartition, or swap partition (virtual memory), typically twice times the size of memory, not exceeding 2GB
Recommended partitioning
    • /bootboot partition, 200MB
      • Allow /boot folder partitioning to ensure Linux starts normally
Using partitions
    • Partition-format-to-partition device file name--write mount point (hanging letter)
File system Structure

Linux----Hard disk partitioning

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.