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/02 Report--
The first NVM zone backup mechanism was introduced in the previous article, but the write data length is limited by the sector size. This article introduces the second NVM zone data backup mechanism. This method first divides the NVM area into two equal-sized areas An and B, and takes area An as the official data area and area B as the backup area. The last byte of each area is the valid data mark bit FLAG,1, which indicates that the data in this area is valid, and 0 means that the data in this area is invalid. If there is a power loss in the process of updating the data, first judge which area of the data is valid according to the FLAG of area An and B after power-on, and then continue to complete the update operation. In this example, the size of NVM area is 32KB, area An is divided into 16KB, area B is divided into 16KB. Example: this example assumes that data has been successfully written to area An and new data needs to be written to the NVM area. The process of handling other situations is the same as the following four steps.
(1) after judging that the FLAG of area An is 1, the data of area An is read and written to area B. after the writing is successful, the FLAG of area B is assigned to 1.
(2) after the FLAG in area B is modified successfully, the FLAG mark in area An is changed to 0.
(3) after the FLAG mark in area An is modified successfully, the data update operation is carried out in area A, that is, new data is written. After the update is successful, write the area A FLAG flag as 1.
(4) after the FLAG in area An is modified successfully, the FLAG flag in area B is modified to 0, and the data update operation is completed.
At this point, the two NVM area data backup schemes are all introduced.
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.