Detailed Naming Rules for CentOS Disks and Partitions

Time:2019-9-5

In Linux, there is no concept of disc character. The device name is used to access the device. The device name is stored in the / dev directory.

The SD, SAS and SATA hard disks mentioned above all belong to SCSI interface type. They are identified by SD in Linux, while IDE hard disks belong to IDE interface type and are identified by HD in Linux.

In Linux, the naming rules for different hard disks are as follows:

The first SCSI interface type hard disk: / dev / SDA

The second SCSI interface type hard disk: / dev / SDB

The first IDE interface type hard disk: / dev / HDA

The second IDE interface type hard disk: / dev / HDB

Regarding the partition of hard disk, a hard disk can only have four main partitions or three main partitions plus one extended partition, i.e. serial number 1-4 is reserved for the main partition or extended partition. The main partition and extended partition add up to four, and the main partition and extended partition are horizontal. A hard disk can only have one extended partition at most, but the extended partition can not be used to store data directly. It needs to be divided into several logical partitions. Therefore, from the above, we can see that the number of logical partition must start from 5.

Partitioning scheme in Linux:

3p+1e or 2p+1e or 1p+1e

Partition number in Linux:

The first partition of the first SCSI interface type hard disk: / dev / sda1

Fifth partition of the first SCSI interface type hard disk: / dev / sda5

The first partition of the first IDE interface type hard disk: / dev / hda1

Fifth partition of the first IDE interface type hard disk: / dev / hda5

Recommended Today

The selector returned by ngrx store createselector performs one-step debugging of fetching logic

Test source code: import { Component } from ‘@angular/core’; import { createSelector } from ‘@ngrx/store’; export interface State { counter1: number; counter2: number; } export const selectCounter1 = (state: State) => state.counter1; export const selectCounter2 = (state: State) => state.counter2; export const selectTotal = createSelector( selectCounter1, selectCounter2, (counter1, counter2) => counter1 + counter2 ); // […]