Talking about Exchange Server Mail Storage System - Skills (Transfer)

xiaoxiao2021-03-06  41

Guide: After understanding the work mode and characteristics of the Exchange Server Store, we will then introduce some mail storage systems management skills. The administrator will have more understanding of these techniques after mastering the principles, and do their bamboo in the actual work. Exchange Storage System Software and Hardware Selection and Design We first take a look at how to select the appropriate disk hardware for Exchange Server's database files and log files. According to the role of database recovery according to the Log files set forth in the previous article, we know that when the database is corrupted, by restoring the backup and utilizing the system existing log files on the tape, the database can be restored to the problem. One state. Therefore, database files and log files need to be stored on different physical disks to prevent disk hardware failures caused by database and logs at the same time. Microsoft's documents are clearly pointed out that any of the data in both database or logs can be restored under the premise of having a valid backup. However, if the database and log are damaged, it can only be restored to the backup time by restoring the backup. Usually important server storage systems in the enterprise generally use RAID arrays implemented by hardware systems. Common RAID systems have RAID 5 and RAID 1. These two system features are as follows: RAID 5: Write data to disk in the array, parked on each disc in the array, allowing a single disk to be erroneous. RAID 5 is also secure data of the data check digits, but it is not stored in a separate hard drive, but stores the check digits of the data segment to each hard disk. Such any hard disk is corrupted, and the damaged data can be rebuilt according to the check digits on other hard drives. The utilization rate of the hard disk is (N-1 / N)%. RAID1 divides the hard drives in the disk array into the same two groups, mirroring, when removing the disk media, can use the data on its mirror to recover, thereby increasing the fault tolerance of the system. The operation of the data is still used in parallel transmission mode after blocking. Therefore, RAID 1 not only improves the read and write speed, but also strengthens the reliability of the system. However, its disadvantage is that the hard disk is low, and the redundancy is 50%. From the above characteristics, RAID 5 emphasizes the read / write speed under the premise of the security of the data security, the RAID 1 (mirror disk) emphasizes the read / write speed. The picture below is Microsoft's recommended Exchange Store system storage hardware requirements. From this, we can see that the database file (EDB file and STM file) is placed on the system of RAID 5; the storage of log files is a strategy for each Storage Group set of RAID 1. Microsoft is designed to sufficiently enhance the performance of Exchange Store. For database files, these files are often very large, and during daily running, it is necessary to read and write very frequently. From a secure perspective, the importance of the database file is far from the log file. Therefore, using the RAID 5 system to save the data file, you can maximize the data security of the file: When you read and write frequently, you can guarantee the data without errors. When the disk hardware failure occurs, the system can be made Not affected. For log files, readers should first recall the role of log files we talked in the previous period: Make transactions in memory to the hard disk as soon as possible. Exchange log files, under the case where the backup tape recovery, will only be written once, read once. When writing, Exchange Server writes data in memory into a 5MB-based log file, which is read when Exchange Server writes the contents of the log into the database.

