Linux Disk partitioning

Source: Internet
Author: User

What is the difference between a system and a four-position system?

1. different design intentions:

the first-level system is considered as a normal user design;

the system is for scientific operations and large operations.

2. Configure different

the system can not be installed on the three-position , hardware does not support;

The position can be installed in A number of positions, but the maximum performance cannot be played.

3. different speed of operation

4. different addressing capabilities

The largest physical memory is 128G, or even 16TB of virtual memory;

The theoretical physical memory is 4G, if you want to use larger memory, need to use INTEL,PAE kernel support, more than 4G of memory.

5. software popularization is different;

Linux Look at the system version

Cat/etc/redhat-release

look at the kernel version:uname-r

look at the operating system uname-m

Uname-a Print out all the above things;

in order to maximize memory utilization, maximize the performance of the hardware, the most commonly used system

disk before use to partition: Primary partition, extended partition, logical partition, a hard disk can have up to 4 primary partitions, can be divided into 3p+1e, or 2p+1e or 1p+1e, up to one extended partition, must be partitioned on the extended partition to be used, and then formatted (creating a file system, a mechanism for storing data), then the village data or installation system.

Ll/dev Display all devices, CDROM, HDD, floppy Drive

ll/dev/sd* Show all the Partitions

Sas SATA USB is a scsi interface

Sda SD represents the SCSI interface,a means the first disk

Sda1,sda2,sda3 1,2,3 to represent 3 partitions

partition number 1-4 can only be given to primary partitions, logical partitions can only start after 5

Linux requirements for partitioning

1. There is at least one partition

2.Swap partition is optional, generally physical memory 1.5 times, long 8-16g can

3. boot partition /boot 200M

General partitioning Scheme

1,/ remaining disk size

    1. /boot 100-200m
    2. Swap 1.5 times physical Memory

DB and storage (database storage, important data applications)

/data/: The remaining disk size, put the data, to prevent data loss, the equivalent of windows C Drive, not only a C Drive, You have to have d,e,f disk, reload the system, the data may be lost.

/50-200g

swap:1.5 Times

/boot:100m

How to solve the problem of partition full storage: Monitoring, if the disk remaining 20%, alarm SMS

LVM adjusts partition size online, produces hardware RAID, and combines multiple disks instead of LVM and soft RAID.

Echo 123> A.txt

Echo 124> B.txt

Diff a.txt B.txt

Compare two files, only with eyes to see the difference

Vimdiff a.txt B.txt

Compare the differences between two files

Exit is q!

For system optimization:

hostname Try not to use localhost, late will make a lot of software installation problems

Modify Host Name:

1.vi/etc/sysconfig/network

2. Modify Host Name

3.vi/etc/hosts to modify the first row host name

4.Reboot

Su- user name, is the switch user, if the bar is to switch the entire environment past,

Echo 123456|passwd--stdin Oldboy This method does not require interaction

History found oldboy password Clear display, so that he does not show the password

the history-d line number will display the clear

History-c emptying History

Yum and rpm are Software installation commands,andYum solves the dependency between packages and packages.

Backup required before modification:

Linux Disk partitioning

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.