Linux Disk Management

Source: Internet
Author: User

One

Device Type:

Block device: Random access, data exchange unit "block"

Character (character): linear access, Data interchange unit for character

Device file: FHS (LSB) file system level standard

/dev/

Device file associated device driver

Device number:

Major: The main device number distinguishes the device class to indicate the required driver

Minor: the secondary device number distinguishes the same device from different individuals


Mknod:

Mknod [OPTION] ... NAME TYPE [MAJOR MINOR]

-M,

File name of the device file (ICANN):

Disk device files:

IDE interface (ATA): Parallel, 133mb/s

Two IDE controllers: Each controller can intervene two disks through the cable, one from

/dev/ha[a-z][#]

Tag device tag disk partition

/DEV/HDA1,/DEV/HDB2,/DEV/HDC,/DEV/HDD,


SCSI interface: Parallel, 320mb/s industrial level

SATA interface: Serial, 6GPBS

USB interface: Serial, 5GPBS

SAS interface: Serial,

/dev/ad[a-z][#]

Track:

Sector:

Cylindrical Surface:

Partition:

Seek time: Average seek time

Mbr:0 Track 0 sector, main boot sector (master boot record), 512B

Divided into three parts:

446bytes:bootloader, OS Loader

64bytes:16bytes marking a partition

2BYTES:55AA whether the current MBR information is valid

Gpt:



Partition Identification method:

Primary partition 1-4

Extended partition

Logical partition: 5+


fdisk Command

1,-l View all identified disk devices

Fdisk-l/dev/[hs]d[a-z][1-9]

2. Managing partitions

FDISK/DEV/[HS]D[A-Z]

FDISK provides an interactive interface to manage partitions, and it has a number of subcommands for different management functions, all of which are done in memory.

Common commands:

P: Show existing partition table

N: Create a new partition

D: Delete an existing partition

T: Modify the partition ID

L: See which partition IDs are supported

W: Save exit Note: It is important to note that if the disk does not have any partitions, the kernel can automatically reread the partition table to identify the partition and synchronize to disk. If it is an existing partition of the disk, there will be a warning message, not recognized, can not be the next format, to be restarted. Was previously operating on a virtual machine, and did not notice the problem

Q: Do not save exit

M: Display Help information

To see if the kernel has identified a new partition

Cat/proc/partitions

Fdisk-l command can see the egg, the format is not found

Notifies the kernel to force re-reading of the partition table:

CentOS 5:partprobe/dev/device

CentOS 6:partx-a/dev/sd[a-z]

or kpartx-af/dev/sd[a-z] Note: A successful read of a partition may require a command to repeat 2 or more times

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.