<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Hacker's ramblings - Linux</title>
    <link>https://blog.hqcodeshop.fi/</link>
    <description>About the wonderful world of ICT...</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.4.0 - http://www.s9y.org/</generator>
    <pubDate>Sun, 01 Feb 2026 08:03:43 GMT</pubDate>

    <image>
    <url>https://blog.hqcodeshop.fi/templates/2k11/img/s9y_banner_small.png</url>
    <title>RSS: Hacker's ramblings - Linux - About the wonderful world of ICT...</title>
    <link>https://blog.hqcodeshop.fi/</link>
    <width>100</width>
    <height>21</height>
</image>

<item>
    <title>RAID Controller Upgrade</title>
    <link>https://blog.hqcodeshop.fi/archives/616-RAID-Controller-Upgrade.html</link>
            <category>Hardware</category>
            <category>Linux</category>
    
    <comments>https://blog.hqcodeshop.fi/archives/616-RAID-Controller-Upgrade.html#comments</comments>
    <wfw:comment>https://blog.hqcodeshop.fi/wfwcomment.php?cid=616</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.hqcodeshop.fi/rss.php?version=2.0&amp;type=comments&amp;cid=616</wfw:commentRss>
    

    <author>nospam@example.com (Jari Turkia)</author>
    <content:encoded>
    &lt;p&gt;It hasn&amp;#39;t been an especially good couple of weeks. I&amp;#39;ve suffered couple hardware failures. One of my recent posts is about 13 year old &lt;a href=&quot;https://blog.hqcodeshop.fi/archives/615-SSD-Trouble-Replacement-of-a-tired-unit.html&quot;&gt;SSD getting a retirement&lt;/a&gt;. There are other hardware failures waiting for a write-up.&lt;/p&gt;

&lt;p&gt;A Linux gets security updates every once in a while. I have two boxes with a bleeding/cutting edge distro. The obvious difference between those is, that a &amp;quot;bleeding&amp;quot; edge is so new stuff, it doesn&amp;#39;t let wounds heal. It literally breaks because of way too new components. A &amp;quot;cutting&amp;quot; edge is pretty new, but more tested. Concrete example of a bleeding edge would be &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/archlinux.org/&#039;]);&quot;  href=&quot;https://archlinux.org/&quot; target=&quot;_blank&quot;&gt;ArchLinux&lt;/a&gt; and a cutting edge would be &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/fedoraproject.org/&#039;]);&quot;  href=&quot;https://fedoraproject.org/&quot; target=&quot;_blank&quot;&gt;Fedora Linux&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My box got a new kernel version and I wanted to start running it. To my surprise, booting into the new version failed. Boot was stuck. Going to recover, I realized there was a physical storage device missing preventing automatic filesystem mount to happen, preventing successful boot. Rebooting again. This time eyeballing console display.&lt;/p&gt;

&lt;p&gt;Whoa!&lt;/p&gt;

&lt;h2&gt;LSI 9260-4i&lt;/h2&gt;

&lt;p&gt;RAID status was missing from boot-sequence. This is what I was expecting to see, but was missing:&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; href=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9260-4i-bootup.jpg&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Hardware/PC/RAID-LSI-9260-4i-bootup.jpg&#039;,&#039;Zoom&#039;,&#039;height=297,width=815,top=939,left=1520,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:1464 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; height=&quot;88&quot; loading=&quot;lazy&quot; src=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9260-4i-bootup.serendipityThumb.jpg&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;a class=&quot;serendipity_image_link&quot; href=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9260-4i-RAID-config.jpg&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Hardware/PC/RAID-LSI-9260-4i-RAID-config.jpg&#039;,&#039;Zoom&#039;,&#039;height=406,width=815,top=884.5,left=1520,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:1466 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; height=&quot;122&quot; loading=&quot;lazy&quot; src=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9260-4i-RAID-config.serendipityThumb.jpg&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hitting reset-button. Nothing.&lt;br /&gt;
Powering off the entire box. Oh yes! Now the PCIe-card was found, Linux booted and mounted the drive.&lt;/p&gt;

