The 30th day of Linux and Me

Source: Internet
Author: User

Now we have a difficult problem, learn new knowledge, and forget the knowledge in front. It's a tangle.

application and practice of disk quotas (Quota)

general use of Quota:

For network services There is WWW server: Everyone's web space capacity limit;Mailserver: Message space limit for everyone;file Server : Maximum available network hard disk space for everyone.

The settings on the Linux system host limit the maximum disk quotas that a user group can use (using User group restrictions), limit the maximum disk quotas for a user (using user restrictions) , and Link To make the message available as a restricted quota (change /var/spool/mail this path).

Quota Usage Restrictions: Only for the entire file system, the kernel must support Quota;Quota log files; only valid for general identity users.

QuotaThe specification setting options:1.capacity limit or quantity limit (BlockorInode): LimitInodeAmount to manage the number of "files" that users can create to limitBlockusage to manage user disk capacity limits, the more commonBlockmanagement;2.soft/hard: Hardindicates that the user will never exceed this limit value,Softindicates that the user is belowSoftlimit, the disk can be used normally, but ifSoftand below Hardlimit value, each time the user logs on to the system, the system will actively issue the disk will be full of speech information, and will give a grace time;3.Grace Time (Grace TimeThis grace time is only available when the user's disk usage is betweenSoftto the Hard, a time that will only appear and will be counted down, typically the default grace time is7days, if7you do not have Disk Management in the days, thenSoftlimit values are replaced immediately Hardlimit values to be used asQuotathe restrictions.

Time Quota process:

1. file system support;

2. Create a new Quota configuration file;

3.Quota start, close and limit settings;

4.Quota limit value of the report;

5. testing and management.

Software disk array (software RAID)

disk array (redundantarrays of inexpensive disks raid raid By combining several smaller disks into a larger disk device, this larger disk capability is not only stored, but also has data protection capabilities. The entire raid Because of the chosen level ( level ) different, The integrated disks have different functions.

RAID-0(isometric mode,stripe): The best performance, the data will be placed in the same amount on each disk, the security is poor, as long as any disk is damaged, in the RAID All the data above will be lost and unreadable. (using the same model and capacity of the disk composition effect is better)

RAID-1(image mode,mirror): Full backup, the same data is intact on both disks, but the overall RAID capacity is almost reduced 50%, High security performance, can complete data backup. (Requires the same disk capacity)

Raid-0+1,raid-1+0:RAID-0performance But the data is not secure,RAID-1data security but poor performance. Useraid-0+1It is possible to integrate the two together, first let2Block Disk compositionRAID-0, and set up a total of two groups, and then the two groupsRAID-0and make up a groupRAID-1. raid-1+0In contrast to this. This hasRAID-0, so performance is improved, withRAID-1data can be backed up, but also due to theRAID-1, so half of the total capacity is used as a backup.

RAID-5: Balance between performance and data backup,RAID-5 requires at least more than 3 disks to form this type of array, using the same bit-check data for rescue when a disk is damaged, Total capacity of RAID-5 Hu ishi The overall number of disks is reduced by one piece, andRAID-5 only supports the damage of one disk by default.

Spare disk: Prepares the disks so that the system can be rebuilt in real time when the hard drive is broken, requiring one or more disks that are not included in the original disk array level as a preliminary disk.

Advantages of the disk array:

Data security and reliability: When disk hardware is damaged, data can be safely rescued and used;

Read and write performance: can enhance the reading and writing performance, such as RAID-0, so that the system I/o parts improved;

Capacity: Multiple disks can be combined so that a single file system can have a large capacity.

Hardware disk array (hardware RAID) is the purpose of the array through the disk card, the disk array card has a dedicated chip on the task of processing RAID , so in terms of performance will be better. But the price is expensive.

Because the disk array has many excellent features, but the hardware disk array card price is very high, so there is the development of the use of software emulation disk array function, this is the software disk array (software RAID), software disk array mainly through the software to simulate the array of tasks, Therefore, the loss of more system resources, such as CPU operation and I/O bus resources, are now superior computer performance, these speed limits are no longer present.

The generic hardware disk array has a device file name of Dev/sd[a-p]because of the module that uses SCSI. The device filename for the software disk array is the system's device file, and the file name is /dev/md0,/dev/md1.


This article from "Open Can't Knock theme" blog, declined reprint!

The 30th day of Linux and Me

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.