{"id":654,"date":"2020-06-09T09:57:39","date_gmt":"2020-06-09T16:57:39","guid":{"rendered":"https:\/\/seanism.com\/blog\/?p=654"},"modified":"2020-06-09T10:06:35","modified_gmt":"2020-06-09T17:06:35","slug":"synology-nas-having-degraded-raid","status":"publish","type":"post","link":"https:\/\/seanism.com\/blog\/2020\/06\/synology-nas-having-degraded-raid\/","title":{"rendered":"Synology NAS having degraded RAID"},"content":{"rendered":"\n<p>We recently started monitoring our Synology NAS with CloudRadar.io (monitoring software) and we were getting the following alert&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Module software raid health according to \/proc\/mdstat has alert(s)\n\nRaid md0 degraded. Missing 5 devices. Raid md0 degraded. Missing 5 devices. Raid status not optimal (Needs Attention)\n\nRaid md1 degraded. Missing 5 devices. Raid md0 degraded. Missing 5 devices. Raid status not optimal (Needs Attention)<\/code><\/pre>\n\n\n\n<p>After SSHing into the NAS and running <strong>cat \/proc\/mdstat<\/strong> I noticed MD0 and MD1 had missing disks.  Those arrays are were not created by me.  They appear to come from the factory and contain recovery data for the NAS.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>synology_nas:\/$ cat \/proc\/mdstat\nPersonalities : &#91;linear] &#91;raid0] &#91;raid1] &#91;raid10] &#91;raid6] &#91;raid5] &#91;raid4] &#91;raidF1] \nmd2 : active raid5 sda3&#91;0] sdi3&#91;6] sdg3&#91;5] sdf3&#91;4] sde3&#91;3] sdc3&#91;2] sdb3&#91;1]\n      46855227264 blocks super 1.2 level 5, 64k chunk, algorithm 2 &#91;7\/7] &#91;UUUUUUU]\n      \nmd1 : active raid1 sda2&#91;0] sdb2&#91;1] sdc2&#91;2] sde2&#91;3] sdf2&#91;4] sdg2&#91;5] sdi2&#91;6]\n      2097088 blocks &#91;12\/7] &#91;UUUUUUU_____]\n      \nmd0 : active raid1 sda1&#91;0] sdb1&#91;1] sdc1&#91;2] sde1&#91;3] sdf1&#91;4] sdg1&#91;5] sdi1&#91;6]\n      2490176 blocks &#91;12\/7] &#91;UUUUUUU_____]<\/code><\/pre>\n\n\n\n<p>Looking further into the array I ran <strong>mdadm &#8211;detail \/dev\/md0<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>synology_nas:\/$ sudo mdadm --detail \/dev\/md0\n\/dev\/md0:\n        Version : 0.90\n  Creation Time : Wed Feb  7 16:33:01 2018\n     Raid Level : raid1\n     Array Size : 2490176 (2.37 GiB 2.55 GB)\n  Used Dev Size : 2490176 (2.37 GiB 2.55 GB)\n   Raid Devices : 12\n  Total Devices : 7\nPreferred Minor : 0\n    Persistence : Superblock is persistent\n\n    Update Time : Tue Jun  9 09:22:20 2020\n          State : clean, degraded \n Active Devices : 7\nWorking Devices : 7\n Failed Devices : 0\n  Spare Devices : 0\n\n           UUID : 0386309b:f65fbf8a:c69de3af:22ddbed7\n         Events : 0.36734185\n\n    Number   Major   Minor   RaidDevice State\n       0       8        1        0      active sync   \/dev\/sda1\n       1       8       17        1      active sync   \/dev\/sdb1\n       2       8       33        2      active sync   \/dev\/sdc1\n       3       8       65        3      active sync   \/dev\/sde1\n       4       8       81        4      active sync   \/dev\/sdf1\n       5       8       97        5      active sync   \/dev\/sdg1\n       6       8      129        6      active sync   \/dev\/sdi1\n       -       0        0        7      removed\n       -       0        0        8      removed\n       -       0        0        9      removed\n       -       0        0       10      removed\n       -       0        0       11      removed<\/code><\/pre>\n\n\n\n<p>The reason for the error is both arrays report status: clean, degraded due to having 12 disks out of the 7 installed.  I went ahead and set MD0 and MD1 to 7 disks using mdadm &#8211;grow -n 7 \/dev\/mdx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>synology_nas:\/$ sudo mdadm --grow -n 7 \/dev\/md0\nsynology_nas:\/$ sudo mdadm --grow -n 7 \/dev\/md1\n\nsynology_nas:\/$ sudo mdadm --detail \/dev\/md0\n\/dev\/md0:\n        Version : 0.90\n  Creation Time : Wed Feb  7 16:33:01 2018\n     Raid Level : raid1\n     Array Size : 2490176 (2.37 GiB 2.55 GB)\n  Used Dev Size : 2490176 (2.37 GiB 2.55 GB)\n   Raid Devices : 7\n  Total Devices : 7\nPreferred Minor : 0\n    Persistence : Superblock is persistent\n\n    Update Time : Tue Jun  9 09:33:38 2020\n          State : clean \n Active Devices : 7\nWorking Devices : 7\n Failed Devices : 0\n  Spare Devices : 0\n\n           UUID : 0386309b:f65fbf8a:c69de3af:22ddbed7\n         Events : 0.36734590\n\n    Number   Major   Minor   RaidDevice State\n       0       8        1        0      active sync   \/dev\/sda1\n       1       8       17        1      active sync   \/dev\/sdb1\n       2       8       33        2      active sync   \/dev\/sdc1\n       3       8       65        3      active sync   \/dev\/sde1\n       4       8       81        4      active sync   \/dev\/sdf1\n       5       8       97        5      active sync   \/dev\/sdg1\n       6       8      129        6      active sync   \/dev\/sdi1<\/code><\/pre>\n\n\n\n<p>They now show their status as clean and we no longer receive any alerts from our device monitoring system!<\/p>\n\n\n\n<p>I was able to figure this out due to a number of sites \/ articles which I&#8217;ll list below&#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/blog.sdbarker.com\/post\/synology-nas-ds1813-degraded-array-for-md0-and-md1-after-rebuild\/\">https:\/\/blog.sdbarker.com\/post\/synology-nas-ds1813-degraded-array-for-md0-and-md1-after-rebuild\/<\/a><\/li><li><a href=\"https:\/\/support.unitrends.com\/UnitrendsBackup\/s\/article\/000002500\">https:\/\/support.unitrends.com\/UnitrendsBackup\/s\/article\/000002500<\/a><\/li><li><a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-manage-raid-arrays-with-mdadm-on-ubuntu-16-04#:~:text=If%20you%20look%20at%20the,md0%20%2D%2Dremove%20%2Fdev%2Fsdc\">https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-manage-raid-arrays-with-mdadm-on-ubuntu-16-04#:~:text=If%20you%20look%20at%20the,md0%20%2D%2Dremove%20%2Fdev%2Fsdc<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We recently started monitoring our Synology NAS with CloudRadar.io (monitoring software) and we were getting the following alert&#8230; After SSHing into the NAS and running cat \/proc\/mdstat I noticed MD0 and MD1 had missing disks. Those arrays are were not created by me. They appear to come from the factory and contain recovery data for&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Synology NAS having degraded RAID due to missing disks.","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[3,30],"tags":[184,186,185,115,187,181,183,182],"class_list":["post-654","post","type-post","status-publish","format-standard","hentry","category-it","category-linux","tag-array","tag-degraded","tag-error","tag-linux-2","tag-mdadm","tag-nas","tag-raid","tag-synology"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1vc3H-ay","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/posts\/654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/comments?post=654"}],"version-history":[{"count":2,"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/posts\/654\/revisions"}],"predecessor-version":[{"id":657,"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/posts\/654\/revisions\/657"}],"wp:attachment":[{"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/media?parent=654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/categories?post=654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seanism.com\/blog\/wp-json\/wp\/v2\/tags?post=654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}