Linux System Storage

Source: Internet
Author: User

Linux System Management

1. Storage Management

Traditional disk Partitioning

RAID technology, implementation of soft raid

Lvm

File Management System

Ext XFS Btrfs

2. Package Management

RPM Yum DNF

3.sed gawk

4. Process Management

5. Network Management

Networking Basics (Cisco CCNA+CCNP)

Attribute management of the network

Parameter detection of the network

6.Linux Kernel Management

Compiling and installing the kernel

Clipping of the kernel

Custom kernels

7.Linux system Start-up process

CENTOS5, 6, 7

8. System Installation

With Kickstart, DHCP, PXE

The perfect 9.shell script

Linux Storage Management

The interface type of the disk

IDE: The same port comes from the ATA 133Mbps

SCSI: the same port

ultrascsi320:320mbps

ultrascsi640:640mbps

Sata:serial ATA Serial Port

SAS Serial Port

6Gbps

SATA can connect to SAS

SAS cannot connect SATA

Usb

Dual Channel

IOPS per second IO times

IDE: Mechanical HDD 50IOPS

SCSI: Mechanical hard disk, 100-200

Solid-state drive around 400

SATA: Mechanical HDD 100 or so

Solid-state drive around 400

SAS: Mechanical HDD 200

Solid-state Drive around 800

PCI-E Solid State Drive 100000+

IDE: Two ports on the motherboard, 4 IDE hard drives

Sats:4~6 Block Hard Drive

SCSI: Narrow 7 Wide 15

sas:16384 HDD

Machinist Hard Drive

Track: Tracks,

Sector: Sector, 512Bytes now the sector is actually mean

Cylinder: Cylindrical, projecting from track to all platters

Partition: Partitioning, which is a cylinder-based storage space

Head: Head, each disk surface has a head;

Device File/dev

Device files are access portals to drivers and devices that are associated to hardware devices;

Device number:

Major: Main device number, distinguishing device type, used to indicate the driver required by the device

Minor: The secondary device number, distinguishing between different devices under the same type, is the access entry for a particular device

Mknod command: Make block or character special files

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

-M:

Device type

C-Character device: A device used for linear access, where the exchange unit of data is typically a character

B-block devices: devices for random access, data storage and swap units are blocks

Device file name:

/dev/

IDE:HD[A-D]

SCSI/SATA/USB:SD[A-Z]

RHEL6,CENTOS6 start

All interface types of hard disk devices are uniformly named Sd[a-z]

How devices are referenced:

Device file name

Volume label (Volume lable) reference

UUID: Globally unique identifier, 128bit

How to use a new hard drive device

1. Partitioning

2. Create file system (format)

3. Mount Partitions

Why partitioning

1. Optimizing I/O performance

2. Implementing quota limits for disk space

3. Make a call to repair

4. Isolating system files and other program files

5. Install multiple operating systems

How to Partition

MBR: Hard disk space less than 2TB

Master boot record main boot records originated in 1982,

0 Track 0 Sector: 512byte

446bytes:boot loader, boot loader, GRUB

64bytes:partition table Partition Table Each 16byte indicates the contents of a partition; A total of 4 primary partitions

Attention:

1. The primary partition + spread partition has a maximum of 4, and its partition table number is sequentially 1,2,3,4

2. The logical partition number starts from 5, regardless of whether the previous 4 digit number is occupied,

2bytes: End Tag 55AA

GPT: Hard disk space greater than 2TB

GUID Partition table,guid partition table, supports 128 partitions,

UEFI (Unified extended Firmware Interface) hardware is capable of supporting GPT Boot Legacy

Commonly used partitioning tools

Fdisk

For managing and creating MBR partitions, up to 15 partitions can be managed for a hard disk

Gdisk:gnu disk

Used to create and manage GPT partitions,

If you use the Fdisk or Gdisk command to repartition the remaining space of a disk that has already been partitioned and mounted, the partition's information will not be re-read by the kernel, even if it is saved, if you want the kernel to recognize such a partition: 1. Restart the computer 2. Partprobe command or PARTX command to force the kernel to reread the partition table;

In CENTOS5 or 7 you can use PARTPROBE-A [device] If you omit the unit name, it means that the partition table of all disks is reread

CENTOS6/7: partx-a [Device]

KPARTX-AF [Device]

Parted

Advanced partitioning tool, effective in real time

parted [options] [Device [command [Options ...] ...]]


Fdisk Partitioning Example

Fdisk-l [Device ...]

View the partition table for the specified disk, or all disk partitions if device is omitted

FDISK subcommand

D Delete Partition

L list known partitions

M Help List

n Add a partition

N Sub-command

E

P

L

P Show partition table in interactive mode

Q Exit and do not save changes

t change the partition ID

W to do the operation

echo '---' >/sys/class/scsi_host/host2/scan

Force the kernel to identify the disks that are plugged into the SCSI interface on the boot state

Which--Skip-alias LS &>/dev/null to determine if a command exists


Linux System Storage

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.