Therefore, we can find that for the disk system for saving log files, its read and write pressure is not very large, but requires very fast write speed. Very fast write speed is guaranteed by two points: First, use the RAID 1 system with fast-write speed (relative to RAID 5, do not need to calculate the check bit, which saves a lot of time); second Each Storage Group exclies a RAID 1 system (which is only used to save a specific Storage Group log file, don't use it), don't use it, do it, we reduce the number of pieces on the disk to the minimum limit. . Ideally, the log files are close to each sector, and the disk does not need to reposition the head because of disk fragmentation, which improves the performance of writing. After determining the type of disk, we need to plan for what capacity disk. The disk space capacity of the RAID 5 system stored in the database file is determined by the actual number of mailboxes and the size of the mailbox. However, there is a need to leave a certain hollow space in this basis. We use 300 users as an example, and each user's mailbox size is 100m. In theory, the number of space occupancy volume of the mailbox Store is 300 * 100m, that is, 30GB. In fact, we need to consider the following factors: first: Delete Item retention time. Generally in Exchange Server, we will set the deleted mail to keep how much time on the server (Store-> Limit-> deleion settings). Doing so, it can be convenient for users to recover erroneous emails. The backup structure of Exchange Server determines that the recovery of a single email is very difficult, therefore, set the delete item retention time to help restore the wrong deleted information. This time is typically set in about 15 days to 30 days. We need to pay attention to that once this setting is turned on, all deleted messages will not be cleared immediately in the database, so this setting will take a certain disk space. If the retention time of the delete item is 15 days, we need to estimate that each user deletes the number and size of the message in these two weeks, and further planning. If it is set to 15 days, if the conservative situation, the number of deleted messages is 30% to 50% of the mailbox. Usually this estimate is inaccurate. If we want to master the dynamics of each mailbox on the server, you can use a product called "Quest Reports". This web-based program will provide the administrator to each mailbox capacity detailed dynamic report. The company's URL is: http://www.quest.com/Messagestats/ Second: The space required for database maintenance. When we perform an offline defrag of Exchange Server database, for a size of 20GB database files (add STM files in the EDB file), we need additional 20GB of left and right spaces to store database files that organize the fragmentation. In addition, when you need to make a database repair, we usually make a backup on the server, these spaces, it also needs to be considered. Therefore, the capacity of the RAID 5 system stored in the database file is generally 1.5 to 2 times that of the number of mailboxes * users. The disk space size of the log file is determined by a period of full backup (when fully backed up, the system automatically clears the log file).

If the company is fully backed up once a week, then the log file disk is at least to accommodate a log file within a week (taken into account that the backup may fail, the surveillance factor such as the tape drive, this capacity needs to stay). Typically, we can use the 18GB SCSI disk to form a mirror array and then dynamically adjust the full backup time according to the growth rate of the log file. The performance detection and optimization of the storage engine as an administrator, we need to closely monitor the performance status of the Exchange Server Store. Some of the performance counters below is what we need to pay attention to: MSExchangeis / Active User CountMsexchangeis / User Count The two counters, reflecting the number of active users and login users on the current server. General, Active User Count is always less than User Count. Since some system mailboxes are used inside Exchange Server to communicate between servings, even if there is no user online, the user count is always maintained at 20, which is normal.

MSExchangeis / RPC AverageD LatencyMSexchangeis / RPC Operations / SecmsExchangeis / RPC Packets / SecmsExchangeis / RPC Requests Four counters reflect the RPC processing response capability of Exchange Server Store. These counters can most reflect the load and response speed of the current server. RPC Operations / SEC, RPC Packets / SEC respectively indicates the RPC request received per second (all Outlook Mapi clients are read, send a large number of RPC requests to the server when sending mail). RPC Requests indicates that Exchange Server is currently processed. In general, Exchange Server can process up to 100 requests at the same time, so if this counter exceeds 100, Exchange Server will have a serious performance issue. The last one is also one of the most important, RPC Averaged Latency, which represents the average response time of 1024 RPC requests prior to the current time. This time is milliseconds, general, this counter should be less than 20. If the counter is greater than 100 and lasts for a long time, the response speed of the client Outlook will become very slow or even dead. There are many factors that have an impact on RPC AverageD Latency. Perform backups, online fragmentation, anti-virus software scanning databases, etc. will increase the value of RPC AverageD Latency. In addition, it is worth noting that the incorrect configuration of the network environment will also cause problems. The author has encountered a serious performance problem caused by the speed of the switch port and the speed mismatch on the Exchange Server. For details, the performance of the customer mail system suddenly declines, and the value of RPC Averaged Latency is up to 5 digits, and all users cannot open the mailbox. After excluding Exchange and Windows issues, we learned from our customers that they changed the switch connected to Exchange Server a day before. It is reason that Exchange Server is the application layer software, which does not have any dependence on the device of the data link layer. But after I checked Microsoft's knowledge base, we found this article: "Poor Performance When Network Adapter IS Set to Auto Sense", the knowledge base number of the article is 330343. This may cause serious performance issues if the network card or switch port is set to automatic detection speed. First, look at Exchange Server, and its network card is set to 100M full duplex, which is in line with Microsoft's requirements; if it is connected to the switch, it is found that the port connected to the Exchange Server network card is set to Auto automatic detection speed, The current connection is 100m semi-duplex. After the fixed 100M full duplex setting, the fault immediately disappeared, the value of RPC Averaged Latency returned to 20 or less, and the user sent and received emails. Afterwards, we analyze that for Exchange Server systems, it is possible that Microsoft uses some special format packets when transmitting RPC information, so there is a high demand for network links. The switch is generally used after power-on, and it is often easily ignored by the administrator.

MSEXCHANGES / VM LARGEST BLOCK SIZEMSEXCHANGES / VM TOTAL 16MB Free Blocksmsexchangeis / VM Total Free Blocksmsexchangeis / VM Total Large Free Block Bytes These four counters are related to the memory usage of the Exchange Server Store process. We all know that on Exchange Server, the Store.exe process is often larger, and the ESE database engine needs to apply a large amount of memory as its cache space, and there is more than 300 user's Exchange Server system. The physical memory of the Store.exe process is usually 1GB. In the Windows operating system, memory is divided into physical memory and virtual memory. Physical memory refers to the memory sticks installed on the machine; the virtual memory refers to the memory range of the CPU. For Windows 2000, the size of the physical memory is determined by the installed memory, and the virtual store is 4GB. (About Windows 2000 memory, readers can refer to Chapter 6 of this book for INSIDE Windows 2000: Memory Management.) As shown on the left part of the figure below, each process has 4GB address space, by default, 2GB is all operating systems, 2GB is used for the application. Exchange Server is allocated and released in the 2GB user address space it owns during operation. This causes "fragment" of the memory address space: The space in the memory address is not continuous. In the four counters described above, VM Largest Block Size represents the largest consecutive space memory block in the user address space; VM Total 16MB free blocks represents the number of continuous air memory blocks of 16MB or more; VM Total Free Blocks represents the total empty memory The number of blocks; VM Total Large Free Block Bytes indicates the total number of empty memory. When the number of VM Largest Block Size is less than 32M, the WARNING log number 9582 will be recorded in the event viewer; when the VM Total 16MB Free Blocks is zero, the event viewer will be recorded when the maximum allocated memory space is less than 16MB. Error log numbered 9582.

Source: MSExchangeISCategory: PerformanceID: 9582Type: Warning / ErrorDescription: The virtual memory necessary to run your Exchange server is fragmented in such a way that performance may be affected It is highly recommended that you restart all Exchange services to correct this issue this. The situation appears, indicating that there is a large amount of fragments in the virtual address space of Exchange Server, and the performance and stability of Exchange Server will have problems due to the unable to meet the allocation of memory. For this type of problem, you can refer to Microsoft's knowledge base document "Troubleshoot Virtual Memory Fragmentation in Exchange 2003 and Exchange 2000", which documentation is 325044. This article analyzes the reasons and response of virtual internal stadiums in detail. In order to meet server software's requirements for memory, Microsoft's Windows 2000 Advanced Server and Data Canter version of the operating system supports the expanded user address space to 3GB, which can effectively alleviate the problem of virtual memory fragmentation. This feature needs to do certain modifications in the Boot.ini of the system partition. Please refer to Microsoft document "A Description of the 4 GB RAM TUNING FEATURE AND THESICAL ADDRESS EXTENSION SWITCH" "Hes" Hes "291988 . For Exchange 2000 Server, when the server is installed with 1GB of RAM, Microsoft recommends turning on the 3GB switch of the operating system, otherwise there may be performance problems. Reference document: 266096 Exchange Requires / 3GB Switch With More Than 1 GB RAM32888 Exchange Memory Use and the / 3GB Switchexchange Server Store 1. Make sure the Exchange Server's NIC and switch port settings are correct. 2. There are 1GB of physical memory server to install the Windows 2000 Advanced Server version and turn on / 3GB switch in the boot.ini. 3. It is necessary to add that it is possible to create a Storage Group as little as possible. In the previous article, we know that every Storage Group corresponds to an instance of an ESE database engine. In Store.exe, each instance of an ESE database engine will consume 10M memory space. The role of database fragmentation and precautions The Exchange Server in the run will continue to make online defragmentation in the background according to the time specified by the administrator. Online fragmentation mainly performs the following: 1. Determine if there is a deleted mailbox in the Store by querying the active directory. 2. Physics Delete All messages and mailboxes that exceed the retention time. 3. Execute online fragmentation. For the first operation, Exchange Server launches an query to the active directory to ensure that the user information in the active directory and the mailbox information saved in the Exchange Store are synchronized. For deleted mailboxes, Exchange Server will make special tags. This operation does not bring too much extra burden on Exchange Server, but there is a certain pressure on the domain controller of the active directory.

Generally, we will perform an operation of online fragmentation at night, so there is no problem with the load of the Active Directory, but if some large multinational companies, the domain controllers of their activity catalogs often serve the users of each time zone. The time inline fragmentation needs to be seriously adjusted to avoid affecting the user. The second and third operations will bring a certain load of Exchange Server itself, mainly some intensive disk operations. During the online fragmentation, the user accesses the mailbox will slow down. When the backup of Exchange Server and the time of the online fragmentation, the online fragmentation will be terminated and the backup is completed to be recovered. For more details on online fragmentation, please refer to Microsoft Knowledge Base Documents "Understanding Performance and Scalability Characteristics Of Exchange 2000 MDB Online Maintenance", which documentation is 271222. Under normal circumstances, the online defragmentation will stop at the specified time administrator, and in the event log note of the following content Event: 1221Source: MSExchangeIS PrivateType: InformationCategory: GeneralDescription: The database has nnn megabytes of free space after online defragmentation has terminated This means that the Exchange Server found and calculated the size of the debris space contained in the database in the transchange server defragmentation. Online fragmentation will only mark the location of the fragment and calculate its space, and the mobile data page is not physically moved to eliminate these debris spaces. If physical elimination of these debris is required, you need to perform off-line fragmentation. When the fragment space displayed in the above event reaches a certain ratio (10% ~ 15% of the database file), we need to perform off-line fragmentation. For off-line fragmentation, we usually follow the following procedures: 1. Before proceeding to the offline fragmentation, the STORE is fully backed up 2.DISMOUNT Store3. Use the Eseutil / MH to confirm that the EDB and STM files are "Clean shutdown". Detailed discussion in the last period) 4. The following command is performed to perform fragmentation