&lt;p&gt;It was pretty obvious, any reliability the system may have had - was gone. From this point on, I was in a recovery mode. Any data on that mirrored pair of HDDs was on verge of being lost. Or, to be exact: system stability was at risk, not the data. On this quality RAID-controller from 2011, data saved to a mirrored drive has no header of any kind. Unplugging a drive from RAID-controller and plugging it into a USB3-dock makes the drive completely visible without tricks. Data not being lost at any point is a valuable thing.&lt;/p&gt;

&lt;p&gt;This is what a LSI 9240-4i would look like:&lt;/p&gt;

&lt;p&gt;&lt;a class=&quot;serendipity_image_link&quot; href=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9260-4i-PCIe-card.jpg&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Hardware/PC/RAID-LSI-9260-4i-PCIe-card.jpg&#039;,&#039;Zoom&#039;,&#039;height=862,width=1215,top=656.5,left=1320,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:1465 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; height=&quot;176&quot; loading=&quot;lazy&quot; src=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9260-4i-PCIe-card.serendipityThumb.jpg&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On a Linux, the card would look like (if UEFI finds it in boot):&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;kernel: scsi host6: Avago SAS based MegaRAID driver
kernel: scsi 6:2:1:0: Direct-Access     LSI      MR9260-4i        2.13 PQ: 0 ANSI: 5
kernel: sd 6:2:1:0: Attached scsi generic sg2 type 0
kernel: sd 6:2:1:0: [sdb] 11719933952 512-byte logical blocks: (6.00 TB/5.46 TiB)&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;LSI 9560-8i&lt;/h2&gt;

&lt;p&gt;Proper RAID controllers as brand new are expensive. Like 1000&amp;euro; a piece. This is just a hobby, so I didn&amp;#39;t need a supported device. My broken one was 14 years old. I could easily settle for an older model.&lt;/p&gt;

&lt;p&gt;To &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.ebay.co.uk/b/bn_661707&#039;]);&quot;  href=&quot;https://www.ebay.co.uk/b/bn_661707&quot; target=&quot;_blank&quot;&gt;eBay&lt;/a&gt;. Shopping for a replacement.&lt;/p&gt;

&lt;p&gt;Surprisingly, 9240-4i was still available. I didn&amp;#39;t want one. That model was End-of-Life&amp;#39;d years ago. I wanted something that might be still supported or went just out of support.&lt;/p&gt;

&lt;p&gt;This is what I got:&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; href=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-PCIe-card.jpg&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Hardware/PC/RAID-LSI-9560-8i-PCIe-card.jpg&#039;,&#039;Zoom&#039;,&#039;height=757,width=1215,top=709,left=1320,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:1468 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; height=&quot;155&quot; loading=&quot;lazy&quot; src=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-PCIe-card.serendipityThumb.jpg&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;a class=&quot;serendipity_image_link&quot; href=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-connected-HDD.jpg&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Hardware/PC/RAID-LSI-9560-8i-connected-HDD.jpg&#039;,&#039;Zoom&#039;,&#039;height=815,width=1215,top=680,left=1320,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:1467 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; height=&quot;167&quot; loading=&quot;lazy&quot; src=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-connected-HDD.serendipityThumb.jpg&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lovely piece of hardware. Affordable even as second-hand PCIe -card.&lt;/p&gt;

&lt;p&gt;On a Linux, the card shows as:&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;02:00.0 RAID bus controller: Broadcom / LSI MegaRAID 12GSAS/PCIe Secure SAS39xx&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;On 9560-8i Cabling&lt;/h3&gt;

&lt;p&gt;Boy, oh boy! This wasn&amp;#39;t easy. This was nowhere near easy. Actually, this was very difficult part. Involving multiple nights spent with googling and talking to AI.&lt;/p&gt;

&lt;p&gt;The internal connector is a single&amp;#160;SFF-8654 (SlimSAS). Additionally, the card when you purchase one, doesn&amp;#39;t come with any cabling with it. 9240-4i did have a proper breakout cable for its&amp;#160;Mini-SAS SFF-8087. On the other end, there was a SAS/S-ATA -connector. As a SFF-8654 will typically be used to connect into a some sort of hot-swap bay, there a re multiple cabling options.&lt;/p&gt;

