<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FlexRaid &#8211; BeatificaBytes</title>
	<atom:link href="https://www.BeatificaBytes.be/tag/flexraid/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.BeatificaBytes.be</link>
	<description>The Joys of Computing</description>
	<lastBuildDate>Fri, 15 Aug 2014 23:36:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>
	<item>
		<title>Replacing RAID-F by T-RAID</title>
		<link>https://www.BeatificaBytes.be/replacing-raid-f-by-t-raid/</link>
					<comments>https://www.BeatificaBytes.be/replacing-raid-f-by-t-raid/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Fri, 15 Aug 2014 23:36:08 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[FlexRaid]]></category>
		<category><![CDATA[RAID]]></category>
		<guid isPermaLink="false">/wordpress/?p=1833</guid>

					<description><![CDATA[T-RAID (for Transparent RAID) is a new product of flexRAID. It comes as another option next to the existing product: RAID-F (RAID over File System). I [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">T-RAID (for Transparent RAID) is a new product of <a title="FlexRaid" href="http://www.FlexRaid.com" target="_blank" rel="noopener noreferrer">flexRAID</a>. It comes as another option next to the existing product: RAID-F (RAID over File System). I did migrate from Raid-F to T-RAID months ago&#8230;</p>
<figure id="attachment_1834" aria-describedby="caption-attachment-1834" style="width: 267px" class="wp-caption aligncenter"><a href="https://www.beatificabytes.be/wp-content/uploads/2014/08/tRaid.png"><img fetchpriority="high" decoding="async" class="size-medium wp-image-1834" alt="T-RAID" src="https://www.beatificabytes.be/wp-content/uploads/2014/08/tRaid-267x300.png" width="267" height="300" /></a><figcaption id="caption-attachment-1834" class="wp-caption-text">T-RAID</figcaption></figure>
<p style="text-align: justify">Here is how I configure it now in order to get the best performances for my server and my own usage.</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b2d862772c8"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b2d862772c8'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b2d862772c8" class="collapseomatic_content ">
<p style="text-align: justify"><span style="text-decoration: underline"><strong>Nice Features</strong></span></p>
<p style="text-align: justify">I love T-RAID. It has great features similar to RAID-F, e.g.:</p>
<ul style="text-align: justify">
<li>Software Raid Array fully independent from the hardware.
<ul>
<li>If a physical controller die, no need to replace it with another identical one.</li>
</ul>
</li>
<li>Support adding a disk with existing data into the Software Raid Array.
<ul>
<li>No need to add blank disk as required with hardware raid or with Windows Storage Server.</li>
</ul>
</li>
<li>Survive to simultaneous failure of several drives.</li>
<li>Access each disk through a virtual disk or through a Pool offering a unique/global view on all the virtual disks.</li>
</ul>
<p style="text-align: justify">But it comes with its own advantages on RAID-F</p>
<ul style="text-align: justify">
<li>It&#8217;s a native Real-Time protection without any drawback compared to &#8220;RAID-F RealTime&#8221; (E.g.: RAID-F in RT mode MUST be stopped gracefully before shutting down the machine)</li>
<li>Data on failing disks are still accessible in Read and Write mode! There is therefore no downtime during the &#8220;disk reconstruction&#8221; (Similar to hardware Raid)</li>
<li>It comes with interesting monitoring and notification tools (Performances, S.M.A.R.T, &#8230;)</li>
<li>It comes with Storage Accelerations.
<ul>
<li>Currently, a &#8220;Landing Zone&#8221;: use of a SSD as a temporary storage. Files copied into the array are dropped onto the SDD and transferred later, in background, to the array.</li>
<li>Soon, &#8220;SSD caching&#8221;.</li>
</ul>
</li>
</ul>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>RAID Options</strong></span></p>
<p style="text-align: justify">Once Physical Drives &#8220;Registered as Pass-Through&#8221;, to be used as DRU or PPU, and added into a &#8220;RAID Configuration (defining hence an &#8220;Array&#8221;), one can set various options on that &#8220;Configuration&#8221;</p>
<p style="text-align: justify"><strong>Options:</strong></p>
<ul style="text-align: justify">
<li>Auto Start Array=<strong>false</strong>. Because I don&#8217;t always turn on my PC to access the data stored in the T-RAID array. Bu also because I often change settings in my Configuration for testing purpose and changes may often not be applied if the array is already running&#8230;</li>
<li>Global Hot-Spare Rebuild=false. This is the recommended value as human interaction is preferred on automatic rebuild in case of disk failure</li>
<li>Read-Only Policy=Never. This is the default and authorize writing on all disks in the array, even on disks failing.</li>
<li>Scheduled Range Operation Size (in GB)=100. I didn&#8217;t fine-tune this default value yet (taking into account e.g. how much data can be validated per hours when the server is on). Actually, I turn my server on only a few times per month, to do massive backups. Once the backups completed, I start a complete Validation of the array and configure the system to shutdown on completion.</li>
<li>Statistics: File=<strong>true</strong>, RAID=<strong>true</strong>. I want indeed to monitor my system. But File Statistics requires a Job to be scheduled for the Storage!</li>
</ul>
<p style="text-align: justify"><strong>Performance Options:</strong></p>
<ul style="text-align: justify">
<li>Performance Profile=<strong>PERFORMANCE</strong>. Because my server is only on when I want to do backups, I don&#8217;t care about saving disks/energy. On the opposite, I care about performance and this profile provides indeed noticeable improvements at disk access speed level.</li>
<li>Concurrency Queuing (CQ) Depth=64, Salt=<strong>16</strong>. Salt is use in the algorithm managing &#8220;concurrency&#8221; within T-RAID.  System could experience lock overrides if the salt is too high and constant out of sync blocks if it is too low. The perfect values depends on the hardware&#8230; So, as long as &#8220;out of sync blocks&#8221; are reported during &#8220;Verify and Sync&#8221; tasks, increase the salt. But look into the &#8220;RAID Monitoring&#8221; tab for the graphic &#8220;<a title="Understanding the RAID Monitoring Plugin" href="http://wiki.flexraid.com/2013/06/27/understanding-the-raid-monitoring-plugin/" target="_blank" rel="noopener noreferrer">Lock Override</a>&#8220;, if the value is increasing drastically, lower the salt!</li>
<li>OS Caching=<strong>false</strong>. I don&#8217;t use this one as it doesn&#8217;t help to keep high performances when copying files larger than the amount of RAM, which is the case for me. In addition, the PERFORMANCE mode is not guarantee to be efficient with &#8220;OS Caching&#8221;=true when using multiple PPU, which is also the case for me.</li>
<li>Tagged Command Queuing (TCQ)=<strong>true</strong>, Depth=32. I am using this option to improve performances as it&#8217;s compatible with the PERFORMANCE mode while using multiple PPU. It allow up to 90% of source disk write speed.</li>
<li>Sequential Write Optimization (SWO)=true, Depth=8. I keep those default values.</li>
<li>Direct I/O=true. I also keep those default values.</li>
</ul>
<p style="text-align: justify"><strong>Storage Options:</strong></p>
<ul style="text-align: justify">
<li>Auto Storage Pooling Start=<strong>false</strong>, Delay=15. Notice that it&#8217;s recommended to never access the virtual disks directly (assigning them with a drive letter). Instead, using only the Pool add an extra visualization layer which makes hot-unplugging much less issue prone. But I often change settings in my Configuration for testing purpose and changes may often not be applied if the pool is already running&#8230;</li>
<li>Removable=<strong>false</strong>. This settings<a title="Transparent Raid For Windows Server 2012 Essentials" href="http://wiki.flexraid.com/2013/06/17/transparent-raid-support-for-whs-2011-storage-server-and-windows-server-2012-essentials/" target="_blank" rel="noopener noreferrer"> must be set on false</a> on Windows Server 2012 Essentials.</li>
<li>Storage Pool Caching=<strong>META_DATA_ONLY</strong>, Max=310. I noticed that performances are <strong>much better</strong> when using this setting instead of File_AND_META_DATA for copy of large files, which is the case for me.</li>
<li>Sync Folder Last Modified Date=false. I would enable this only if I use a program tracking file modification date (Ex.: sync or backup daemon)</li>
<li>Thread Pool Size=32. I keep this default</li>
<li>Space Management Reserve (in GB)=50. I keep this default.</li>
<li>File Management Strategy=<strong>STRICT_FOLDER_PRIORITY</strong>. I want to keep all files together even if it&#8217;s not &#8220;energy optimal&#8221;. Indeed, in case of disaster, I will at least easily retrieve related files on disks still &#8220;alive&#8221;&#8230;</li>
<li>File System=NTFS, strict ACL Mode=false. I keep those defaults</li>
<li>Drive Letter or Folder Mount Point=<strong>V</strong>. This is the letter to be assigned to the Pool. It is shared to be accessible from other machine in my Intranet</li>
<li>Native NFS Support=false. I keep this default.</li>
<li>Volume Label: <strong>tRAID Storage Pool</strong></li>
</ul>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>Advanced Operations</strong></span></p>
<ul>
<li><strong>Storage Acceleration</strong>. I don&#8217;t use it so far as the write performances are good enough for me and anyway, I don&#8217;t keep my server up and running 24/7. So I want to know when I can switch it off (I.e.: when the transfers are really completed). Using the Storage Acceleration, the SSD used as Landing Zone would never be flushed in my case&#8230; I indeed only turn the server on when I want to backup huge amount of data&#8230;</li>
</ul>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>S.M.A.R.T</strong></span></p>
<ul>
<li>For each disks on a LSI SAS controller, I have to set an &#8220;Advanced Mapping&#8221;
<ul>
<li>Device Path Mapping: /dev/pdx where x is the disk id</li>
<li>DeviceType Mapping: sat</li>
</ul>
</li>
<li>For each disks, I also enable SMART Monitoring (every 4 hours) except when disks are in standby.</li>
</ul>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>Notes</strong></span></p>
<ul style="text-align: justify">
<li><strong>Write performances</strong> are a lot impacted by the performances of the PPU. The best disks should be used as PPU instead of DRU.</li>
<li>To increase <strong>Read Performances</strong>, the File Management Strategy has better be ROUN_ROBIN as it enables I/O parallelism.</li>
<li>Never <strong>Defrag</strong> or <strong>Chkdsk</strong> the &#8220;Pool Drive&#8221; or &#8220;Source (physical) Drives&#8221;. Defrag instead the &#8220;NZFS (Virtual) Drives&#8221;. That being said:
<ul>
<li>I really try to avoid doing a Defrag as so-far, I am not yet 100% convinced that, on my system, it does not results &#8220;blocks out of sync&#8221; (I.e.: requires a Verify&amp;Sync). For that reason, I have disabled the automatic-daily-defrag; E.g.: Turn off the Windows Disk Defragmenter Schedule (See <a title="Disable Automatic Disk Optimization" href="http://wiki.flexraid.com/2013/06/17/excluding-your-traid-disks-ssd-from-windows-automatic-maintenance/#comment-994" target="_blank" rel="noopener noreferrer">FlexRaid&#8217;s Wiki</a>) or uncheck the automatic optimization on concerned drives in O&amp;O Defrag. Pay attention that new NZFS disk appearing when the array start can be taken automatically into account by the defrag tool.</li>
<li>Defrag, if done, should never be executed on several disk simultaneously (See <a title="Don't Defrag several Drives Simultaneously" href="http://wiki.flexraid.com/2013/06/17/excluding-your-traid-disks-ssd-from-windows-automatic-maintenance/#comment-994" target="_blank" rel="noopener noreferrer">FlexRaid&#8217;s wiki</a>).</li>
<li>If you do a Defrag, you better stop the Pool or at least imperatively disable &#8220;Storage Pool Caching&#8221;.</li>
<li>I didn&#8217;t succeed to do a Chkdsk on the &#8220;NZFS Drives&#8221; and had to bring the &#8220;Source Drives&#8221; online to repair them&#8230; Once repaired, a Verify&amp;Sync is mandatory! (NB.: One thing to try is dis-engaging driver protection mode. asit blocks certain low level operations. Unfortunately, it&#8217;s not recommended to run disk tools on the transparent disks with driver protection dis-engaged).</li>
</ul>
</li>
<li><strong>When a Verify task fails</strong>, it provides the exact first and last byte failure as well as the amount of 4KB blocks. One can then start an &#8220;Range Specific Operation&#8221; to Verify&amp;Sync the specified zone.
<ul>
<li>Notice that first/last position of failure is in <strong>B</strong>ytes while the &#8220;Range Specific Operation&#8221; can be in KB, MB, etc&#8230; 1KB = 1024B).</li>
<li>Notice also that the Verify&amp;Sync updates complete blocks (4KB) and will therefore possible report different addresses (first byte of the updated block) than the Verify Task!</li>
</ul>
</li>
</ul>
<p style="text-align: justify"></div>
<div class="pvc_clear"></div>
<p id="pvc_stats_1833" class="pvc_stats total_only  " data-element-id="1833" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/replacing-raid-f-by-t-raid/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>FlexRaid: powershell script to set disks online/offline</title>
		<link>https://www.BeatificaBytes.be/flexraid-powershell-script-to-set-disks-onlineoffline/</link>
					<comments>https://www.BeatificaBytes.be/flexraid-powershell-script-to-set-disks-onlineoffline/#comments</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Thu, 07 Aug 2014 19:20:58 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[FlexRaid]]></category>
		<guid isPermaLink="false">/wordpress/?p=1792</guid>

					<description><![CDATA[FlexRaid&#8216;s products (Raid-F and tRaid) are setting offline all disks used as DRU or PPU to prevent direct access and mistakes. Access are made through [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify"><a title="FlexRaid" href="http://www.flexraid.com/" target="_blank" rel="noopener">FlexRaid</a>&#8216;s products (Raid-F and tRaid) are setting offline all disks used as DRU or PPU to prevent direct access and mistakes. Access are made through virtual disks created by FlexRaid. But if you have many disks and sometimes needs to access your physical disks, you will like this script to reset online all those disks&#8230;</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b2d86279562"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b2d86279562'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b2d86279562" class="collapseomatic_content ">
<p style="text-align: justify">Create a file to store this powershell script (ex.: ManageDisks.ps1) :</p>
[code language=&#8221;shell&#8221;]
<p>Clear-Host<br />
$action = Read-Host &#8216;Type &quot;Off&quot; to set disks offline or &quot;On&quot; to set them online&#8217;<br />
Clear-Host<br />
if ($action.ToLower() -eq &#8216;off&#8217;)<br />
{<br />
 echo &#8216;Please Wait&#8230;&#8217;<br />
 $lines = Get-Content C:\OffLineDisks.txt<br />
 foreach ($line in $lines) {<br />
 if ($line.Trim())<br />
 {<br />
 $fields = $line -split &#8216; : &#8216;<br />
 $disk = $fields[1]
 $command = &#8216;&quot;select disk &#8216; + $disk + &#8216;&quot;, &quot;offline disk&quot; | diskpart&#8217;<br />
 echo $command<br />
 invoke-expression $command<br />
 }<br />
 }<br />
}<br />
elseif ($action.ToLower() -eq &#8216;on&#8217;) {<br />
 echo &#8216;Please Wait&#8230;&#8217;<br />
 Get-Disk | ? isoffline | Format-List Number &gt; C:\OffLineDisks.txt<br />
 $lines = Get-Content C:\OffLineDisks.txt<br />
 foreach ($line in $lines) {<br />
 if ($line.Trim()) {<br />
 $fields = $line -split &#8216; : &#8216;<br />
 $disk = $fields[1]
 $command = &#8216;&quot;select disk &#8216; + $disk + &#8216;&quot;, &quot;online disk&quot;, &quot;detail disk&quot; | diskpart | Where-Object {$_ -match &quot;.*Volume.*Partition&quot; } 2&gt;&amp;1&#8217;<br />
 echo $command<br />
 $output = invoke-expression $command<br />
 if ($output -eq $null) {<br />
 echo &quot;No Volume on disk $disk&quot;<br />
 } else {<br />
 $fields = $output.TrimStart(&quot; Volume&quot;) -split &#8216; &#8216;<br />
 $volume = $fields[0]
 $command = &#8216;&quot;select volume &#8216; + $volume + &#8216;&quot;, &quot;assign&quot; | diskpart&#8217;<br />
 echo $command<br />
 invoke-expression $command<br />
 }<br />
 }<br />
 }<br />
}<br />
else<br />
{<br />
 $message = $action + &#8216; is not a supported action&#8217;<br />
 echo $message<br />
}</p>
[/code]
<p style="text-align: justify">Usage: run this script &#8220;As Administrator&#8221; and</p>
<p style="text-align: justify">Type  &#8216;On&#8217; to set online all disks currently offline. This will:</p>
<ol style="text-align: justify">
<li>Create a file OffLineDisks.txt on the C:\ drive with the ID of the disks currently offline. I presume that all disk offline are used by FlexRaid!</li>
<li>Bring online each of those disks.</li>
<li>Assign a letter to the volumes on those disks. I presume that there is only one volume per DRU and none on the PPU.</li>
</ol>
<p style="text-align: justify">Type &#8216;Off&#8217; to set offline the disks listed in the file OffLineDisks.txt created previously.</p>
<p style="text-align: justify"></div>
<p style="text-align: justify">My purpose was to scan and repair various physical disks as this was not working when trying to do so via the NZFS Virtual Drives&#8230;</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b2d862795fa"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b2d862795fa'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b2d862795fa" class="collapseomatic_content ">
<p style="text-align: justify">Doing a Chkdsk on the NZFS Virtual Drive, I got:</p>
<div class="callout">
<p style="text-align: justify">Chkdsk was executed in read/write mode.</p>
<p>Checking file system on #:<br />
Volume label is #.</p>
<p>Stage 1: Examining basic file system structure &#8230;</p>
<p># file records processed. File verification completed.</p>
<p style="text-align: justify">  # large file records processed.</p>
<p style="text-align: justify">  # bad file records processed.</p>
<p style="text-align: justify">Stage 2: Examining file name linkage &#8230;<br />
The data written out is different from what is being read back<br />
at offset 0x# for 0x# bytes.<br />
An unspecified error occurred (696e647863686b2e 1324).</p>
</div>
<p style="text-align: justify">So, instead, I do it on Physical Drives once set back online. And instead of Chkdks, I am using the powershell command &#8220;Repair-Volume&#8221;. E.g.: on a disk assigned with letter X:</p>
<div class="callout">
<p>PS C:\&gt; Repair-Volume X -Scan<br />
ScanErrorsFoundNeedSpotFix</p>
<p>PS C:\&gt; Repair-Volume X<br />
ErrorsFixed</p>
<p>PS C:\&gt; Repair-Volume X -Scan<br />
NoErrorsFound</p>
</div>
<p style="text-align: justify"></div>
<div class="pvc_clear"></div>
<p id="pvc_stats_1792" class="pvc_stats total_only  " data-element-id="1792" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/flexraid-powershell-script-to-set-disks-onlineoffline/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Status of FlexRAID Jobs currently running</title>
		<link>https://www.BeatificaBytes.be/status-of-flexraid-jobs-currently-running/</link>
					<comments>https://www.BeatificaBytes.be/status-of-flexraid-jobs-currently-running/#respond</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Mon, 18 Feb 2013 10:36:12 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[FlexRaid]]></category>
		<guid isPermaLink="false">/wordpress/?p=994</guid>

					<description><![CDATA[While you manually trigger a FlexRAID job using the client FlexRAIDcmd.exe or when a FlexRAID Scheduled Job is started, its status is not displayed automatically in [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">While you manually trigger a FlexRAID job using the client FlexRAIDcmd.exe or when a FlexRAID Scheduled Job is started, its status is not displayed automatically in the Web UI currently opened.</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b2d8627ae09"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b2d8627ae09'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b2d8627ae09" class="collapseomatic_content ">
<p style="text-align: justify">The Web UI needs to be reloaded in the Browser (<span class="keyboard">Ctrl</span> + <span class="keyboard">F5</span>). Doing so,</p>
<ul style="text-align: justify">
<li>A status windows should now be displayed for the current process and</li>
<li>The job should also now appear in the &#8220;Command Execution Center&#8221; (FlexRAID UI &gt; Your Configuration &gt; Tool Box).
<ul>
<li>In that &#8220;Command Execution Center&#8221;, the &#8220;Pause&#8221;, &#8220;Resume&#8221; and &#8220;Abort&#8221; buttons should now be accessible.</li>
</ul>
</li>
</ul>
<div style="text-align: justify">To get the status of the current job, using the FlexRAID client (FlexRAIDcmd.exe), type in a command prompt: [ps]FlexRAIDcmd.exe localhost &#8211; &#8211; status[/ps]
</div>
<div style="text-align: justify"></div>
<p style="text-align: justify"></div>
<div class="pvc_clear"></div>
<p id="pvc_stats_994" class="pvc_stats total_only  " data-element-id="994" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/status-of-flexraid-jobs-currently-running/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Use FlexRAIDCmd within PowerShell scripts to gracefully stop FlexRAID</title>
		<link>https://www.BeatificaBytes.be/use-flexraidcmd-within-powershell-scripts-to-gracefully-stop-flexraid/</link>
					<comments>https://www.BeatificaBytes.be/use-flexraidcmd-within-powershell-scripts-to-gracefully-stop-flexraid/#comments</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Sun, 17 Feb 2013 16:04:45 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[FlexRaid]]></category>
		<guid isPermaLink="false">/wordpress/?p=980</guid>

					<description><![CDATA[When using FlexRAID in Real-Time mode, the Pool must be stopped before stopping the service, i.e., also before shutting down the server. The best approach [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify">When using FlexRAID in Real-Time mode, the Pool <span style="text-decoration: underline"><strong>must be stopped</strong></span> before stopping the service, i.e., also before shutting down the server. The best approach is to define a <strong>Shutdown Task</strong> in Windows to manage this&#8230;</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b2d8627d2e2"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b2d8627d2e2'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b2d8627d2e2" class="collapseomatic_content ">
<p style="text-align: justify">The Shutdown Task will run a Powershell Script using the FlexRaidClient to query the state of FlexRAID and trigger actions&#8230;</p>
<p style="text-align: justify">The FlexRaidClient for windows, named FlexRaidCmd.exe, is not installed by default with the service. It must be downloaded as an Option <a href="http://www.flexraid.com/download/#download" target="_blank" rel="noopener">here</a>.</p>
<p>The syntax is: <strong>FlexRAIDClient</strong> <em>Host Port Timeout Command</em></p>
<p>Once installed, one can use the Command &#8220;view&#8221; in a cmd prompt <strong>RUN AS Administrator</strong> on the server to <a href="http://wiki.flexraid.com/2011/10/16/command-view/" target="_blank" rel="noopener">Start/Stop the pool</a>:</p>
<pre>FlexRAIDCMD localhost - - view class1_0 start
FlexRAIDCMD localhost - - view class1_0 stop</pre>
<p style="text-align: justify">The &#8211; &#8211;  are used as &#8220;default values&#8221; for the Port and Timeout parameters<br />
<strong>class1_0</strong> must be used for the new driver (=&gt; class1) and to access the first pool (=&gt; ID = 0).</p>
<p>Starting the pool takes about ~50 seconds.<br />
Stopping the pool takes less than 10 seconds.</p>
<p>If the command fails due to a syntax error, the error message can be found in the file log.log<br />
If the command succeed, there is nothing logged at all in the log file but a message displayed in the console (cmd prompt)</p>
<div style="text-align: justify">
<div>Quote</div>
</div>
<blockquote><p>{&#8220;success&#8221;: true, &#8220;status&#8221;: null, &#8220;commandMessages&#8221;: [{&#8220;messageCode&#8221;: &#8220;successStoragePoolStarted&#8221;, &#8220;messageData&#8221;: [&#8220;V&#8221;]}], &#8220;serverMessages&#8221;: null}<br />
=&gt; Le pool de stockage est bien démarré pour le volume: V:&#8230;</p></blockquote>
<div style="text-align: justify"></div>
<p>Notice: In a normal cmd prompt (not run as admin), the command returns an error due to an access denied on the log file:</p>
<div style="text-align: justify">
<div>Quote</div>
</div>
<blockquote><p>log4j:ERROR setFile(null,true) call failed.<br />
java.io.FileNotFoundException: log.log</p></blockquote>
<div style="text-align: justify"></div>
<p>Notice: if the Web UI was open before executing a Start/Stop, it must be reopened (or refreshed: CTRL-F5) otherwise it does not display the new state of the pool.</p>
<p>Regarding the log.log file, this one has better be located in a fix location. Edit the file log4j.properties and set a path like:</p>
<p>log4j.appender.default.File=C:<span style="color: #ff0000"><strong>/</strong></span>FlexRaid<span style="color: #ff0000"><strong>/</strong></span>FlexRAIDCmd.log</p>
<p>Pay attention to the path separator! It&#8217;s not the one used by Windows but the one used in Java!</p>
<p>To shutdown the FlexRaid server after stopping the pool, use the command <a href="http://wiki.flexraid.com/2011/10/10/command-shutdown-server/" target="_blank" rel="noopener">shutdown-server</a>.</p>
<pre>FlexRaid localhost - - shutdown-server</pre>
<p>If the pool is still running, we get the following response:</p>
<div style="text-align: justify">
<div>Quote</div>
</div>
<blockquote><p>{&#8220;success&#8221;: false, &#8220;status&#8221;: null, &#8220;commandMessages&#8221;: [{&#8220;messageCode&#8221;: &#8220;errorShutdownNotAllowedStoragePoolServiceRunning&#8221;, &#8220;messageData&#8221;: []}], serverMessages&#8221;: null}<br />
=&gt; Pour pouvoir arrêter le service &#8220;host&#8221;, le service de pool de stockage doit être arrêté!</p></blockquote>
<p>If the service stops successfully, we get :</p>
<div style="text-align: justify">
<div>Quote</div>
</div>
<blockquote><p>{&#8220;success&#8221;: true, &#8220;status&#8221;: null, &#8220;commandMessages&#8221;: [{&#8220;messageCode&#8221;: &#8220;successServerShutingDown&#8221;, &#8220;messageData&#8221;: []}], &#8220;serverMessages&#8221;: null}<br />
=&gt; Arrêt du serveur en cours&#8230;</p></blockquote>
<div style="text-align: justify"></div>
<p>To restart the service, we can use:</p>
<div style="text-align: justify">
<pre>net start "FlexRaid"</pre>
<p>Notice: I didn&#8217;t find yet on the forum the difference between &#8216;FlexRaid localhost &#8211; &#8211; shutdown-server&#8217; and &#8216;net stop &#8220;FlexRaid&#8217;. To my knowledge &#8216;net stop&#8217; is <strong>synchronous</strong> and therefore maybe preferred to stop the service properly before shutting down ?! (FlexRaid message seems to indicate it&#8217;s asynchronous)</p>
</div>
<p>Notice: If I run &#8220;FlexRaid localhost &#8212; shutdown-server&#8221; while the service is not running, I get obviously an exception &#8220;Connection refused: connect : ConnectException&#8221; but also this message in the log file (log.log):</p>
<div style="text-align: justify">
<div>Quote</div>
</div>
<blockquote><p>ERROR: Unexpected character (&#8216;A&#8217; (code 65)): expected a valid value (number, String, array, object, &#8216;true&#8217;, &#8216;false&#8217; or &#8216;null&#8217;)<br />
at [Source: java.io.StringReader@2f3d698; line: 1, column: 2]
org.codehaus.jackson.JsonParseException: Unexpected character (&#8216;A&#8217; (code 65)): expected a valid value (number, String, array, object, &#8216;true&#8217;, &#8216;false&#8217; or &#8216;null&#8217;)<br />
at [Source: java.io.StringReader@2f3d698; line: 1, column: 2]</blockquote>
<div style="text-align: justify"></div>
<p>Now, here is how to create a &#8220;shutdown task&#8221; in the Local Group Policies of a Windows Server 2012:</p>
<p>1) Enable script execution on the server<br />
a) On the Start Screen right-click the Windows PowerShell tile and run it As Administrator<br />
b) execute &#8220;Set-ExecutionPolicy RemoteSigned&#8221; in that shell and answer &#8220;Y&#8221;</p>
<p>2) Create the script<br />
a) Create a file &#8220;StopFlexRaid.ps1&#8221; in your &#8220;FlexRaid Client&#8221; folder (e.g.).<br />
b) Type the script found bellow in the file (change the path to FlexRaidCmd)</p>
<p>3) Use the script as Shutdown Script<br />
a) On the Start Screen, type &#8220;gpedit.msc&#8221; and run it.<br />
b) Go to the node &#8220;Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)&#8221;.<br />
c)  Edit &#8220;Shutdown&#8221; and in the tab &#8220;PowerShell script&#8221;, &#8220;Add&#8221; StopFlexRaid.ps1</p>
<p>Notice:<br />
&#8211; Shutdown scripts are run as Local System, and they have the full rights that are associated with being able to run as Local System.<br />
&#8211; Shutdown scripts are run synchronously. The Server should wait on the script before shutting down.</p>
<p>Here is the StopFlexRaid script:</p>
[ps]
<p>$srvName = &quot;FlexRAID&quot;<br />
$flexCmd = &quot;C:\Program Files (x86)\FlexRAID 2.0 Client\FlexRAIDCMD.exe&quot;<br />
$servicePrior = Get-Service $srvName<br />
#&quot;$srvName is currently &quot; + $servicePrior.status</p>
<p>function ExitWithCode<br />
{<br />
 param<br />
 (<br />
 $exitcode<br />
 )<br />
 &quot;Exit with code $exitcode&quot;<br />
 #$host.SetShouldExit($exitcode)<br />
 #exit<br />
}</p>
<p>$flexCmd = &quot;C:\Program Files (x86)\FlexRAID 2.0 Client\FlexRAIDCMD.exe&quot;</p>
<p>function ExecuteFRCmd([string]$cmd, [string]$hostname=&quot;localhost&quot;, [string]$port=&quot;-&quot;, [string]$timeout=&quot;-&quot;)<br />
{<br />
 $error.clear()</p>
<p>$pinfo = New-Object System.Diagnostics.ProcessStartInfo<br />
 $pinfo.FileName = $flexCmd<br />
 $pinfo.RedirectStandardError = $true<br />
 $pinfo.RedirectStandardOutput = $true<br />
 $pinfo.UseShellExecute = $false<br />
 $pinfo.Arguments = &quot;$hostname $port $timeout $cmd&quot;<br />
 $p = New-Object System.Diagnostics.Process<br />
 $p.StartInfo = $pinfo<br />
 $p.Start() | Out-Null<br />
 $p.WaitForExit()<br />
 $output = $p.StandardOutput.ReadToEnd()</p>
<p> if ( $error.count -eq 0)<br />
 {<br />
 # Clean the JSON message (remove the trailing text (=&gt; blabla))<br />
 $output = $output -replace &#8216;(?&lt;First&gt;.*)=&gt;.+&#8217;, &#8216;${First}&#8217;<br />
 }<br />
 else<br />
 {<br />
 $output = $null<br />
 }</p>
<p> return $output<br />
}</p>
<p>function IsAnyTaskRunning()<br />
{<br />
 $running = $FALSE</p>
<p> $state = ExecuteFRCmd(&quot;status&quot;)</p>
<p>if ($state -eq $null)<br />
 {<br />
 throw &quot;Command failed to execute&quot;<br />
 }<br />
 else<br />
 {<br />
 #Write-Host &quot;States: $state&quot;</p>
<p>$process = $state | ConvertFrom-Json</p>
<p> $message = $process.commandMessages.messageCode<br />
 if ($message -eq &quot;successNoProcessSinceServerStartup&quot;)<br />
 {<br />
 #Write-Host &quot;No Process started since Server startup&quot;<br />
 }<br />
 else<br />
 {<br />
 $processID = $process.status.referenceCode</p>
<p>do {<br />
 $state = ExecuteFRCmd(&quot;status &quot;+$processID)<br />
 $process = $state | ConvertFrom-Json</p>
<p>switch ($process.status.status)<br />
 {<br />
 { @(&quot;STATUS_STARTED&quot;, &quot;STATUS_PROCESSING&quot;, &quot;STATUS_PAUSING&quot;, &quot;STATUS_RESUMED&quot;, &quot;STATUS_RESUMING&quot;) -contains $_ }<br />
 {<br />
 #Write-Host task $processID &#8211; $process.status.task &#8211; is running<br />
 $running = $TRUE<br />
 }<br />
 { @(&quot;STATUS_COMPLETED&quot;, &quot;STATUS_ABORTED&quot;, &quot;STATUS_ABORTING&quot;, &quot;STATUS_PAUSED&quot;) -contains $_ }<br />
 {<br />
 #Write-Host task $processID &#8211; $process.status.task &#8211; is not running<br />
 }<br />
 }</p>
<p> $processID -=1<br />
 } while (($processID -gt 0) -and ($running -eq $FALSE))<br />
 }<br />
 }</p>
<p> return $running<br />
}</p>
<p>Write-Eventlog -Logname &#8216;Application&#8217; -source &#8216;FlexRAID&#8217; -eventID 1 -EntryType Warning -Category 0 -message &quot;Graceful FlexRAID Shutdown triggered&quot;</p>
<p>$wid = [System.Security.Principal.WindowsIdentity]::GetCurrent()<br />
$prp = new-object System.Security.Principal.WindowsPrincipal($wid)<br />
$adm = [System.Security.Principal.WindowsBuiltInRole]::Administrator<br />
$IsAdmin = $prp.IsInRole($adm)<br />
if (-not $IsAdmin) {<br />
 write-host &quot;Current powershell process is not running with Administrator privileges&quot;</p>
<p>$message = &quot;Graceful FlexRAID Shutdown not running with adhoc rights&#8230;&quot;<br />
 Write-Eventlog -Logname &#8216;Application&#8217; -source &#8216;FlexRAID&#8217; -eventID 1 -EntryType Error -Category 0 -message $message<br />
 cmd /c shutdown -a<br />
 ExitWithCode -exitcode 2<br />
}<br />
elseif ($servicePrior.status -eq &quot;Stopped&quot;)<br />
{<br />
 &quot;$srvName is already &quot; + $servicePrior.status<br />
}<br />
elseif ($servicePrior.status -ne &quot;Running&quot;)<br />
{<br />
 &quot;$srvName is not Running but &quot; + $servicePrior.status<br />
}<br />
else<br />
{<br />
 $running = IsAnyTaskRunning<br />
 if ($running -eq $TRUE)<br />
 {<br />
 $message = &quot;FlexRAID process(es) still running and preventing Server to shutdown&#8230;&quot;<br />
 $message<br />
 Write-Eventlog -Logname &#8216;Application&#8217; -source &#8216;FlexRAID&#8217; -eventID 1 -EntryType Error -Category 0 -message $message<br />
 cmd /c shutdown -a<br />
 ExitWithCode -exitcode 2<br />
 }<br />
 else<br />
 {<br />
 &quot;Wait on the Storage Pool to stop. This can take a few seconds.&quot;</p>
<p> $state = ExecuteFRCmd(&quot;view class1_0 stop&quot;)</p>
<p> $state<br />
 $abort = &quot;False&quot;</p>
<p> if ( $state -eq $null)<br />
 {<br />
 &quot;Storage Pool failed to stop&quot;<br />
 $error[0]
 $message = &quot;FlexRaid Storage Pool failed to stop and is preventing Server to shutdown: &quot; + $error[0]
 $message<br />
 Write-Eventlog -Logname &#8216;Application&#8217; -source &#8216;FlexRAID&#8217; -eventID 1 -EntryType Error -Category 0 -message $message<br />
 cmd /c shutdown -a<br />
 ExitWithCode -exitcode 2<br />
 }<br />
 else<br />
 {<br />
 $process = $state | ConvertFrom-Json</p>
<p> $message = $process.commandMessages.messageCode<br />
 if ($message -eq &quot;successStoragePoolStopped&quot;)<br />
 {<br />
 &quot;Storage Pool successfuly stopped&quot;<br />
 Write-Eventlog -Logname &#8216;Application&#8217; -source &#8216;FlexRAID&#8217; -eventID 1 -EntryType Warning -Category 0 -message &quot;Storage Pool stopped before shutting down&quot;<br />
 }<br />
 else<br />
 {<br />
 if ($message -eq &quot;errorNoActiveStoratePool&quot;)<br />
 {<br />
 &quot;Storage Pool actually not started&quot;<br />
 }<br />
 else<br />
 {<br />
 $abort = &quot;True&quot;<br />
 $event = &quot;FlexRaid Storage Pool failed to stop, preventing Server to shutdown: &quot; + $state<br />
 $event<br />
 Write-Eventlog -Logname &#8216;Application&#8217; -source &#8216;FlexRAID&#8217; -eventID 1 -EntryType Error -Category 0 -message $event<br />
 cmd /c shutdown -a<br />
 ExitWithCode -exitcode 3<br />
 }<br />
 }</p>
<p> if ($abort -eq &quot;False&quot;)<br />
 {<br />
 $error.clear()<br />
 Stop-Service $srvName<br />
 if ( $error.count -eq 0)<br />
 {<br />
 Write-Host -NoNewLine &quot;Waiting on $srvName to stop &quot;<br />
 $timeout = new-timespan -Minutes 1<br />
 $sw = [diagnostics.stopwatch]::StartNew()<br />
 while (((Get-Service $srvName).status -ne &quot;Stopped&quot;) -and ($sw.elapsed -lt $timeout))<br />
 {<br />
 Write-Host -NoNewLine &quot;.&quot;<br />
 sleep 1<br />
 }<br />
 &quot;.&quot;<br />
 }</p>
<p> $serviceAfter = Get-Service $srvName<br />
 if ($serviceAfter.status -eq &quot;Stopped&quot;)<br />
 {<br />
 &quot;$srvName is now &quot; + $serviceAfter.status<br />
 ExitWithCode -exitcode 0<br />
 }<br />
 else<br />
 {<br />
 &quot;$srvName failed to stop. It is now &quot; + $serviceAfter.status<br />
 ExitWithCode -exitcode 1<br />
 }<br />
 }<br />
 }<br />
 }<br />
}[/ps]
<p>Here is the code to start FlexRaid, useful while testing.</p>
[ps]
<p>$srvName = &quot;FlexRAID&quot;<br />
$flexCmd = &quot;C:\Program Files (x86)\FlexRAID 2.0 Client\FlexRAIDCMD.exe&quot;<br />
$servicePrior = Get-Service $srvName<br />
#&quot;$srvName is currently &quot; + $servicePrior.status</p>
<p>function ExitWithCode<br />
{<br />
 param<br />
 (<br />
 $exitcode<br />
 )<br />
 &quot;Exit with code $exitcode&quot;<br />
 #$host.SetShouldExit($exitcode)<br />
 #exit<br />
}</p>
<p>if ( ($servicePrior.status -ne &quot;Stopped&quot;) -and ($servicePrior.status -ne &quot;Running&quot;))<br />
{<br />
 &quot;$srvName is not Stopped but &quot; + $servicePrior.status<br />
}<br />
else<br />
{<br />
 if ($servicePrior.status -eq &quot;Running&quot;)<br />
 {<br />
 &quot;$srvName is already &quot; + $servicePrior.status<br />
 }<br />
 else<br />
 {<br />
 Start-Service $srvName</p>
<p> Write-Host -NoNewLine &quot;Waiting on $srvName to start &quot;<br />
 $timeout = new-timespan -Minutes 1<br />
 $sw = [diagnostics.stopwatch]::StartNew()<br />
 while (((Get-Service $srvName).status -ne &quot;Running&quot;) -and ($sw.elapsed -lt $timeout))<br />
 {<br />
 Write-Host -NoNewLine &quot;.&quot;<br />
 sleep 1<br />
 }<br />
 &quot;.&quot;<br />
 }</p>
<p> $serviceAfter = Get-Service $srvName<br />
 if ($serviceAfter.status -eq &quot;Running&quot;)<br />
 {<br />
 &quot;$srvName is now &quot; + $serviceAfter.status</p>
<p> $error.clear()<br />
 &quot;Wait on the Storage Pool to start. This can take a while.&quot;<br />
 $stopPool = Start-Process $flexCmd -ArgumentList &quot;localhost &#8211; &#8211; view class1_0 start&quot; -NoNewWindow -Wait -PassThru</p>
<p> if ( $error.count -eq 0)<br />
 {<br />
 ExitWithCode -exitcode 0<br />
 }<br />
 else<br />
 {<br />
 &quot;Storage Pool failed to start&quot;<br />
 $error[0]
 ExitWithCode -exitcode 2<br />
 }<br />
 }<br />
 else<br />
 {<br />
 &quot;$srvName failed to start. It is now &quot; + $serviceAfter.status<br />
 ExitWithCode -exitcode 1<br />
 }<br />
}</p>
[/ps]
<p style="text-align: justify"></div>
<div class="pvc_clear"></div>
<p id="pvc_stats_980" class="pvc_stats total_only  " data-element-id="980" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/use-flexraidcmd-within-powershell-scripts-to-gracefully-stop-flexraid/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>FlexRaid on Server 2012 instead of Space Storage</title>
		<link>https://www.BeatificaBytes.be/flexraid-on-server-2012-instead-of-space-storage/</link>
					<comments>https://www.BeatificaBytes.be/flexraid-on-server-2012-instead-of-space-storage/#comments</comments>
		
		<dc:creator><![CDATA[vletroye]]></dc:creator>
		<pubDate>Thu, 24 Jan 2013 22:11:31 +0000</pubDate>
				<category><![CDATA[Softwares]]></category>
		<category><![CDATA[FlexRaid]]></category>
		<category><![CDATA[Home Server]]></category>
		<category><![CDATA[Windows Server 2012]]></category>
		<guid isPermaLink="false">/wordpress/?p=934</guid>

					<description><![CDATA[In the past, I have been using the onboard RAID controller of my Home Server&#8217;s motherboard to secured its data, a RAID 5 with 6 [&#8230;]]]></description>
										<content:encoded><![CDATA[<figure id="attachment_940" aria-describedby="caption-attachment-940" style="width: 300px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2013/01/FlexRaid.png"><img loading="lazy" decoding="async" class="size-medium wp-image-940" src="https://www.beatificabytes.be/wp-content/uploads/2013/01/FlexRaid-300x179.png" alt="FlexRaid" width="300" height="179" /></a><figcaption id="caption-attachment-940" class="wp-caption-text">FlexRaid &#8211; Software Raid and Storage Pool</figcaption></figure>
<p style="text-align: justify">In the past, I have been using the onboard RAID controller of my Home Server&#8217;s motherboard to secured its data, a RAID 5 with 6 HDD to be more precise. But I was in a urgent need for a new solution.</p>
<p style="text-align: justify"><span class="collapseomatic " id="id69b2d86281610"  tabindex="0" title="Click to Read More"    >Click to Read More</span><span id='swap-id69b2d86281610'  class='colomat-swap' style='display:none;'>Click to Close</span><div id="target-id69b2d86281610" class="collapseomatic_content ">
<p style="text-align: justify">Indeed, I had several concerns:</p>
<ul style="text-align: justify">
<li>If the motherboard would die, data would not be accessible anymore except with a replacement motherboard with same amount of identical RAID controllers</li>
<li>if I would be out of space, new disks could not be added to easily in the existing RAID array (mainly due to lack of space in the case). Also replacing existing disks with larger ones would be quite dangerous as duplicating the whole array before such a risky upgrade was not possible (lack of backup storage).</li>
<li>After a power failure or a BSOD, the RAID was checked (for about 12 hours), making all read access veryyyy sloooooooow.</li>
</ul>
<div style="text-align: justify">So, I have decided to &#8220;upgrade&#8221; my Home Server with</div>
<div style="text-align: justify">
<ul>
<li>A server case able to enclose up to 24 HDD (with adequate controller cards)</li>
<li>A software RAID solution to not rely on hardware anymore</li>
<li>A software Pooling solution to be able to expand <span style="color: #333333;font-style: normal;line-height: 24px">seamlessly</span>the storage space</li>
</ul>
</div>
<div style="text-align: justify"><strong>For the Home Server Hardware</strong> part, including the case, see <a title="Home Server Hardware" href="https://www.beatificabytes.be/zeus-is-dead-long-life-zeus/" target="_blank" rel="noopener noreferrer">here</a>.</div>
<p style="text-align: justify"><strong>For the Software part</strong>, I wanted to go with a Server 2012 Essentials because I really like</p>
<ul style="text-align: justify">
<li>Its centralized PC-image backup feature and</li>
<li>Its centralized File History backup functionality.</li>
<li>I don&#8217;t want to mix OS in my network</li>
</ul>
<p style="text-align: justify">Server 2012 also supports pools of disks with data redundancy, a feature named Space Storage. But it has a several (big or not) disadvantages IMO:</p>
<ul>
<li>Drives containing data may not be added into the pool <img src="https://s.w.org/images/core/emoji/15.1.0/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
<li><span style="text-align: justify">In addition, if the server dies, a disk moved into another PC will be readable but not writable, except if this other PC is also running Space Storage and all disks are moves. That could be an issue if the dead server cannot be quickly replaced.</span></li>
</ul>
<p style="text-align: justify">So&#8230; What else ? I started to look for solutions to manage pools of disks or to manage RAID, or &#8211; better &#8211; to do both: Greyhole, SoftRaid, mhddfs, UnRAID, FlexRAID, mdadm, SnapRaid, Amahi, FreeNAS, disParity, LVM, JBOD, MooseFS, GlusterFS, ZFS, Liquesce&#8230; And I finally decided to go with <strong>FlexRaid</strong> although it is not free (but not expensive either):</p>
<ul>
<li>It runs on Windows Server 2012 x64 (On the opposite, FreeNAS or Unraid for example are integrated with their own OS &#8211; linux based).</li>
<li>It has a nice Web UI (based on extJS like the DSM of my Synology) which make remote management easy and comfortable, although IMO there is still place for improvement.</li>
<li>It supports both RAID software and Pooling (There are separated licences if you don&#8217;t want both)</li>
<li>It has supports for either a RealTime protection or a Snapshot mode (I.e.: RAID is nightly updated on schedule &#8211; not slowing down read/write access during the day).</li>
<li>Disks containing data can be added in the Pool at any time.</li>
<li>Disks can be temporarily removed to be accessed from within another machine. If Snapshot mode is used, data may be modified before re-plugging the disk in FlexRaid. Notice: If data are modified, they will only be protected if the disk is re-plugged in FlexRaid and if a the RAID is updated.</li>
<li>Disks temporarily removed can be re-plugged anywhere in the machine. FlexRaid does not rely on the physical location but on the disk mount point which is &#8220;memorized&#8221; on the disk itself.</li>
<li>It does not store any recovery information on the disks containing data. This information is stored on dedicated disks</li>
<li>It supports multiple simultaneous disk failures (it implements several type of RAID) depending on how many disks are assigned to store the recovery information.</li>
<li>It comes with a Wizard &#8220;for dummies&#8221; to easily create a pool of disks with a few default settings. It also supports an expert mode with more flexibility &#8211; but also with more complexity;</li>
<li>Disks can be replaced with larger ones.</li>
<li>As far as the FlexRaid configuration is backuped, the OS can be re-installed from scratch; the recovery information won&#8217;t have to be recomputed and the data are safe.</li>
<li>In case of crash, RAID validation is fast (I still have to check the speed of a recovery)</li>
<li>It has support for S.M.A.R.T monitoring with email alerts (although configuring S.M.A.R.T is not integrated in a Wizard and can require some research).</li>
</ul>
<p style="text-align: justify">To be honest, IMHO, the version 2.0 of this product is not yet ready for all end-users. They will have to be comfortable themselves with server engineering to solve various possible issues. Also, it seems to me that only one technical guy from FlexRaid is answering questions and offering support on the official forum. He knows very well his product, but still&#8230;</p>
<p style="text-align: justify">On my own, I had a lot of issues while testing the product &#8211; mainly because I did a lot of operations like creating/deleting pools, adding/removing disks, sharing/un-sharing folders, stopping/starting the service, etc&#8230; But also because Murphy was at the party: after many various issues followed by a complete re-installation of the server, one disk used to store FlexRaid&#8217;s parity data started to die. If you intend to test it, I really recommend to do it in a VM with virtual drives that can be easily re-staged. FlexRaid has a Trial of 14 days.</p>
<p style="text-align: justify">Once the dead disk removed, FlexRaid started to run fine with the following &#8220;configuration&#8221; (as named in FlexRaid) &#8211; See <span style="text-decoration: underline">Attention Points</span> before create a new configuration:</p>
<ul style="text-align: justify">
<li>3 data <em>disks </em>(named DRU in FlexRaid terminology &#8211; they contains the data) compound each of 2 HDD (2TB + 3TB)
<ul>
<li>HDD used in DRU are not using a proprietary format but simply NTFS</li>
<li>HDD can be added in a DRU with existing data</li>
<li>HDD can be of any size, but DRU have better be of the same size.</li>
</ul>
</li>
<li>One parity <em>disk </em>(named a PPU in FlexRaid terminology &#8211; they contain the recovery information) compound of 2 HDD (2TB + 3TB).
<ul>
<li>PPU must be at least as large as the largest DRU
<ul>
<li>It has better be larger because in case of bad-sector on a HDD in the PPU, FlexRaid will be out-of-space and fail to update the parity data.</li>
</ul>
</li>
<li>It&#8217;s recommended to have one PPU per 3 DRU.</li>
</ul>
</li>
<li>PPU and DRU created with the wizard (Cruise Control) instead of the expert mode.
<ul>
<li>Merge Mode = &#8220;Auto-Folder-Priority&#8221;.
<ul>
<li>To optimize power consumption (most probably only one drive accessed when fetching data)</li>
<li>To keep data grouped if by any chance the disks must be moved into another PC during DRP.</li>
</ul>
</li>
<li>a Snapshot mode
<ul>
<li>To not slow down write operation</li>
<li>As anyway, data on the Home Server does not change often at all.</li>
</ul>
</li>
</ul>
</li>
<li>A login/password set in &#8220;System Control Toolbox&#8221; &gt; Login pane</li>
<li>Automatic start-up of FlexRaid storage pool 15&#8243; after the Server boot in &#8220;[<em>your configuration</em>] &gt; &#8220;Preferences and settings&#8221;</li>
<li>A Scheduled Task to <strong>Update</strong> the RAID (Parity Data) every day at 23:00.</li>
<li>A Scheduled Task to <strong>Validate</strong>the RAID (Parity Data) every week at .
<ul>
<li>The Validate task does both change detection along with datarot (silent data corruption) detection through data checksum valiation.</li>
</ul>
</li>
<li>A Scheduled Task to <strong>Verify</strong>the RAID (Parity Data) every month.
<ul>
<li>The Verify task does bit for bit verification of the RAID.</li>
</ul>
</li>
</ul>
<div style="text-align: justify">To be safe however, and based on the amount of disk I have, someone from FlexRaid told me I should either use two PPU of 3TB or possibly add one PPU of 5TB. Doing so, I will double the security level (the RAID could survive after 2 simultaneous disk failures) while only loosing ~6% of space (1TB). For sure, RAID updates will be slower as 2 PPU will have to be updated. But based on my experience, it&#8217;s really not that slower. It takes about 1 hour per TB of Data.</div>
<div style="text-align: justify"></div>
<div style="text-align: justify">Here is a benchmark of accessing data in FlexRaid&#8217;s pool configured with one 5TB PPU and 3x5TB DRU (And I got the same results for two 3TB PPU and 4x3TB DRU&#8230;) Clearly, FlexRaid with SnapShot mode does not really impact the performances&#8230; (Actually, one the Pool features has an impact).</div>
<div style="text-align: justify">
<figure id="attachment_938" aria-describedby="caption-attachment-938" style="width: 300px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2013/01/HddScan1.jpg"><img loading="lazy" decoding="async" class="size-medium wp-image-938" src="https://www.beatificabytes.be/wp-content/uploads/2013/01/HddScan1-300x272.jpg" alt="FlexRaid Snapshot Performance" width="300" height="272" /></a><figcaption id="caption-attachment-938" class="wp-caption-text">FlexRaid Snapshot Performance</figcaption></figure>
<p>Here is the same benchmark for accessing data in an equivalent Pool with the Real-Time mode..;</p>
<figure id="attachment_971" aria-describedby="caption-attachment-971" style="width: 300px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2013/01/FlexRaidRT.jpg"><img loading="lazy" decoding="async" class="aligncenter size-medium wp-image-971" src="https://www.beatificabytes.be/wp-content/uploads/2013/01/FlexRaidRT-300x273.jpg" alt="FlexRaid Real-Time  Performance" width="300" height="273" /></a><figcaption id="caption-attachment-971" class="wp-caption-text">FlexRaid Real-Time Performance</figcaption></figure>
</div>
<p style="text-align: justify;padding-left: 60px">Writing small files is not performing well in Real-Time but that&#8217;s due to the accesses to the FlexRaid Configuration Database (on C:\). If that drive is on a SSD, those performance should be quite improved (Support to store that DB on another disk is foreseen&#8230;)</p>
<p style="text-align: justify">For information: it took a little bit less that 13 hours to compute the parity for about 11TB of data in this 15TB pool.</p>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>ATTENTION POINTS</strong>:</span></p>
<p style="text-align: justify"><strong><span style="color: #ff0000">Before starting:</span></strong></p>
<ul style="text-align: justify">
<li>Drives used by FlexRaid may not be used as target for <strong>Paging</strong> or <strong>Shadow Copy</strong>.
<ul>
<li>However, Shadow Copy can be used as far as the volume used as target for the Storage Location is on a dedicated drive outside of the Pool.
<ul>
<li>Shadow Copy must be enabled:
<ol>
<li>On the Start Screen type Computer and run Computer Management</li>
<li>Right-Click Shard Folders &gt; All Tasks &gt; Configure Shadow Copies&#8230;</li>
<li>Enable for all sources drives (DRU) but not for the virtual drive (Pool)</li>
</ol>
</li>
<li>And the Storage Location must be configured on each disk
<ul>
<li>Via the Dsik Management node in the Computer Management:  Properties &gt; Shadow Copies Tab &gt; Settings button &gt; Storage Area (Click details) (to be completed).</li>
<li>Configured via command lines (to be completed)</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><strong>Recycle Bin may not be used </strong>on drives used by FlexRaid as well as in the virtual drive (pool)
<ul>
<li>Instead FlexRaid proprietary Recycle Bin can be enabled in the Snapshot mode only (there is no such support for Real-Time mode): Configuration &gt; Preferences and Settings &gt; Advanced Properties : Enable Recycle bin mode: true (and Save).</li>
<li>Also, make sure this registry folder exists or you could experience &#8220;Recycle Bin on V: is corrupted&#8221; errors
<ul>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\BitBucket (For 32 bit Windows)</li>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\BitBucket (For 64 bit Windows)</li>
</ul>
</li>
<li>And finally disable all the Recycle Bin on the drives intended to be managed by FlexRaid (as well as on the virtual drive)
<ol>
<li>Using Windows Explorer, navigate to each drive create a dummy file and then delete that dummy file. This will for sure create a Recycle Bin</li>
<li>After doing the above for each drive, empty the recycle bin</li>
<li>Right-click on the Windows recycle bin icon and choose properties</li>
<li>There disable recycle bin for each of your drives</li>
<li>Reboot</li>
</ol>
</li>
</ul>
</li>
</ul>
<div style="text-align: justify"><strong><span style="color: #ff0000">Also notice:</span></strong></div>
<div style="text-align: justify"></div>
<ul style="text-align: justify">
<li>FlexRaid web UI is not fully compatible with <strong>Chrome</strong>. Some expansible panes of this UI collapse and expand for ever one accessed.</li>
<li>The logs are full of security errors. It&#8217;s simply due to the Web Client UI session which expires&#8230; It&#8217;s not fatal.
<ul>
<li>To change the log level, edit the files in C:\Program Files (x86)\&lt;FlexRAID folder&gt;\logging.options.txt
<ul>
<li>FLEXRAID_LOG_LEVEL=TRACE</li>
<li>FLEXRAID_SYS_LOG_LEVEL=TRACE</li>
</ul>
</li>
<li>Also change the logs location as many files will be created in TRACE level
<ul>
<li>FLEXRAID_LOG_FILE_ROOT=C:\FlexRaidLogs\</li>
</ul>
</li>
</ul>
</li>
<li>The path of the log in Log4j.properties must be like C:<span style="color: #ff0000"><strong>/</strong></span>FlexRaidLogs<span style="color: #ff0000"><strong>/</strong></span></li>
<li>I always experience issues when trying to remove disks from PPU or DRU. The only solution I found is to delete the configuration and create a new one.</li>
<li>Once a disk is added in a PPU or DRU, it&#8217;s mounted by FlexRaid in a hidden folder under C:\FlexRAID-Managed-Pool\&#8230;
<ul>
<li>This folder is only accessible by the System account which is the account configured to run the FlexRaid Service.</li>
<li>After deleting a &#8220;configuration&#8221; or uninstalling Flexraid, this folder is still there.</li>
<li>To view it, you must
<ol>
<li>Start Explorer, click on the &#8220;View&#8221; menu and select &#8220;Options&#8221; (on the extreme right).</li>
<li>There, go to the &#8220;View&#8221; tab and tick &#8220;Show hidden files, folder and drives&#8221;</li>
<li>Uncheck &#8220;Hide protected operating system files (recommended).</li>
</ol>
</li>
<li>Once the folder is visible, you can change the Security and grant full access right to the &#8220;Administrators&#8221; group. Possibly use <a title="Take Ownership" href="http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/" target="_blank" rel="noopener noreferrer">this great tip</a> to also easily take back the ownership with a contextual menu (works only on files/folders. not on drives).</li>
</ul>
</li>
<li><strong>Hidden files</strong> are not protected as ignored by FlexRaid.</li>
<li>When deleting a &#8220;configuration&#8221;, disk that were assigned a letter before being added in a PPU or DRU will get back that letter. However, in my case, disks were mounted. After deletion of the &#8220;configuration&#8221;, they should have been re-mounted on their original folder (according to someone from FlexRaid). But this didn&#8217;t occur. I had to re-mount them myself one by one. I have not receive any valid explanation yet&#8230;</li>
<li>When managing Shares and Permissions via FlexRaid UI:
<ul>
<li>You must use username defined in the domain (on Server 2012 Essential, a domain is always installed by default &#8211; and mandatory for various services). However, you don&#8217;t have to prefix that username with the domain name (I.e.: &lt;domain&gt;\&lt;username&gt;)</li>
<li>Latest changes done via the UI appear sometimes to not be reflected immediately in the Windows Properties (In the &#8220;Advanced Sharing&#8221; tab of the folder). Ex.: If you delete permissions for a user. You must both
<ul>
<li>Close the folder Properties window if already open in Windows.</li>
<li>Navigate to the &#8220;Home&#8221; menu and back to &#8220;Server Shares&#8221; in FlexRaid UI.</li>
<li>Back to the folder Properties &gt; Advance Sharing, the changes should now be visible.</li>
</ul>
</li>
<li>Don&#8217;t forget that you need to use a domain user to access the shares from remote machine. If you try to access them from a PC not joined to the domain, you must provide a login like &#8220;&lt;domain&gt;\&lt;username&gt;&#8221;. Also remind that Server 2012 Essentials is missing &#8220;HomeGroup&#8221; support.</li>
</ul>
</li>
</ul>
<div style="text-align: justify"><strong><span style="color: #ff0000">Important remarks:</span></strong></div>
<div style="text-align: justify"></div>
<ul style="text-align: justify">
<li><span style="text-decoration: underline">When using a &#8220;Snapshot&#8221; mode</span>, data are in great danger as soon as files start to be modified and as long as the RAID is not updated. Indeed, as some data are modified, the information on the PPU may not be used anymore to restore files in the same range of address (?) in a DRU which would crash. Concretely, files restored using a not-up-to-date PPU will be corrupted.
<ul>
<li>I didn&#8217;t find any information that confirm (or not) that a disk is most likely to fail during write operations. But as I plan to often backup data on my server, I am afraid that I wouldn&#8217;t be able to restore my files after a crash occurring such an operation&#8230; So =&gt; I will investigate the RealTime mode which is still experimental</li>
</ul>
</li>
</ul>
<div style="text-align: justify"></div>
<ul style="text-align: justify">
<li><span style="text-decoration: underline">When using a RealTime Mode</span>
<ul>
<li>Only <strong>use softwares that preallocate files</strong> to copy data into the pool (e.g.: Windows Explorer but not TeraCopy!!!)</li>
<li>There must be <strong>at least 10GB of free space on each disk</strong> going to be added in the Pool (As DRU).</li>
<li>Check that the <strong>Reserve is at least 50GB</strong> or more in the Configuration &gt; Preferences and Settings &gt; Run-Time Properties &gt; General Properties: Reserve. This is the default when using the Cruise Control mode.</li>
<li><strong>After a server crash,</strong> a<strong> Reconcile</strong> is required (Similar to a Windows Disk Scan).</li>
<li><strong>Always stop the storage pool </strong>through the Web UI before restarting the FlexRAID service or your OS!!!
<ul>
<li>This can be solved using a Shutdown Task to be created in the Local Group Policies. See the script posted as comments.</li>
</ul>
</li>
<li><strong>Increase the WaitToKillServiceTimeout </strong>Registry key value to 300000 (it&#8217;s 5000 by default; i.e. Windows systems will kill the service in as little as 5 seconds which often does not leave FlexRAID with enough time to properly close up it resources).
<ul>
<li>HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Control</li>
</ul>
</li>
<li><strong>Never write directly to the &#8220;source&#8221; drives</strong> but only through the pool as Explorer writes silently data on the disks. It means that a drive may never be temporarily removed from the pool, accessed from within another PC (even for &#8220;READ&#8221; only operations) and re-plugged later in the pool.</li>
<li>There is <strong>no Recycle Bin</strong>, meaning that data are deleted permanently.
<ul>
<li>And unfortunately, Shadow Copies can NOT be used on the Pool&#8230; So it cannot be used either to restore deleted files.</li>
<li>Actually Recycle Bin must be disable on all disks participating in the pool as well as on the pool itself. And that must be done for all accounts connected on the server.</li>
<li>As a replacement, the <a title="Undeluxe" href="http://www.resplendence.com/undeluxe" target="_blank" rel="noopener noreferrer">undeluxe</a> software pro can be used. It can run as a service (start with windows) and will move deleted files into a folder that can be configured to be located on a drive outside the FlexRAID Pool&#8230; As an alternative, FlexRAID will come with a universal recycle bin in a next version&#8230;</li>
</ul>
</li>
<li>It could be advised &#8211; for the Real-Time mode only &#8211; to <strong>disable thumbs.db file generation </strong>although those files being hidden, they are not taken into account (I.e.: not protected by FlexRaid). In addition
<ol>
<li>On the <strong>Start Screen</strong>, type and run <strong>gpedit.msc</strong>.</li>
<li>Expand User Configuration &#8211; Administrative Templates &#8211; Windows Components.</li>
<li>Click on <strong>File Explorer</strong>.</li>
<li>Right-click the entry &#8220;Turn off the caching of thumbnails in hidden thumbs.db files&#8221; and choose Edit.</li>
<li><strong>Enable</strong> the setting.</li>
<li><strong>Log off</strong> <strong>and back on</strong> again (or reboot) after making these changes.</li>
<li><strong>Delete all the thumb.db files</strong> from you drives using this command: <strong>Del {Drive Letter}:＼Thumbs.db /f/s/q/a</strong></li>
</ol>
</li>
</ul>
<ul>
<li>Actually the options &#8220;Restrict Thumbs.db&#8221; and &#8220;Restrict Desktop.ini&#8221; can be used in the Console for that purpose, but it is useful only when using the Real-Time RAID in Expert mode and if frequently browsing the <strong>source drives</strong>. Indeed, although we are not changing anything on the source drives, Explorer will actually update the thumbs.db and desktop.ini files as we browse. There are implications though with selecting those options as Explorer will no longer cache your thumbnails or remember certain folder view preferences.</li>
<li>Parity data are only updated when accessing the drives through the Pool. If data are modified directly on the source drives, you will have to fix that by running the Reconcile task in FlexRaid.</li>
</ul>
</li>
</ul>
<ul style="text-align: justify">
<li>That being, the following Windows Features are safe to use with FlexRaid
<ul>
<li>Windows Search Service</li>
<li>Windows Backup</li>
<li>BITS (Background Intelligent Transfer Service)</li>
</ul>
</li>
</ul>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>Site</strong></span>: http://www.flexraid.com/</p>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>Documentation</strong></span>: http://wiki.flexraid.com/</p>
<p style="text-align: justify"><span style="text-decoration: underline"><strong>Support</strong></span>: http://forum.flexraid.com/ (support Tapatalk ;))</p>
<p style="text-align: justify"></div>
<div class="pvc_clear"></div>
<p id="pvc_stats_934" class="pvc_stats total_only  " data-element-id="934" style=""><i class="pvc-stats-icon medium" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" version="1.0" viewBox="0 0 502 315" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,332) scale(0.1,-0.1)" fill="" stroke="none"><path d="M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z"/><path d="M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z"/><path d="M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z"/><path d="M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z"/><path d="M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z"/><path d="M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z"/><path d="M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z"/><path d="M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z"/><path d="M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z"/></g></svg></i> <img loading="lazy" decoding="async" width="16" height="16" alt="Loading" src="https://www.BeatificaBytes.be/wp-content/plugins/page-views-count/ajax-loader-2x.gif" border=0 /></p>
<div class="pvc_clear"></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.BeatificaBytes.be/flexraid-on-server-2012-instead-of-space-storage/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
