Linux Storage Management:
?? ? disk controller, bus, interface
?? ? type of Disk interface:
?? ??? ? IDE: Parallel interface, from ata,133mbps,266mbps;
?? ??? ? SCSI: Small Computer system interface
?? ??? ??? ? ultrascsi320:320mbps
?? ??? ??? ? ultrascsi640:640mbps
?? ??? ??? ??? ? narrowband Controller: 7 Interfaces
?? ??? ??? ??? ? Broadband Controller: 15 Interfaces
?? ??? ? Sata:serial ATA, serial interface;
?? ??? ??? ? SATA1-SATA2-SATA3 (6Gbps) ...
?? ??? ? SAS: Serial Interface
?? ??? ??? 6Gbps, can connect 1023 (interface) hard disk
?? ??? ? USB:1.0 2.0 3.0 3.1
?? ??? ??? ? 2.0 60Mbps
?? ??? ??? ? 3.0 480Mbps
?? ??? ??? ? 3.1 10Gbps
?? ??? ? Another indicator for measuring disk IO capability: IOPS
?? ??? ??? ? IDE: Mechanical disk, 50-100 IOPS
?? ??? ??? ? SCSI: Mechanical disk, 100-200 IOPS
?? ??? ??? ??? ? Solid-State drives, up to IOPS
?? ??? ??? ? SATA: Mechanical disk, around 100 IOPS
?? ??? ??? ??? ?? Solid-state disk, around 400 IOPS
?? ??? ??? ? SAS: Mechanical disk, around 200 IOPS
?? ??? ??? ??? ? Solid-State disk, around 800 IOPS
?? ??? ??? ? SSD with PCI-E interface
?? ??? ??? ??? ? Read the IOPS:40-80 million
?? ??? ??? ??? Write the IOPS:5-10 million
?? ??? ? The interface of the disk controller on the common X86 motherboard:
?? ??? ??? ? Ide:2 interface, each interface with a primary disk and a slave disk, a total of four disks, if there is an optical drive, it may be reduced to three disks plus an optical drive;
?? ??? ??? ? Sata:4-6 an interface;
?? ??? ??? ? Scsi:7 or 15 interfaces;
?? ??? ??? ? sas:1023-16384 an interface;
?? ??? ? CPU: Control bus, data bus, address bus;
?? ? Mechanical Disk:
?? ??? Term
?? ??? ??? Track: Tracks, projections of the running trajectory of the head on the disk surface;
?? ??? ??? Sector: Sector, 512YTB (bytes), now referred to as the sector, is actually the average; minimum management unit;
?? ??? ??? Cylinder: cylinder, which is a cylindrical surface formed by projecting from a track to all platters, is actually composed of tracks of the same position on all platters;
?? ??? ??? Partition: partitions, all cylinder storage space from one cylinder to another cylinder;
?? ??? ??? Head: The head, each magnetic surface of each disc will have a head for the data read and write operation;
?? ??? ??? ?
?? ??? ??? ? Disk performance metrics:
?? ??? ??? Spindle speed; number of revolutions per minute of disk rotation
?? ??? ??? ? Average seek Time:
?? ??? ??? Cache
?? The/dev is used to store the mapped files of the hardware devices, and the disk's device files are also stored here;
?? ? Device files: Is the access entry for the drivers and devices associated to the hardware device;?? ?
?? ? Device number: (no more than 255 device number)
?? ??? ? major,minor
?? ??? Major: The main device number, which distinguishes the device types of different devices and is used to indicate the drivers required by the device;
?? ??? Minor: Secondary equipment number, different equipment in the same type of equipment, used to provide access to the equipment entrance;
?? ? Device Type:
?? ??? ? Block device:
?? ??? ??? A device that randomly accesses a block as a basic unit, usually a device that stores data;
?? ??? ? character device:
?? ??? ??? A device that provides linear access in bytes as a basic unit, usually a device that processes data;
?? ? device file Name: (formerly named by the IANA and given to ICANN for unified naming)
?? ??? ?/dev
?? ??? ??? ? IDE:HD[A-D]
?? ??? ??? ? scsi| sata| sas| usb:sd[a-z]+
?? ??? ? RedHat Enterprise Linux starts with RHEL6, and the IDE interface's disk is also named sd*, and since then all disk devices have been uniformly named sd[a-z]+.
?? ? How the device is referenced:
?? ??? ? 1. device file name
?? ??? ? 2. Label (Volume lable)
?? ??? ? 3.UUID: Globally unique identifier, Universal unique IDentifier (recommended)
Mknod command
Format: Mknod [options] name {BC} major minor
Create a device file and give the specified major and minor version numbers
How to use the new disk device:
?? 1. Let the Linux system kernel identify the device and partition the device;
?? ? 2. Formatting
?? ??? ? Low-level format: disk initialization, track division;
?? ??? Advanced formatting: Creating or rebuilding a file system;
?? ? 3. Using the file system:
?? ??? ? mount
?? ??? ? uninstall
?? ? Why partition?
?? ??? ? 1. Can optimize disk IO performance;
?? ??? ? 2. You can achieve a quota limit on a storage space;
?? ??? 3. Perform high-speed disk problem repair;
?? ??? ? 4. Isolate system files and other application files;
?? ??? ? 5. Install multiple operating systems;
?? ? How to Partition?
?? ??? ? MBR: The entire disk space is less than 2TB capacity, the MBR partition format is recommended;
?? ??? ??? ? Mbr:master boot record, master boot recording, started in 1982;
?? ??? ??? ??? ? MBR is also a piece of data, the default is saved in the disk 0 track 0 sector;
?? ??? ??? ??? ? Divided into three parts:
?? ??? ??? ??? ??? ? 446Bytes (bytes): boot loader, boot loader;
?? ??? ??? ??? ??? ??? ? Windows:ntldr
?? ??? ??? ??? ??? ??? ? Linux:lilo,grub (default)
?? ??? ??? ??? ??? ? 64Bytes (bytes): Partition table, partition table; Each 16Bytes is a section that indicates the contents of a partition, so the default is up to four partitions;
?? ??? ??? ??? ??? ??? ? 1. There are up to four primary partitions; the numbers are: 1.2.3.4.
?? ??? ??? ??? ??? ??? ? 2. If you want to divide the number of partitions, you can change any primary partition to an extended partition and create a logical partition in the extended partition;
?? ??? ??? ??? ??? ??? ??? The logical partition number defaults from 5, regardless of whether the first four digits are occupied;
?? ??? ??? ??? ??? ????? Note: The extended partition can have no, but only one at most;
?? ??? ??? ??? ????
???????????????????? 2BYTE:MBR end tag, 55AA (normal end);
?? ??? ? GPT: GPT partition format is recommended if you exceed 2TB disk capacity????? Guid? Partition table, support 128 primary partition;
?? ? Common partitioning tools under Linux:
?? ??? FDISK: For creating and managing MBR partitions, you can manage up to 15 partitions on the same disk;
?? ??? Gdisk: Used to create and manage GPT partitions;
?? ??? Note: If you use Fdisk or the Gdisk command to partition the remaining space of a disk that already has a partition mounted, it will not be immediately recognized by the kernel even if the result of the partition is saved.
??? ??? ??? ??? ? You want the kernel to recognize this type of new partitioning method:
??? ??? ??? ??? ??? ? 1. Restart the computer;
??? ??? ??? ??? ??? ? 2. Force the kernel to reread the partition table?
??? ??? ??? ??? ??? ??? ? partprobe command? Or? PARTX command
??? ??? ??? ??? ??? ??? ? In the Rhel or CentOS system 5|7:
??? ??? ??? ??? ??? ??? ??? ? partprobe?? [Device]?? If omitting the device name indicates that the partition table of all devices is stressed, it is strongly recommended to give the disk device name;
??? ??? ??? ??? ??? ??? ? In the Rhel or CentOS system 6|7:
??? ??? ??? ??? ??? ??? ??? ? partx? -A? [Decice]
??? ??? ? fdisk Partitioning Tool
??? ??? Fdisk-linux partition Table Operation Tool Software
??? ??? Format
??? ??? ? fdisk? Device
??? ??? ? fdisk? -l? [Device]
??? ??? Options
??? ??? ??? ?-L: Indicates the meaning of the view, such as the name of the device to see the partition Table of the development device, otherwise view all disk device files partition table;
??? ??? ??? ? fdisk device
?? ??? ??? ? partition management and operation for the specified device;
?? ??? ??? ? Command Action
?? ?? ??? ??? ? d?? Delete a partition
?? ?? ??? ??? L?? List known partition types
?? ?? ??? ??? ? m?? Print this menu
?? ?? ??? ??? ? n?? Add a new partition
?? ?? ??? ??? ? p?? Print the partition table
?? ?? ??? ??? ? q?? Quit without saving changes
?? ?? ??? ??? ? t?? Change a partition ' s system ID
?? ?? ??? ??? ? w?? Write table to disk and exit
The process of creating a partition in Fdisk interactive Menu mode:
?? ?---P|e|l? -->? Start sector (cylinder) of the partition, direct carriage return using default value settings? -->? The end sector (cylinder) of the partition, or the +# Unit (unit), can be used to specify the partition size directly;
?? ???? parted command: Advanced Partition tool, its operation result is effective in real time;
?? ???? Format:
?? ??? ??? parted [options] [Device [command [Options ...] ...]]
?? ???? Example:
?? ??? ??? ? ~]# PARTED/DEV/SDA Mkpart logical 103GB 105GB
?? ??? ??? ? ~]# PARTED/DEV/SDA RM 8
?? To add a SCSI interface disk to this server when powered on, to enable the device to be identified within and create the appropriate device files, there are the following methods:
?? ??? ? 1. Restart the computer;
?? ??? 2.~]# echo "---" >/sys/class/scsi_host/host2/scan
?? ??? ??? Force the kernel to identify the disk device of the new SCSI interface that is hot-plugged in the power-up state;
Linux System Management----storage Management (i)