&lt;p&gt;Unfortunately to me, SFF-spec doesn&amp;#39;t have anything like that. But waitaminute! In the above picture, there is a SFF-8654 8i breakout cable with 8 SAS/S-ATA connectors in it. One is even connected to a HDD to demonstrate it working perfectly.&lt;/p&gt;

&lt;p&gt;Well, this is where &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.aliexpress.com/&#039;]);&quot;  href=&quot;https://www.aliexpress.com/&quot; target=&quot;_blank&quot;&gt;AliExpress&lt;/a&gt; steps up. Though, the spec doesn&amp;#39;t say such thing exists, it doesn&amp;#39;t mean that you couldn&amp;#39;t buy such cable with money. I went with one vendor. It seemed semi-reliable with hundreds of 5-star transactions completed. Real, certified SFF-8654 -cables are expensive. 100+&amp;euro; and much more. This puppy cost me 23&amp;euro;. What a bargain! I was in a hurry, so I paid 50&amp;euro; for the shipping. And duty and duty invoicing fees and ... ah.&lt;/p&gt;

&lt;h3&gt;Configuring a replacment RAID-array&lt;/h3&gt;

&lt;p&gt;This was the easy part of the project. Apparently LSI/Broadcom -controllers write metadata to a drive. When I plugged in all the cables and booted the computer, it fould the previously configured array. RAID-configuration data &lt;strong&gt;IS&lt;/strong&gt; stored to the drive somewhere, it&amp;#39;s just not at a header of the drive. This is handy two-ways: unplugged drive looks like a regular drive, but on an appropriate controller the configs are readable.&lt;/p&gt;

&lt;p&gt;Obviously the data on the drive was transferred away to an external USB-drive for safe-keeping. First I waited 12 hours for a degraded RAID-array to become intact again, then &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/sourceware.org/lvm2&#039;]);&quot;  href=&quot;https://sourceware.org/lvm2&quot; target=&quot;_blank&quot;&gt;LVM&lt;/a&gt;ing the data back.&lt;/p&gt;

&lt;p&gt;A copy of drive was on an external drive connected via USB3. Recovery procedure with LVM:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Partition the new RAID1-mirror as LVM with &lt;tt&gt;parted&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;pvcreate&lt;/tt&gt; the new physical device to make it visible into LVM&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;vgextend&lt;/tt&gt; the logical volume residing in external USB-drive to utilize newly created physical device. Note: Doing this does NOT move any data.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;pvmove&lt;/tt&gt;:ing all data from external drive into internal drive. This forces logical volume to NOT use any extents on the drive. Result is moving data.&lt;/li&gt;
	&lt;li&gt;Waiting. For 8 hours. This is a live system accessing the drive at all times.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;vgreduce&lt;/tt&gt;:in the logical volume to stop using external drive.&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;pvremove&lt;/tt&gt;:in the external drive from LVM.&lt;/li&gt;
	&lt;li&gt;Done!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;On LSI/Broadcom Linux Software&lt;/h2&gt;

&lt;p&gt;This is what I learned:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;MegaRAID&lt;/strong&gt;:

	&lt;ul&gt;
		&lt;li&gt;Unsupported at the time of writing this blog post&lt;/li&gt;
		&lt;li&gt;For RAID-controllers series 92xx&lt;/li&gt;
		&lt;li&gt;My previous 9240 worked fine with&amp;#160;&lt;tt&gt;MegaCli64&lt;/tt&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;StorCLI&lt;/strong&gt;:
	&lt;ul&gt;
		&lt;li&gt;Unsupported at the time of writing this blog post&lt;/li&gt;
		&lt;li&gt;For RAID-controller series 93xx, 94xx and 95xx&lt;/li&gt;
		&lt;li&gt;My 9560 worked fine with&amp;#160;&lt;tt&gt;storcli64&lt;/tt&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;strong&gt;StorCLI2&lt;/strong&gt;:
	&lt;ul&gt;
		&lt;li&gt;Still supported!&lt;/li&gt;
		&lt;li&gt;For RAID-controller series 96xx onwards&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Running &lt;tt&gt;MegaCli64&lt;/tt&gt;&amp;#160;with 95xx-series controller installed will make the command stuck. Like properly stuck. Stuck so well, that not even &lt;tt&gt;kill -9&lt;/tt&gt;&amp;#160;does anything -stuck.&lt;/p&gt;