C: / program files / exchsrvr / bin> Eseutil / d x: /exchsrvrrom / / d cg1ms1.edb /tx:/exchsrvr/mdbdata/sg1ms1_temp.edb / o / p command will have the following output:

Initiating DEFRAGMENTATION mode ... Database: F: /Exchsrvr/Mdbdata/SG1MS1.edb Streaming File: F: /Exchsrvr/Mdbdata/SG1MS1.STM Temp Database:. F: /Exchsrvr/Mdbdata/SG1MS1_temp.edbTemp Streaming File:. F : /Exchsrvr/mdbdata/sg1ms1_temp.stm defragmentation status (% completion) 0 10 20 30 40 50 60 70 80 90 | ----- | ----- | ----- | ----- | ----- | ----- | ---------------------------- | ......... ................................................ .................... NOTE: IT IS Required That You Immediately Perform A Full Backup of this database. If you restore a backup Made Before The Defragmentation, The Database Will Be Rolled Back to The State It Was in At The Time of That Backup.Operation Completed Success In 13.110 Seconds. The actual time of fragmentation depends on the size of the database file, in Exchange 2000, generally one hour can handle 7 ~ 10GB data. After the fragmentation is completed, the system generates two EDBs and STM files that are defragmented based on the formulated file name. 5. Before putting the new database files, you need to make sure your integrity, we must perform the following command c: / program files / exchsrvr / bin> Eseutil / g x: /exchsrvr/mdbdata/sg1ms1_temp.edb / sx: / ExchsrVR / MDBDATA / SG1MS1_TEMP.STM Output is as follows:

