{"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\/hu\/blog\/news\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs","title":{"rendered":"A Linux 6.2 kernelbe RAID5\/6 fejleszt\u00e9sek ker\u00fclnek a Btrfs-ben","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>A Linux 6.2 kernel improvements for Btrfs were proposed to fix the \"write hole\" problem in RAID 5\/6 implementation. The essence of the problem is that if a crash occurs during a write operation, it is initially impossible to determine which block was correctly written on which of the RAID devices and which write was not completed. When attempting to recover the RAID in such a situation, the blocks corresponding to the unwritten blocks may become corrupted because the state of the RAID blocks becomes desynchronized. This issue arises in any RAID1\/5\/6 arrays that do not take special measures to combat this effect.    <\/p>\n<p>In RAID implementations like RAID1 in btrfs, this issue is solved by using checksums in both copies; in case of a mismatch, the data is simply restored from the second copy. This approach also works if one device starts providing 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 integrity of the blocks is verified by the fact that they all have checksums, and the parity block can be reconstructed from the data. However, in the case of partial writes, this approach may not work in certain situations. In this case, during array recovery, there is a possibility that the blocks subject to incomplete writes may be incorrectly restored.    <\/p>\n<p>A btrfs eset\u00e9ben ez a probl\u00e9ma k\u00fcl\u00f6n\u00f6sen aktu\u00e1lis, ha a l\u00e9trehozott \u00edr\u00e1s m\u00e9rete kisebb, mint a stripe. Ekkor a f\u00e1jlrendszernek el kell v\u00e9geznie az olvas\u00e1s-m\u00f3dos\u00edt\u00e1s-\u00edr\u00e1s (read-modify-write, RMW) m\u0171veletet. Ha az \u00edr\u00e1s sor\u00e1n olyan blokkokba \u00fctk\u00f6z\u00fcnk, amelyek m\u00e9g nem fejez\u0151dtek be, akkor az RMW m\u0171velet k\u00e1rosod\u00e1sokat okozhat, amelyeket nem \u00e9szlelnek, a checksumok ellen\u00e9re. A fejleszt\u0151k olyan v\u00e1ltoztat\u00e1sokat hajtottak v\u00e9gre, amelyek r\u00e9v\u00e9n az RMW m\u0171velet ellen\u0151rzi a blokkok checksumj\u00e1t, miel\u0151tt v\u00e9grehajtan\u00e1 ezt a m\u0171veletet, \u00e9s sz\u00fcks\u00e9g eset\u00e9n az \u00edr\u00e1s ut\u00e1n is elv\u00e9gzi a checksum ellen\u0151rz\u00e9s\u00e9t. Sajnos az RMW eset\u00e9ben a nem teljes stripe \u00edr\u00e1sa (RMW) tov\u00e1bbi overhead-et jelent a checksumok kisz\u00e1m\u00edt\u00e1s\u00e1ban, azonban jelent\u0151sen n\u00f6veli a megb\u00edzhat\u00f3s\u00e1got. A RAID6 eset\u00e9ben ez a logika m\u00e9g nem k\u00e9sz\u00fclt el, de egy RAID6 eset\u00e9n ehhez arra van sz\u00fcks\u00e9g, hogy az \u00edr\u00e1s k\u00e9t eszk\u00f6z\u00f6n egyszerre ne siker\u00fclj\u00f6n, ami kev\u00e9sb\u00e9 val\u00f3sz\u00edn\u0171.    <\/p>\n<p>Additionally, there are recommendations from developers regarding the use of RAID5\/6, which state that in Btrfs, the metadata and data storage profiles can differ. It is possible to use the RAID1 (mirror) profile or even RAID1C3 (3 copies) for metadata, while RAID5 or RAID6 can be employed for data. This ensures reliable protection of metadata and the absence of the \"write hole\" on one hand, while also providing more efficient space utilization characteristic of RAID5\/6 on the other. This allows avoiding corruptions in metadata, while data corruption can be corrected.    <\/p>\n<p>It should also be noted that for SSDs in Btrfs, asynchronous execution of the \"discard\" operation (marking freed blocks that can no longer be physically stored) will be activated by default in kernel 6.2. The advantage of this mode is high performance due to the effective grouping of \"discard\" operations in the queue and further processing of the queue by a background handler, which prevents normal file system operations from slowing down as they do with synchronous \"discard\" during block freeing, allowing the SSD to make better decisions. On the other hand, it will no longer be necessary to use utilities like fstrim, as all available blocks will be cleared in the file system without requiring additional scanning and without slowing down operations.<br \/>\n<br \/>Forr\u00e1s: <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.3 - 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\/hu\/blog\/news\/v-yadro-linux-6-2-vojdut-uluchsheniya-raid5-6-v-btrfs\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"hu_HU\" \/>\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\/hu\/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\udd47Linux 6.2 kernel will include RAID5\/6 improvements in Btrfs | ProHoster","description":"A Linux 6.2 kernel includes enhancements to Btrfs aimed at fixing the \"write hole\" problem in RAID 5\/6 implementations.","canonical_url":"https:\/\/prohoster.info\/hu\/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":"hu_HU","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\/hu\/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\/hu\/wp-json\/wp\/v2\/posts\/106149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/comments?post=106149"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/posts\/106149\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/media?parent=106149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/categories?post=106149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/hu\/wp-json\/wp\/v2\/tags?post=106149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}