&lt;p&gt;Running &lt;tt&gt;StorCLI2&lt;/tt&gt; with 95xx-series controller installed does nothing. There is a complaint, that no supported controller was found on the system. Nothing stuck. Much less dangerous than &lt;tt&gt;MegaCli64&lt;/tt&gt;.&lt;/p&gt;

&lt;h3&gt;Status&lt;/h3&gt;

&lt;p&gt;On boot:&lt;br /&gt;
&lt;a class=&quot;serendipity_image_link&quot; href=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-bootup.jpg&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Hardware/PC/RAID-LSI-9560-8i-bootup.jpg&#039;,&#039;Zoom&#039;,&#039;height=406,width=815,top=884.5,left=1520,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:1469 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; height=&quot;122&quot; loading=&quot;lazy&quot; src=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-bootup.serendipityThumb.jpg&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;a class=&quot;serendipity_image_link&quot; href=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-bootup2.jpg&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Hardware/PC/RAID-LSI-9560-8i-bootup2.jpg&#039;,&#039;Zoom&#039;,&#039;height=325,width=815,top=925,left=1520,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes&#039;); return false;&quot;&gt;&lt;!-- s9ymdb:1470 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; height=&quot;97&quot; loading=&quot;lazy&quot; src=&quot;https://blog.hqcodeshop.fi/uploads/Hardware/PC/RAID-LSI-9560-8i-bootup2.serendipityThumb.jpg&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note the complaing about battery backup:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The battery hardware is missing or malfunctioning, or the battery is unplugged, or the battery could be fully discharged. If you continue to boot the system, the battery-backed cache will not function.&lt;br /&gt;
If battery is connected and has been allowed to charge for 30 minutes sand this message continues to appear, then contact technical support for lassistance.&lt;/p&gt;

&lt;p&gt;Battery Status: Missing&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On Linux prompt by running command &lt;tt&gt;storcli64 /c0 /vall show&lt;/tt&gt;:&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;CLI Version = 007.3007.0000.0000 May 16, 2024
Operating system = Linux 6.16.3-100.fc41.x86_64
Controller = 0
Status = Success
Description = None


Virtual Drives :
==============

-------------------------------------------------------------
DG/VD TYPE  State Access Consist Cache Cac sCC     Size Name 
-------------------------------------------------------------
0/239 RAID1 Optl  RW     Yes     RWTD  -   ON  5.457 TB      
-------------------------------------------------------------

VD=Virtual Drive| DG=Drive Group|Rec=Recovery
Cac=CacheCade|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded
Optl=Optimal|dflt=Default|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady
B=Blocked|Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Finally&lt;/h2&gt;

&lt;p&gt;Hopefully I don&amp;#39;t need to touch these drives for couple years. In -23, I &lt;a href=&quot;https://blog.hqcodeshop.fi/archives/565-RAID1-Disc-Drive-upgrade.html&quot;&gt;upgraded the drives&lt;/a&gt;. Something really weird happened in January this year and I had to &lt;a href=&quot;https://blog.hqcodeshop.fi/archives/607-Confessions-of-a-Server-Hugger-Fixing-a-RAID-Array.html&quot;&gt;replace the replacement drives&lt;/a&gt;. As I wrote in the article, the drives were in perfect condition.&lt;/p&gt;

&lt;p&gt;Now I know, the controller started falling apart. I simply didn&amp;#39;t realize it at the time.&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Sat, 31 Jan 2026 18:57:00 +0000</pubDate>
    <guid isPermaLink="false">https://blog.hqcodeshop.fi/archives/616-guid.html</guid>
    
</item>

</channel>
</rss>