. Microsoft (R) Exchange Server (TM) Database Utilities Version 6.0Copyright (C) Microsoft Corporation 1991-2000 All Rights Reserved.Initiating INTEGRITY mode ... Database: priv1.edb Streaming File: priv1.stm Temp Database:. TEMPINTEG3976. Edbchecking Database Integrity. Scanning Status (% Complete) 0 10 20 30 40 50 60 70 80 90 100 | ----- | ----- | ----- | ----- | ---- - | ----- | ------ | -------------------- | .............. ................................................ ............... INTEGRITY CHECK SUCCESSFUL.Operation Completed SuccessFully In 9.62 Seconds. This operation also takes a long time, with a general speed of 10GB. 6. Document rename. Remove the old EDB file and STM file from the MDBData folder. Change the temporary file that performs fragmentation to the same name as old EDB files and STM files. Then the mount database. 7. If the mount database fails, the fastest recovery method is to copy the old EDB file and the STM file to the MDBData folder. During the DEFRAG, the old EDB file and the STM file are not changed, even if the DEFRAG fails, it can also be restored to the state before DEFRAG. With more details on fragmentation, we can refer to the following document: 192185 xadm: how to defragment with the eseutil utility If you avoid the problem of Domestic Server's database file damage to the database corruption, prevent problems to be far more than the death Effective. Damage of the database can generally be divided into physical damage and logical damage. Physical damage is often caused by the failure of hardware devices such as disk media, control card. This type of damage causes data loss, the only solution is to recover from the backup tape. In order to ensure the consistency of the data, Exchange Server is written to the actual data calculated by the data content when writing content to the database (the unit is 4KB) is written to the database. When reading, the system recalculates the checksum and compares the saved checksum. If the two values ​​are different, the read data will have changed compared to the currently written data. This change is often caused by a disk failure, a controller bus transmission failure. In order to exclude the interference factor, when the checksum does not match, Exchange Server will go to the disk to read that page, which is 16 times. If you read 16 times, check and the original value cannot match, Exchange Server believes that the database has already happened. In the event log, there will be the following content being recorded:

