{"id":846,"date":"2011-06-20T19:33:42","date_gmt":"2011-06-20T09:33:42","guid":{"rendered":"https:\/\/www.penguinpunk.net\/blog\/?p=846"},"modified":"2015-06-02T16:23:28","modified_gmt":"2015-06-02T06:23:28","slug":"qnap-how-to-repair-raid-brokenness","status":"publish","type":"post","link":"https:\/\/www.penguinpunk.net\/blog\/qnap-how-to-repair-raid-brokenness\/","title":{"rendered":"QNAP &#8211; How to repair RAID brokenness"},"content":{"rendered":"<p>I use a <a title=\"QNAP\" href=\"http:\/\/www.qnap.com\/pro_detail_feature.asp?p_id=108\" target=\"_blank\">QNAP 639 Pro<\/a> NAS at home to store my movies on. It&#8217;s a good unit and overall I&#8217;ve found it to be relatively trouble-free. I was recently upgrading the disks in the RAID set from 1TB to 2TB drives and it was going swimmingly. But then I heard a beep while the RAID was rebuilding disk 5 of 6 in the set. And I started to get some concerned e-mails from the NAS.<\/p>\n<p><strong>Server Name: qnap639<\/strong><br \/>\n<strong>\u00a0IP Address: 256.256.256.256<\/strong><br \/>\n<strong>\u00a0Date\/Time: 2011\/06\/09 16:27:33<\/strong><br \/>\n<strong>\u00a0Level:\u00a0 Error<\/strong><br \/>\n<strong>\u00a0[RAID5 Disk Volume: Drive 1 2 3 4 5 6] Error occurred while accessing Drive 3.<\/strong><\/p>\n<p><strong>Server Name: qnap639<\/strong><br \/>\n<strong>\u00a0IP Address: 256.256.256.256<\/strong><br \/>\n<strong>\u00a0Date\/Time: 2011\/06\/09 16:27:40<\/strong><br \/>\n<strong>\u00a0Level:\u00a0 Error<\/strong><br \/>\n<strong>\u00a0[RAID5 Disk Volume: Drive 1 2 3 4 5 6] Error occurred while accessing the devices of the volume in degraded mode.<\/strong><\/p>\n<p><strong>Server Name: qnap639<\/strong><br \/>\n<strong>\u00a0IP Address: 256.256.256.256<\/strong><br \/>\n<strong>\u00a0Date\/Time: 2011\/06\/09 16:29:32<\/strong><br \/>\n<strong>\u00a0Level:\u00a0 Warning<\/strong><br \/>\n<strong>\u00a0[RAID5 Disk Volume: Drive 1 2 3 4 5 6] Mount the file system read-only.<\/strong><\/p>\n<p><strong>Server Name: qnap639<\/strong><br \/>\n<strong>\u00a0IP Address: 256.256.256.256<\/strong><br \/>\n<strong>\u00a0Date\/Time: 2011\/06\/09 16:31:41<\/strong><br \/>\n<strong>\u00a0Level:\u00a0 Warning<\/strong><br \/>\n<strong>\u00a0[RAID5 Disk Volume: Drive 1 2 3 4 5 6] Rebuilding skipped.<\/strong><\/p>\n<p>Basically, it looks like the NAS thought one of the disks had popped. You can see this thing all over the QNAP forums &#8211; <a title=\"QNAP Forum\" href=\"http:\/\/forum.qnap.com\/viewtopic.php?p=155588\" target=\"_blank\">here<\/a>&#8216;s a good example &#8211; and it&#8217;s usually because of incompatibility between the QNAP firmware and various green hard disks. but I&#8217;d checked that my disks were on the Official QNAP HCL, and, well, that couldn&#8217;t be it. So I rebooted a bunch of times and ran S.M.A.R.T. scans on the allegedly failed disk. I pulled it out and erased it on an XP box and put it back in. The NAS wanted no part of it though. So it was time to get dirty with <strong>mdadm<\/strong>.<\/p>\n<p>Firstly, make sure there&#8217;s nothing going on on the NAS, stop the running services\u00a0and unmount the RAID device.<\/p>\n<pre><strong>\/etc\/init.d\/services.sh stop\r\n<\/strong><strong>umount \/dev\/md0<\/strong><\/pre>\n<p>Once the volume&#8217;s unmounted you can stop the volume.<\/p>\n<pre><strong>mdadm -S \/dev\/md0<\/strong><\/pre>\n<p>Now for the bit where you hold your breath for a while &#8211; the reassembly of the volume with the components you want.<\/p>\n<pre><strong>mdadm --assemble \/dev\/md0 \/dev\/sda3 \/dev\/sdb3 \/dev\/sdc3 \/dev\/sdd3 \/dev\/sde3 \/dev\/sdf3<\/strong><\/pre>\n<p>To see the progress, you can access a couple fo different commands.<\/p>\n<pre><strong>mdadm --detail \/dev\/md0\r\n<\/strong><strong>cat \/proc\/mdstat<\/strong><\/pre>\n<p>Once that&#8217;s complete, it&#8217;s best to run a filesystem check.<\/p>\n<pre><strong>e2fsck -f \/dev\/md0<\/strong><\/pre>\n<p>If there&#8217;re no errors, mount the volume and check that your stuff is still there.<\/p>\n<pre><strong>mount \/dev\/md0 \/share\/MD0_DATA<\/strong><\/pre>\n<p>I then rebooted and confirmed that everything started up correctly and my data was still there. But when I added the 6th drive, I got an error about a missing superblock and there didn&#8217;t seem to be any mdadm magic that would solve this problem. So like I good admin I rebooted, and the NAS started rebuilding the volume with the 6th disk. Now if I can only fix the problem where smbd kills the CPU and disconnects guests from the share we&#8217;ll be gold.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use a QNAP 639 Pro NAS at home to store my movies on. It&#8217;s a good unit and overall I&#8217;ve found it to be relatively trouble-free. I was recently upgrading the disks in the RAID set from 1TB to 2TB drives and it was going swimmingly. But then I heard a beep while the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[142,5],"tags":[391,110,389,800,390,227,787],"class_list":["post-846","post","type-post","status-publish","format-standard","hentry","category-qnap","category-storage","tag-e2fsck","tag-howto","tag-md-adm","tag-qnap","tag-raid","tag-recovery","tag-storage"],"_links":{"self":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/comments?post=846"}],"version-history":[{"count":8,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/846\/revisions"}],"predecessor-version":[{"id":2925,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/846\/revisions\/2925"}],"wp:attachment":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/media?parent=846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/categories?post=846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/tags?post=846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}