{"id":106149,"date":"2022-12-18T21:36:39","date_gmt":"2022-12-18T19:36:39","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs"},"modified":"2022-12-18T21:36:39","modified_gmt":"2022-12-18T19:36:39","slug":"v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs","title":{"rendered":"The Linux 6.2 kernel will include improvements for RAID5\/6 in Btrfs.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Linux kernel 6.2 introduces improvements to Btrfs, addressing the 'write hole' issue in the RAID 5\/6 implementation. The core of the problem lies in the fact that, if a crash occurs during a write operation, it is initially impossible to determine which block on which RAID device was successfully written and which was not completed. During attempts to recover RAID in such a situation, block corruption may occur corresponding to the uncompleted blocks since the state of the RAID blocks becomes desynchronized. This issue arises in any RAID 1\/5\/6 arrays where no special measures have been taken to combat this effect.    <\/p>\n<p>In RAID implementations, such as RAID1 in btrfs, this problem is solved using checksums in both copies; in case of a mismatch, the data is simply restored from the second copy. This approach also works if some device starts to return incorrect data instead of completely failing.    <\/p>\n<p>However, in the case of RAID5\/6, the filesystem does not store checksums for parity blocks: under normal circumstances, the correctness of the blocks is checked by the fact that they all have checksums, and the parity block can be reconstructed from the data. However, in the case of partial writing, this approach may not work in certain situations. In this case, when recovering the array, it is possible that the blocks affected by the incomplete write will be restored incorrectly.    <\/p>\n<p>In the case of btrfs, this problem is most relevant when the written data size is smaller than the stripe size. In this scenario, the file system must perform a read-modify-write (RMW) operation. If it encounters blocks with incomplete writes, the RMW operation can cause corruption that may go undetected despite checksums. Developers have made changes so that the RMW operation checks the checksums of blocks before carrying out this operation, and during data recovery, it performs checksum verification after the write. Unfortunately, in situations involving incomplete stripe writes (RMW), this leads to additional overhead for computing checksums, though it significantly increases reliability. For RAID6, this logic is not yet ready, but for such a failure in RAID6, a write must fail on two devices simultaneously, which is less likely.    <\/p>\n<p>Additionally, the developers have provided recommendations for using RAID 5\/6, which suggest that in Btrfs, the storage profile for metadata and data can differ. It is possible to use a RAID 1 (mirror) profile or even RAID 1C3 (3 copies) for metadata, while utilizing RAID 5 or RAID 6 for data. This ensures reliable protection of metadata and avoids the 'write hole' issue while also enabling more efficient space utilization typical of RAID 5\/6. This approach prevents corruption in metadata, while data corruption can be repaired.    <\/p>\n<p>It is also worth noting that for SSDs in Btrfs, asynchronous execution of the 'discard' operation (marking freed blocks that no longer need to be physically stored) will be enabled by default in kernel 6.2. The advantage of this mode is high performance due to the effective batching of 'discard' operations in the queue, followed by processing by a background handler, which prevents normal filesystem operations from slowing down, unlike synchronous 'discard' during block release. Furthermore, there will no longer be a need to use tools like fstrim, since all available blocks will be cleaned up in the filesystem without the need for additional scanning and without slowing down operations.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=58352\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044f\u0434\u0440\u043e Linux 6.2 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u044b \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f Btrfs, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b &#171;write hole&#187; \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 RAID 5\/6. \u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u0440\u0430\u0445 \u0441\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0438\u0441\u0438, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0431\u043b\u043e\u043a \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u0438\u0437 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 RAID \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0430 \u0432 \u043a\u0430\u043a\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0435 \u0431\u044b\u043b\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f RAID \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-106149","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044f\u0434\u0440\u043e Linux 6.2 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u044b \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f Btrfs, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b &quot;write hole&quot; \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 RAID 5\/6.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412 \u044f\u0434\u0440\u043e Linux 6.2 \u0432\u043e\u0439\u0434\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAID5\/6 \u0432 Btrfs | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044f\u0434\u0440\u043e Linux 6.2 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u044b \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f Btrfs, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b &quot;write hole&quot; \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 RAID 5\/6.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-12-18T19:36:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-12-18T19:36:39+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47 Linux kernel 6.2 will include RAID5\/6 enhancements in Btrfs | ProHoster","description":"Linux kernel 6.2 introduces improvements to Btrfs that address the \"write hole\" issue in the RAID 5\/6 implementation.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412 \u044f\u0434\u0440\u043e Linux 6.2 \u0432\u043e\u0439\u0434\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f RAID5\/6 \u0432 Btrfs | ProHoster","og:description":"\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044f\u0434\u0440\u043e Linux 6.2 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u044b \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f Btrfs, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b &quot;write hole&quot; \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 RAID 5\/6.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2022-12-18T19:36:39+00:00","article:modified_time":"2022-12-18T19:36:39+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/106149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=106149"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/106149\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=106149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=106149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=106149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}