Event ID: 23Source: EDBType: ErrorCategory: Database Page CacheDescription: MSExchangeIS ((455)) Direct read found corrupted page error -1018 ((1: 251563) (0-2295758), 251563 379225672 381322824). Please restore the database from a Previous Backup. In addition, the following code appears in the error description of the event log, basically, the database can be physically corrupted: -1018 (Jet_ERRRRRRRRRRIFYFAILURE) The Data Read from Disk is not The Same as the data this Written to Disk .-1022 (JET_errDiskIO) the hardware, device driver, or operating system is returning errors.-510 JET_errLogWriteFailThe log files are out of disk space or there is a hardware failure with the log file disk. physical damage tends to bring the database data Lost and Exchange Server shutdown and so on. We can take some suggestions to avoid physical damage: 1. Use high quality disk and disk control systems to properly configure the hardware RAID system. 2. Do not use the file level tool or antivirus software to scan the database file and log files. 3. Avoid using write-back caching on disk control cards. 4. Regularly backup. On the one hand, the full backup guarantees the security of the data, and on the other hand, it can also discover the physical damage of the database. When performing full backup, the backup program reads each page of the database and recalculates the checksum. If there is a damaged page, the administrator can find problems and take action. When physical damage occurs, we can take the following steps to recover: 1. If there is full backup, be sure to recover from the backup. 2. If there is no backup, you can use Eseutil / P to perform manual fixes. But this is not recommended, from backup recovery is the best solution. About the physical damage of the database, more detailed content, please refer to Microsoft Knowledge Base Document "Understanding and Analyzing -1018, -1019, and -1022 Exchange Database Errors", the code of this article is 314917. Another common database is corrupted is logical damage. The content of the database does not have a problem, but some internal views, logical damage occurs when there is a problem. The symptoms of logical damage are often manifested: Most users use normal, and some users will crash and other phenomena. For this failure, you can usually use the isinteg command to fix. About the Exchange Server database, you can read the code of Microsoft Knowledge Base "OverView of Exchange Server Database Architecture and Database Engine" article 217987.

转载请注明原文地址:https://www.9cbs.com/read-65780.html

New Post(0)