In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
We have introduced the maintenance mode of WSFC in the daily management and operation section of WSFC before. to put it simply, starting from WSFC 2012, the maintenance mode can help us to complete the semi-automatic maintenance of pausing nodes, automatic drainage and automatic recovery.
Review the operation process of the maintenance mode of WSFC. Take WSFC 2012 as an example. Before WSFC 2012, the maintenance mode of the cluster could only pause nodes, but could not automatically move the load.
1. Manually place the node in pause mode
two。 According to the priority of the cluster role, the node refers to the placement policy and sequentially drains the cluster load to the appropriate node.
3. After the load is drained to the node where it should go, the node is declared to be paused and does not accept any load transfer.
4. After the maintenance is completed, refer to the placement policy and restore the load to the appropriate node.
Knowledge supplement
If a single virtual machine cannot move during the drainage process, the progress of the overall drainage will not be affected, and other virtual machines and loads will continue to perform drainage normally. When the drainage is finished, the drainage failure status will be reported.
Once the node is put into pause mode, it will remain paused after restart unless the administrator manually releases the pause
If the drainage process is very long, or do not operate the node, you can cancel the drainage operation. After canceling the drainage, the load that has been drained can be restored to the original node through the pause mode failure.
Today, we mainly focus on the priority granularity control in the maintenance mode. Since WSFC 2012, the maintenance mode has been deeply integrated with the placement policy, including priority, preferred owner, default owner, possible owner, anti-correlation, etc., whether it is pause drainage or fault recovery, will refer to the above placement strategy for a complete evaluation, and then select the appropriate node.
One of the more interesting points is the integration of maintenance patterns and priorities.
By default, the WSFC 2012 start priority setting takes effect in the following scenarios
1. When the cluster node shuts down and starts up, priority is given to high priority applications online.
two。 When the node is set to maintenance mode, priority migration is given to high-priority applications
3. When a node fails over, priority is given to transferring high priority applications
This is known to most people, but in fact there is an interesting integration of priority and maintenance mode since WSFC 2012. In fact, the priority setting can actually determine the drainage operation of the virtual machine during the maintenance mode.
Since WSFC 2012, the virtual machine resource type has added a MoveTypeThreshold attribute, through which the drainage operation of the virtual machine during drainage can be determined. The default cluster global policy is to perform real-time migration for high-priority and medium-priority virtual machines, and fast migration for low-priority virtual machines, in order to ensure that higher-priority virtual machines are migrated first. Provide services normally without affecting progress because of low-priority virtual machines
The default value of MoveTypeThresold in WSFC 2012 is 2000, which means that when maintenance drainage occurs, virtual machines with a priority greater than or equal to 2000 perform real-time migration, with a high priority of 3000, a medium priority of 2000, and a low priority of 1000, so the default high and medium priorities can get real-time migration in maintenance mode.
# View Global Policy
Get-ClusterResourceType "Virtual Machine" | Get-ClusterParameter MoveTypeThreshold | fl *
By default, if we do not set any priority, the priority of all virtual machines is medium, which means that all virtual machines are not prioritized, which means that when maintaining, the migration may give priority to the unimportant roles. If you want to distinguish the priority of the cluster load, it is recommended to set the priority for the important load to be high, medium, low, and arrange the cluster load in order. In this way, when maintenance or failover occurs, high-priority resources will first be processed to provide services online, and when we set the priority, the maintenance mode operation control will be meaningful.
If it is a virtualized cluster, there are a lot of virtual machines hosted above, some of which are important and some are unimportant, so we can control which virtual machines are migrated in real time in maintenance mode, and those virtual machines are migrated quickly. Real-time migration ensures uninterrupted services during migration, full memory pages and incremental memory pages are delivered, and fast migration just saves the virtual machine. Then send it to another node and turn it on. Relatively speaking, if the virtual machine is in use in real time, migrate changes quickly, because you do not need to wait for all incremental memory pages to be synchronized, although real-time migration can guarantee the maximum available time. However, once the virtual machine is reused in real time, the migration process is sometimes very slow.
Through such granularity control, we can allow low-priority virtual machines to pass through, quickly migrate and quickly complete maintenance and drainage, and leave more network bandwidth for real-time migration virtual machines to avoid resource competition.
# modify global policy
Get-ClusterResourceType "Virtual Machine" | Set-ClusterParameter MoveTypeThreshold 1000
Global maintenance and drainage operations of the cluster support the following four configuration strategies
If set to 1000, all low, medium and high priorities will be migrated in real time, except for not automatically starting the virtual machine
If set to 2000, high and medium priority virtual machines are migrated in real time, and low priority virtual machines are migrated quickly.
If set to 3000, the high priority virtual machines are migrated in real time, and the neutralization and high priorities are migrated quickly.
If set to 3001, all virtual machines in maintenance mode will perform a fast migration
The cluster maintenance mode operation policy we introduced above is for the global setting, that is, all virtual machines in the cluster are required to follow this policy by default.
We can also set the drainage operation policy separately for a virtual machine. Starting with WSFC 2012, all clustered virtual machines have an extra DefaultMoveType attribute.
DefaultMoveType parameter values and their behavior:
-1 (4294967295) shut down the virtual machine using the global setting (MoveTypeThreshold) 0. 1 Save the virtual machine (Fast Migration) 2 close the virtual machine 3 shut down the virtual machine (forced)
4 Real-time migration of virtual machines
# get the default DefaultMoveType value of virtual machine
Get-ClusterResource "Virtual Machine HQ-SPDB" | Get-ClusterParameter | ft Name,Value
As you can see, the default virtual machine is set to 4294967295, that is, the cluster maintenance mode operates the global policy, and the cluster independently assigns virtual machine maintenance mode operations according to the global policy.
We can also break this inheritance relationship and set a granular drainage operation for a virtual machine separately. The node does not need to be restarted when the setting is completed, and the next maintenance will take effect.
Get-ClusterResource "Virtual Machine HQ-SPDB" | Set-ClusterParameter DefaultMoveType 4
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.