<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									QNAP NAS - Forum				            </title>
            <link>https://www.tweaking4all.com/forum/qnap-nas/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 17 Jun 2026 04:24:01 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>QNAP NAS Legacy - SSH - Manually get NAS up and running from power failure.</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/qnap-nas-legacy-ssh-manually-get-nas-up-and-running-from-power-failure/</link>
                        <pubDate>Fri, 27 Dec 2024 12:54:11 +0000</pubDate>
                        <description><![CDATA[The RAID array is offline.Disk 1 is not working but the NAS was working but it got in a confusion and would no longer boot.So, I started without disks, added disks and ran the following comm...]]></description>
                        <content:encoded><![CDATA[<p>The RAID array is offline.<br /><br />Disk 1 is not working but the NAS was working but it got in a confusion and would no longer boot.<br /><br />So, I started without disks, added disks and ran the following commands and got the following response.<br /><br />config_util 1<br />storage_boot_init 1<br /><br />cat /proc/mdstat<br /><br />md4 : active ….<br /><br />md9 : active …<br /><br />What do I do next? will "reboot" be sufficient or do I need to issue another command?</p>
<p>This is a QS419U II</p>
<p> </p>
<p>Thanks!</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Anonymous</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/qnap-nas-legacy-ssh-manually-get-nas-up-and-running-from-power-failure/</guid>
                    </item>
				                    <item>
                        <title>Change drives in 559 Pro II</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/change-drives-in-559-pro-ii/</link>
                        <pubDate>Sun, 22 Sep 2024 13:15:03 +0000</pubDate>
                        <description><![CDATA[Hey all.I have search Google and yes there is a lot of different opinions out there so not to do anything wrong here i will try ask here also.I have a good working TS-559 Pro II running RAID...]]></description>
                        <content:encoded><![CDATA[<p><span>Hey all.</span><br /><br /><span>I have search Google and yes there is a lot of different opinions out there so not to do anything wrong here i will try ask here also.</span><br /><br /><span>I have a good working TS-559 Pro II running RAID5 fine with 5 x 3TB disc's but 2 of the drives is standard consumer drives and i now have 2 more Red disc i would like to change in the system.</span><br /><span>How do i do this the most easy but also safe way</span><br /><br /><span>Can i just pull out one of the disc and put in a new one wile NAS is still running or do i need to shut down and change one disc at a time ?</span><br /><br /><span>TS-559 Pro II RAID 5 latest firmware 4.2.6 (Sad no newer FW) but thats life i'm only using my NAS for file sharing and its doing alright but as i said i'm afraid the standard 2 disc will die on me</span><br /><span>so now when i have to better WD Red disc i think i should swop them.</span><br /><br /><span>Thx everyone.</span></p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Anonymous</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/change-drives-in-559-pro-ii/</guid>
                    </item>
				                    <item>
                        <title>How can I remove my Raid (encrypted) via SSH and Reset Device again</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/how-can-i-remove-my-rain-encrypted-via-ssh/</link>
                        <pubDate>Tue, 13 Aug 2024 09:03:43 +0000</pubDate>
                        <description><![CDATA[I have done factory reset but cannot get to the gui it just sits on the Loading screen after username and password installwed?]]></description>
                        <content:encoded><![CDATA[<p>I have done factory reset but cannot get to the gui it just sits on the Loading screen after username and password installwed?</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Anonymous</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/how-can-i-remove-my-rain-encrypted-via-ssh/</guid>
                    </item>
				                    <item>
                        <title>QNAP - Send WakeOnLAN from your QNAP to wake up another network device</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/qnap-send-wakeonlan-from-your-qnap-to-wake-up-another-network-device/</link>
                        <pubDate>Sat, 18 May 2024 15:57:05 +0000</pubDate>
                        <description><![CDATA[I found it surprisingly challenging to send a WOL (Wake on LAN) signal FROM a QNAP to wake up another network device.
My situation: at night I run a backup (rsync) of my QNAP to another NAS...]]></description>
                        <content:encoded><![CDATA[<p>I found it surprisingly challenging to send a <a href="https://www.tweaking4all.com/network-internet/wake-on-lan/" target="_blank" rel="noopener">WOL (Wake on LAN)</a> signal FROM a QNAP to wake up another network device.</p>
<p>My situation: at night I run a backup (rsync) of my QNAP to another NAS, so I was looking for a commandline statement that could do this.<br />Well, there is none standard on your QNAP, and OPKG seems dead as well, so what do you do?</p>
<p>Well if you having an Intel (x64) based QNAP, then you're in luck.<br />I did find <a href="https://github.com/GramThanos" target="_blank" rel="noopener">this cool little tool written by </a><span><a href="https://github.com/GramThanos" target="_blank" rel="noopener">GramThanos</a> - super compact and it works on my QNAP (TVS873).</span></p>
<p>Download the zip file, extract the binary, copy it to your QNAP (I dumped it for now in my Downloads directory) and make it executable:</p>
<pre contenteditable="false">chmod +x WakeOnLAN</pre>
<p>Next you can use it like so:</p>
<pre contenteditable="false">./WakeOnLAN MACADDRESS BROADCASTADDRESS</pre>
<p>Look up the mac address of the device you'd like to wake up, and add "255.255.255.255" (default doesn't seem to work).<br />All this would then look something like this:</p>
<pre contenteditable="false">./WakeOnLAN 09:18:ab:d2:ef:9e 255.255.255.255</pre>
<p> </p>
<p>For backup purposes, always good to look at <a href="https://github.com/GramThanos" target="_blank" rel="noopener">the original page</a> first, the binary that I used:</p>
573]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/qnap-send-wakeonlan-from-your-qnap-to-wake-up-another-network-device/</guid>
                    </item>
				                    <item>
                        <title>QNAP - See RAID rebuild progress from command line (SSH)</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/qnap-see-raid-rebuild-progress-from-command-line-ssh/</link>
                        <pubDate>Fri, 10 May 2024 08:36:00 +0000</pubDate>
                        <description><![CDATA[To speed up the rebuild of a RAI volume, I usually stop/disable as many applications and services (including network sharing) as I can, and I do not access the QNAP through the webUI - just ...]]></description>
                        <content:encoded><![CDATA[<p>To speed up the rebuild of a RAI volume, I usually stop/disable as many applications and services (including network sharing) as I can, and I do not access the QNAP through the webUI - just to save resources. This really makes a huge differences, especially when you give the rebuild the highest priority (Resync First).</p>
567
<p>Now the challenge is how to monitor progress.</p>
<p>First thing I did is adding a rule to the Notification Center, so I get a notification when a rebuild was completed.<br />But I'm antsy at times and really want to know how far we are with the rebuild.</p>
<p>With SSH you can execute this to see your progress ...</p>
<pre contenteditable="false">cat /proc/mdstat</pre>
<p>You'll see something like this (I removed the less relevant info), where it shows we're at 38.5%:</p>
<pre contenteditable="false">...      
md2 : active raid6 sdj3 sdi3 sdd3 sdc3 sde3 sdf3 sdh3 sdg3
      23382380544 blocks super 1.0 level 6, 512k chunk, algorithm 2  
        recovery = 38.5% (1502218752/3897063424) finish=733.2min speed=54433K/sec
      bitmap: 5/30 pages , 65536KB chunk
...</pre>
<p>Hope this is helpful to anyone &#x1f601; </p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/qnap-see-raid-rebuild-progress-from-command-line-ssh/</guid>
                    </item>
				                    <item>
                        <title>QNAP - Reports QPKG &quot;disabled&quot;, how to enable the QPKG again?</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/qnap-reports-disabled-how-to-enable-the-qpkg-again/</link>
                        <pubDate>Sun, 05 May 2024 10:39:19 +0000</pubDate>
                        <description><![CDATA[For some odd reason, I wasn&#039;t able to start one of my installed applications from terminal, as it kept reporting &quot;disabled&quot;.Eg. for Jellyfin this would say something like:
Jellyfin is not e...]]></description>
                        <content:encoded><![CDATA[<p>For some odd reason, I wasn't able to start one of my installed applications from terminal, as it kept reporting "disabled".<br />Eg. for Jellyfin this would say something like:</p>
<pre contenteditable="false">Jellyfin is not enabled.</pre>
<p>So how do you "enable"  this QPKG?<br />I found this to be the way to do this:</p>
<pre contenteditable="false">qpkg_cli --enable Jellyfin</pre>
<p>Note that qpkg_cli is a quite power full tool for dealing with QPKG files.</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/qnap-reports-disabled-how-to-enable-the-qpkg-again/</guid>
                    </item>
				                    <item>
                        <title>Amcrest - IP Camera (IP3M-HX2) store recordings on QNAP NAS</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/amcrest-ip-camera-ip3m-hx2-store-recordings-on-qnap-nas/</link>
                        <pubDate>Thu, 25 Apr 2024 07:17:32 +0000</pubDate>
                        <description><![CDATA[This seems to work for most Amcrest IP camera&#039;s, but I&#039;ve only used it with my good old IP3M-HX2.
So the Amcrest camera can store recordings and snapshots on a NAS, but it&#039;s very unclear ho...]]></description>
                        <content:encoded><![CDATA[<p>This seems to work for most Amcrest IP camera's, but I've only used it with my good old IP3M-HX2.</p>
<p>So the Amcrest camera can store recordings and snapshots on a NAS, but it's very unclear how this needs to be setup from looking at the WebUI of the camera.<br />So some searching finally made me find this description (<a href="https://support.amcrest.com/hc/en-us/articles/360057795691-NAS-Connection-Using-a-QNAP-Storage-Devices" target="_blank" rel="noopener">link</a>) and I'm just posting it here for future reference and/or as a backup.</p>
<p><strong>Short version</strong>: It uses a NFS share ... (would never have figured this out by myself)</p>
<p>Long version:</p>
<p><span style="font-size: 14pt;color: #0000ff"><strong>QNAP / NAS</strong></span></p>
<p><span>To allow Amcrest cameras to connect to QNAP via NAS connection you will have to enable NFS in the Network and File Services located in the control panel of your NAS. </span><span>For more information on how to do this, please refer to the information provided below. </span><span></span></p>
<p>Note: QVR and QVR Pro support most Amcrest camera's as well. Worse case as ONVIF camera's.</p>
<p><span><strong>Step 1:</strong> Please open Control Panel and navigate to <strong>Network &amp; File Services</strong> &gt; Win/Mac/NFS.</span></p>
557
<p><strong>Step 2:</strong><span> </span><span>Click </span><strong>NFS Service</strong><span> in the new window and enable NFS v2/v3 and/or NFS v4.</span></p>
558
<p><strong>Step 3:</strong><span> After the services have been enabled, follow the link “Click here to set the NFS access right of the network share”. You will be taken to the </span><strong>Shared Folders</strong><span> menu.</span></p>
559
<p class="wysiwyg-text-align-left"><span><strong>Step 4:</strong> Under the Action column, please click on <strong>Edit Shared Folder Permission</strong>.</span></p>
560
<p class="wysiwyg-text-align-left"><span><strong>Step 5:</strong> In the next window, select </span><strong><span>NFS host access</span></strong><span> under </span><span>Select permission type.</span></p>
561
<p class="wysiwyg-text-align-left"><strong>Step 6:</strong><span> </span><span>NFS access right is disabled by default, here you can enable it first.</span></p>
562
<p> </p>
<p><span><strong>Step 7:</strong> Click the </span><span>Add</span><span> button to add </span><span>Host / IP / Network</span><span> and to set their permissions</span></p>
<p><strong><span>Allowed IP Address or Domain Name</span></strong></p>
<ol>
<li><span class="wysiwyg-color-black">Single server: A valid domain name, hostname, or IP address that can be resolved by a DNS server.</span></li>
<li><span class="wysiwyg-color-black">Use wildcard characters to specify a series of servers: Use “*” or “?” to specify the string criteria. When you use wildcard characters in a valid hostname, dot (.) is not included in wildcard characters. For example, when you enter *.example.com, one.example.com is counted while one.two.example.com is not counted.</span></li>
<li><span class="wysiwyg-color-black">IP network: Use a.b.c.d/x. a.b.c.d refers to the network and x refers to number of bits of the network mask, for example, 192.168.0.0/24. Another valid format is a.b.c.d/network mask. In this case, a.b.c.d refers to the network and the following value refers to the network mask setting. For example, 192.168.100.8/255.255.255.0.</span></li>
<li><span class="wysiwyg-color-black">If using IPv6, enter the IP address and prefix length (ex: 2001::208:9bff:feed:5023/64) for filtering devices and permission settings. If the prefix length is not set, it will refer to a single host IP.</span></li>
<li><span class="wysiwyg-color-black">Network group: Represented as @group-name; group-name refers to the name of NIS network group.</span></li>
</ol>
563
<p><span>The Host/IP/Network field will be the local IP address of your Amcrest camera. Please make sure the permission is set to read/write and the squash option is at Squash no users.</span></p>
564
<p><span>Hit <strong>Apply</strong> after you have finished setting everything up.</span></p>
<p> </p>
<p><span style="color: #0000ff;font-size: 14pt"><strong>IP Camera</strong></span></p>
<p><span>After setting up the NFS rule you will need to enter the IP address of your QNAPdevice into the camera's NAS configuration. To do this you will need to access the camera's web user interface (web UI) using a web browser. </span></p>
<p><span><strong>Step 1:</strong> In the web UI, click on <strong>Setup&gt;&gt;Storage&gt;&gt;Destination</strong> and click on <strong>NAS</strong> in the <strong>Path</strong> tab. </span></p>
565
<p><strong>Step 2:</strong><span> Click on the </span><strong>NAS</strong><span> tab. Enter the NAS server address and make sure you specify the volume and the folder where the recordings will be sent to. As shown below:</span></p>
566
<p><span>Click <strong>Save</strong>. </span><span></span></p>
<p><span>The events from your camera will be stored in the file station of your NAS. </span></p>
<p>This works in a similar way for other NAS devices (<a href="https://support.amcrest.com/hc/en-us/articles/360057310652-NAS-Connection-Using-a-Synology-Storage-Devices" target="_blank" rel="noopener">Synology</a> for example).</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/amcrest-ip-camera-ip3m-hx2-store-recordings-on-qnap-nas/</guid>
                    </item>
				                    <item>
                        <title>Amcrest - IP Camera RTSP link (IP3M-HX2)</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/amcrest-ip-camera-rtsp-link-ip3m-hx2/</link>
                        <pubDate>Fri, 29 Mar 2024 10:20:40 +0000</pubDate>
                        <description><![CDATA[While tinkering with some IP camera&#039;s and my QNAP, I found myself testing camera.ui (QNAP Package) - which seems like a very lightweight alternative to QVR, QVR Pro and QVR Elite.
Problem: ...]]></description>
                        <content:encoded><![CDATA[<p>While tinkering with some IP camera's and my QNAP, I found myself testing <a href="https://github.com/SeydX/camera.ui" target="_blank" rel="noopener">camera.ui</a> (<a href="https://www.myqnap.org/product/camera-ui-apache82/" target="_blank" rel="noopener">QNAP Package</a>) - which seems like a very lightweight alternative to QVR, QVR Pro and QVR Elite.</p>
<p>Problem: what is the RTSP link for my older Amcrest IP camera's?</p>
<p>Took me some time to find it, so for my own reference, and maybe for others:</p>
<pre contenteditable="false">rtsp://username:password@ipaddress:port/cam/realmonitor?channel=1&amp;subtype=0</pre>
535
<p> </p>
<p><strong>RTSP URL Breakdown</strong><br /><br />The bracketed items are variables that you need to input according to your setup. <br />Explanations of each variable are given below.<br /><br /><strong>username</strong> - username of the device<br /><strong>password</strong> - password of the device<br /><strong>IPaddress</strong> - IP address of the device. If you are not on the same local network, this should be the external IP address of the device's network.<br /><strong>port</strong> - RTSP port number (default <span style="color: #ff0000"><strong>554</strong></span>)<br /><strong>channel</strong> - channel number of the stream (default "<span style="color: #ff0000"><strong>1</strong></span>" - I haven't found any other channels)<br /><strong>subtype</strong> - main or sub stream (main = <span style="color: #ff0000"><strong>0</strong></span>, sub = <span style="color: #ff0000"><strong>1</strong></span>)</p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/amcrest-ip-camera-rtsp-link-ip3m-hx2/</guid>
                    </item>
				                    <item>
                        <title>QNAP - Possible fix for backplane issues (backup of QNAP forum findings)</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/qnap-possible-fix-for-backplane-issues-backup-of-qnap-forum-findings/</link>
                        <pubDate>Sat, 24 Feb 2024 10:15:42 +0000</pubDate>
                        <description><![CDATA[Seems some QNAP models may or may not experience backplane issues die to the involved MOSFets not doing their work properly.This here is a copy, just for my own purposes, based on info mostl...]]></description>
                        <content:encoded><![CDATA[<p>Seems some QNAP models may or may not experience backplane issues die to the involved MOSFets not doing their work properly.<br />This here is a copy, just for my own purposes, based on info mostly <a href="http://forum.qnap.com/viewtopic.php?t=134212" target="_blank" rel="noopener">posted in the QNAP Forum</a>. </p>
<p>For me, the backplane issue reveals itself often on boot, seemingly when the system is still "warm" from running just a second ago. So far I've worked around like:<br />- Never shutdown teh NAS, at best go to sleep mode.<br />- Make sure you use UPS with your NAS, since power brownouts may kill the power supply and/or MOSFets.</p>
<p>Note: I have experienced this with my TVS-873 (which QNAP replaced for free) and my TS-896 Pro (I am using the sleep trick for now).</p>
<hr />
<p> </p>
<p>Based on Kommisar's post we gave it a shot today and it looks to be working.</p>
<p>Disk 3 is on, and raid is rebuilding.</p>
<p>If you are going to attempt this on your own boards, read and understand Kommisar's post so you can trace your own board. <br />Verify your problem is identical before trying this solution.</p>
<p>Here is what was needed for my specific scenario (disk 3 failure, eventually leading to no power).</p>
507
<p>The mosfet that seems to be the issue is on the opposite side, and is labelled 4957AGM. <a href="http://www.google.com/search?q=4957AGM" target="_blank" rel="noopener">Google for pinouts</a> (datasheet attached below).</p>
509
<p>That IC contains 2 mosfets.</p>
<p>Tracing the pins looks like one feeds the 12V sata pins and the other feeds the 5V sata pins (at least for bay 3, other bays may need a different fix).</p>
<p>Shorting the source and drain of each will bypass the mosfet and supply power permanently to the sata ports. <br />One or both could be faulty, in my case it looks like only the 5V fix was needed but we did both.</p>
<p>** You could also just replace the IC with another 4957AGM, although it may still fail again (something caused it to fail originally).<br /><br />Shorted:</p>
510
<p>Make these changes at your own risk. Modifying a circuit should be your last resort! RMA it if you are not familiar with what is shown here (or don't have a friend who is!).<br /><br />Might not hurt to ask QNAP support if they will offer up a replacement board for sale (it's an easy enough swap), assuming they have a solution to the fault.<br /><br />Thanks <strong>Kommisar</strong> for the diagnostic work!</p>
<p> </p>
<p>Note: <br />Some QNAP backplanes have jumpers to short the MOSFets. <br />You'll have to trace them to make sure yours has these jumpers and that they are indeed the right jumpers. <br />(<a href="https://youtu.be/gaQLFxYl2p8?si=oMHuX8GREJJUKzuf" target="_blank" rel="noopener">source</a>)</p>
511
<p>Datasheet:</p>
512
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/qnap-possible-fix-for-backplane-issues-backup-of-qnap-forum-findings/</guid>
                    </item>
				                    <item>
                        <title>QNAP - SSH - Manually rebuild &quot;inactive volume&quot; (some useful commands)</title>
                        <link>https://www.tweaking4all.com/forum/qnap-nas/qnap-ssh-manually-rebuild-inactive-volume-some-useful-commands/</link>
                        <pubDate>Fri, 16 Feb 2024 14:07:59 +0000</pubDate>
                        <description><![CDATA[Here some info I got my hands on, when trying to recover my RAID Volume that had become inactive after encountering a backplate issue which would at random eject my disk - naturally, this ba...]]></description>
                        <content:encoded><![CDATA[<p>Here some info I got my hands on, when trying to recover my RAID Volume that had become inactive after encountering a backplate issue which would at random eject my disk - naturally, this backplane issue needs to be resolved since this error (in my situation) will happen again ofcourse. </p>
<p>Anyhoo - I've seen some interesting commands that may be helpful for others.</p>
<hr />
<p style="text-align: center"><span style="color: #ff0000;font-size: 14pt"><strong>CAUTION:</strong></span><br /><span style="color: #ff0000;font-size: 12pt">Only use these commands if you know what you're doing.</span><br /><span style="color: #ff0000;font-size: 12pt">In general I'd recommend contacting QNAP support and have them look at it.<br />QNAP has very good support, even for old QNAP (EOL) models!</span></p>
<hr />
<p>First of all, all these commands are executed through an SSH (Shell) connection. <a href="https://www.tweaking4all.com/network-internet/ssh-clients/" target="_blank" rel="noopener">This old QNAP article</a> or <a href="https://www.qnap.com/en/how-to/knowledge-base/article/how-to-access-qnap-nas-by-ssh" target="_blank" rel="noopener">this official QNAP article</a> may be helpful, but then again: if you do not know what an SSH connection is, you'd probably be better off by contacting QNAP support.</p>
<p> </p>
<p><strong>Check RAID Status</strong></p>
<p>The easiest way to check the RAID status is done with md_checher, which should be on your QNAP by default (my old QTS4 QNAP and newer QTS5 QNAP had it both installed):</p>
<pre contenteditable="false">md_checker</pre>
<p>In my case this generated a list like this, where the "AAAA.AA." probably indicates trouble as it seems to be missing two spots. </p>
<pre contenteditable="false">Welcome to MD superblock checker (v1.4) - have a nice day~

Scanning system...

HAL firmware detected!
Scanning Enclosure 0...

RAID metadata found!
UUID:		aac26467:7ef59f4f:51673f80:8c31584b
Level:		raid6
Devices:	8
Name:		md1
Chunk Size:	64K
md Version:	1.0
Creation Time:	Sep 7 19:53:43 2020
Status:		OFFLINE
===============================================================================
 Disk | Device | # | Status |   Last Update Time   | Events | Array State
===============================================================================
   1  /dev/sda3  0   Active   Feb  8 14:41:00 2024    58609   AAAA.AA.                 
   2  /dev/sdb3  1   Active   Feb  8 14:41:00 2024    58609   AAAA.AA.                 
   3  /dev/sdc3  2   Active   Feb  8 14:41:00 2024    58609   AAAA.AA.                 
   4  /dev/sdd3  3   Active   Feb  8 14:41:00 2024    58609   AAAA.AA.                 
   5  /dev/sde3  4   Active   Feb  8 14:36:42 2024    58422   AAAAAAAA                 
   6  /dev/sdf3  5   Active   Feb  8 14:36:42 2024    58422   AAAAAAAA                 
   7  /dev/sdg3  6   Active   Feb  8 14:36:42 2024    58422   AAAAAAAA                 
   8  /dev/sdh3  7   Active   Feb  8 14:36:42 2024    58422   AAAAAAAA                 
===============================================================================
</pre>
<p> </p>
<p><strong>Check if Disks are Detected properly</strong></p>
<p>As show in my <a href="https://www.tweaking4all.com/forum/qnap-nas/qnap-ssh-command-to-list-all-internal-disks-qcli_storage/" target="_blank" rel="noopener">previous post</a>, we can use <strong>qcli_storage</strong> storage for that:</p>
<pre contenteditable="false">qcli_storage -d</pre>
<p>On my NAS all disks were detected properly:</p>
<pre contenteditable="false">Enclosure  Port  Sys_Name     Type      Size      Alias          Signature   Partitions  Model  
NAS_HOST   1     /dev/sda     HDD:data  3.64 TB   --             QNAP FLEX   5           WDC WD40EFRX-68N32N0
NAS_HOST   2     /dev/sdb     HDD:data  3.64 TB   --             QNAP FLEX   5           WDC WD40EFRX-68N32N0
NAS_HOST   3     /dev/sdc     HDD:data  3.64 TB   --             QNAP FLEX   5           WDC WD40EFRX-68N32N0
NAS_HOST   4     /dev/sdd     HDD:data  3.64 TB   --             QNAP FLEX   5           WDC WD40EFZX-68AWUN0
NAS_HOST   5     /dev/sde     HDD:free  3.64 TB   --             QNAP FLEX   5           WDC WD40EFRX-68N32N0
NAS_HOST   6     /dev/sdf     HDD:free  3.64 TB   --             QNAP FLEX   5           WDC WD40EFZX-68AWUN0
NAS_HOST   7     /dev/sdg     HDD:free  3.64 TB   --             QNAP FLEX   5           WDC WD40EFRX-68N32N0
NAS_HOST   8     /dev/sdh     HDD:free  3.64 TB   --             QNAP FLEX   5           WDC WD40EFRX-68N32N0</pre>
<p> </p>
<p><strong>Check if all disks have RAID (md) information</strong></p>
<p>Next we need to check all disks to see if they have md superblock information:</p>
<pre contenteditable="false">mdadm -E /dev/sda3
mdadm -E /dev/sdb3
mdadm -E /dev/sdc3
mdadm -E /dev/sdd3
mdadm -E /dev/sde3
mdadm -E /dev/sdf3
mdadm -E /dev/sdg3
mdadm -E /dev/sdh3</pre>
<p>Example output of one of my disks:</p>
<pre contenteditable="false">/dev/sda3:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
     Array UUID : aac26467:7ef59f4f:51673f80:8c31584b
           Name : 1
  Creation Time : Mon Sep  7 19:53:43 2020
     Raid Level : raid6
   Raid Devices : 8

 Avail Dev Size : 7794127240 (3716.53 GiB 3990.59 GB)
     Array Size : 23382381696 (22299.18 GiB 23943.56 GB)
  Used Dev Size : 7794127232 (3716.53 GiB 3990.59 GB)
   Super Offset : 7794127504 sectors
   Unused Space : before=0 sectors, after=264 sectors
          State : clean
    Device UUID : b8d7db50:63e4ca78:53c5877e:2e946fd0

    Update Time : Thu Feb  8 14:41:00 2024
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : 7b01bedb - correct
         Events : 58609

         Layout : left-symmetric
     Chunk Size : 64K

   Device Role : Active device 0
   Array State : AAAA.AA. ('A' == active, '.' == missing, 'R' == replacing)</pre>
<p> </p>
<p><strong>Manually reassemble the RAID</strong></p>
<p><span style="color: #ff0000"><strong>CAUTION</strong>: This step may damage your RAID volume! If unsure: contact QNAP support!</span></p>
<p>Now, if all disks have md information (<strong>Device Role</strong> shows <strong>Active device #</strong>), you can include all these disks (8 in my case) to manually reassemble the RAID (md1) like so:</p>
<pre contenteditable="false">mdadm -AfR /dev/md1 mdadm -E /dev/sda3 mdadm -E /dev/sdb3 mdadm -E /dev/sdc3 mdadm -E /dev/sdd3 mdadm -E /dev/sde3 mdadm -E /dev/sdf3 mdadm -E /dev/sdg3 mdadm -E /dev/sdh3</pre>
<p>Now if a disk is missing (max 1 for RAID 5, and max 2 for RAID 6) then you can skip those in this command.<br />If you have too many disks missing, or too many disks with missing md information, then you will not be able to use the "<strong>mdadm -AfR</strong>" command to reassemble the RAID.<br /><br /></p>
<p><strong>Verify and bringing the volume back online</strong></p>
<p>When all that was completed successfully, verify if RAID is online, again with md_checker:</p>
<pre contenteditable="false">md_checker</pre>
<p><br />If md_checker is showing that the RAID is ONLINE again, then you can the following to recover the storage config:</p>
<pre contenteditable="false">/ etc/init.d/init_lvm,sh</pre>
<p>(remove the space between the slah forward and "etc" - mod_security of the webserver doesn't seem to like it)</p>
<p>You can after that verify if the RAID and volume are good.<br />If you are not familiar with these commands, then please read up on them before using them.<br /><em>Some references:</em> <a href="https://man7.org/linux/man-pages/man8/pvs.8.html" target="_blank" rel="noopener">pvs</a>, <a href="https://man7.org/linux/man-pages/man8/vgs.8.html" target="_blank" rel="noopener">vgs</a>, <a href="https://man7.org/linux/man-pages/man8/lvs.8.html" target="_blank" rel="noopener">lvs</a>, <a href="https://man7.org/linux/man-pages/man1/df.1p.html" target="_blank" rel="noopener">df</a>, <a href="https://man7.org/linux/man-pages/man8/mount.8.html" target="_blank" rel="noopener">mount</a>.</p>
<pre contenteditable="false">md_checker
pvs
vgs
lvs -a
ls -l /dev/mapper/
df
mount</pre>
<p><br />After this, the volume is usually name "/dev/mapper/cachedev<span style="color: #ff0000">X</span>" which mounts to "/share/CACHEDEV<span style="color: #ff0000">X</span>_DATA".<br />For example the volume such as /dev/mapper/cachedev1 is mounted to path /share/CACHEDEV1_DATA.</p>
<p>You can then verify the content "File Station" or in the Shell with for example:</p>
<pre contenteditable="false">ls -l /share/CACHEDEV1_DATA/</pre>
Hope this is useful to fellow QNAP users.]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/qnap-nas/">QNAP NAS</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/qnap-nas/qnap-ssh-manually-rebuild-inactive-volume-some-useful-commands/</guid>
                    </item>
							        </channel>
        </rss>
		