Linux Disk Management

Source: Internet
Author: User

I/O Ports

The I/O device address is a series of small storage devices, namely buffers, mainly used to communicate with the CPU, and then the CPU triggers the kernel to complete the reception or transmission of data, so the IO device typically uses two ports two buffers.

in the Linux system All files, so the programmer need to understand the IO call is very concise, its basic process is:open ()àread ()àwrite ()à close ();

Linux device File Types

Block Device:block, Access unit "blocks", typical device is disk

character device:char, Access unit "character", typical device is keyboard

Device file function: Connected to a device driver, which can communicate with the corresponding hardware device;

For hardware and system level, the system is mainly managed by the device number, the device number is divided into:

main device number:Majornumber, identifying the device type

Secondary device number:Minornumber, identifies different devices under the same type

HDD Interface type: Parallel + serial

Parallel: line parallel transmission of data

IDE:133mb/s

SCSI:640mb/s(SCSI is more process - specific than IDE, 4 times The lifetime of the IDE )

Serial port: Serial transmission of data on line

SATA:6Gbps(750mb/s)

SAS:6Gbps(750mb/s)

USB:480mb/s


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/89/wKiom1Xlq4aA95ugAADRQIljgQo347.jpg "style=" float: left;width:294px;height:198px; "title=" IDE Interface "width=" 294 "height=" 198 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1xlq4aa95ugaadrqiljgqo347.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/85/wKioL1XlraaismyJAAFVFBlREyo661.jpg "style=" width : 289px;height:198px; "title=" SCSI Interface "width=" 289 "height=" 198 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1xlraaismyjaafvfblreyo661.jpg "/>


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/89/wKiom1XlrFmhGCl7AADtK61oy-A265.jpg "style=" width : 271px;height:198px; "title=" SAS Interface "width=" 271 "height=" 198 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1xlrfmhgcl7aadtk61oy-a265.jpg "/> 650) this.width=650; src=" http://s3.51cto.com/wyfs02/M00/72/85/ Wkiol1xlrnqtlj_qaagbbux_rnu758.jpg "style=" width:263px;height:198px; "title=" SATA Interface "width=" 263 "height=" 198 " Border= "0" hspace= "0" vspace= "0" alt= "wkiol1xlrnqtlj_qaagbbux_rnu758.jpg"/>

Note: The above mentioned transfer rate is the interface rate is not the actual experience rate


partitions are partitioned by cylinders, we call 0 tracks 0 sectors MBR:(Master Boot Record, is a program), capacity is 512bytes , of which:

446bytes:boot loader boot loader

64bytes: Partition table (to soft damage the hard drive as long as the hard disk partition table is OK )

16bytes: identifies a partition, so a hard disk can have up to 4 partitions

2BYTES:55AA Validity Identification of the current MBR

4 primary partitions;

3 Primary partition +1 extended partition (N logical partitions)

logical partition (logical partition number must be starting from 5 drops)

partition management tools for Linux:fdisk,parted, Sfdisk

Fdisk: For a hard drive, you can manage up to a maximum of one partition;

# Fdisk-l [-u][device ...]

Subcommands: Administrative functions

P:print, showing existing partitions;

N:new, creating

D:delete, deleting

W:write, write to disk and exit

Q:quit, discard the update and exit

M: Get help

L: the partition ID of the list

T: adjust the partition ID


Example: FDISK/DEV/SDA Creating a new partition/dev/sda4/dev/sda5

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/72/86/wKioL1XlsHzTr-vAAADP-AYYK5g075.jpg "title=" fdisk Establish the partition "alt=" Wkiol1xlshztr-vaaadp-ayyk5g075.jpg "/>


To see if the kernel has identified a new partition:

# cat/proc/partitions

Notifies the kernel to re-read the hard disk partition table:

Partx-a/dev/device

CentOS 5: using partprobe

Partprobe[/dev/device]





This article is from "snail" blog, please be sure to keep this source http://zhangwj.blog.51cto.com/10609913/1690590

Linux Disk Management

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.