]> pere.pagekite.me Git - homepage.git/blob - blog/data/2024-03-03-raid-disk-megactl.txt
Generated.
[homepage.git] / blog / data / 2024-03-03-raid-disk-megactl.txt
1 Title: RAID status from LSI Megaraid controllers using free software
2 Tags: english, raid, isenkram
3 Date: 2024-03-03 22:40
4
5 <p>The last few days I have revisited RAID setup using the LSI
6 Megaraid controller. These are a family of controllers called PERC by
7 Dell, and is present in several old PowerEdge servers, and I recently
8 got my hands on one of these. I had forgotten how to handle this RAID
9 controller in Debian, so I had to take a peek in the
10 <a href="https://wiki.debian.org/LinuxRaidForAdmins">Debian wiki page
11 "Linux and Hardware RAID: an administrator's summary"</a> to remember
12 what kind of software is available to configure and monitor the disks
13 and controller. I prefer Free Software alternatives to proprietary
14 tools, as the later tend to fall into disarray once the manufacturer
15 loose interest, and often do not work with newer Linux Distributions.
16 Sadly there is no free software tool to configure the RAID setup, only
17 to monitor it. RAID can provide improved reliability and resilience in
18 a storage solution, but only if it is being regularly checked and any
19 broken disks are being replaced in time. I thus want to ensure some
20 automatic monitoring is available.</p>
21
22 <p>In the discovery process, I came across a old free software tool to
23 monitor PERC2, PERC3, PERC4 and PERC5 controllers, which to my
24 surprise is not present in debian. To help change that I created a
25 <a href="https://bugs.debian.org/1065322">request for packaging of the
26 megactl package</a>, and tried to track down a usable version.
27 <a href="https://sourceforge.net/p/megactl/">The original project
28 site</a> is on Sourceforge, but as far as I can tell that project has
29 been dead for more than 15 years. I managed to find a
30 <a href="https://github.com/hmage/megactl">more recent fork on
31 github</a> from user hmage, but it is unclear to me if this is still
32 being maintained. It has not seen much improvements since 2016. A
33 <a href="https://github.com/namiltd/megactl">more up to date
34 edition</a> is a git fork from the original github fork by user
35 namiltd, and this newer fork seem a lot more promising. The owner of
36 this github repository has replied to change proposals within hours,
37 and had already added some improvements and support for more hardware.
38 Sadly he is reluctant to commit to maintaining the tool and stated in
39 <a href="https://github.com/namiltd/megactl/pull/1">my first pull
40 request</A> that he think a new release should be made based on the
41 git repository owned by hmage. I perfectly understand this
42 reluctance, as I feel the same about maintaining yet another package
43 in Debian when I barely have time to take care of the ones I already
44 maintain, but do not really have high hopes that hmage will have time
45 to spend on it and hope namiltd will change his mind.</p>
46
47 <p>In any case, I created
48 <a href="https://salsa.debian.org/debian/megactl">a draft package</a>
49 based on the namiltd edition and put it under the debian group on
50 salsa.debian.org. If you own a Dell PowerEdge server with one of the
51 PERC controllers, or any other RAID controller using the megaraid or
52 megaraid_sas Linux kernel modules, you might want to check it out. If
53 enough people are interested, perhaps the package will make it into
54 the Debian archive.</p>
55
56 <p>There are two tools provided, megactl for the megaraid Linux kernel
57 module, and megasasctl for the megaraid_sas Linux kernel module. The
58 simple output from the command on one of my machines look like this
59 (yes, I know some of the disks have problems. :).</p>
60
61 <pre>
62 # megasasctl
63 a0 PERC H730 Mini encl:1 ldrv:2 batt:good
64 a0d0 558GiB RAID 1 1x2 optimal
65 a0d1 3067GiB RAID 0 1x11 optimal
66 a0e32s0 558GiB a0d0 online errs: media:0 other:19
67 a0e32s1 279GiB a0d1 online
68 a0e32s2 279GiB a0d1 online
69 a0e32s3 279GiB a0d1 online
70 a0e32s4 279GiB a0d1 online
71 a0e32s5 279GiB a0d1 online
72 a0e32s6 279GiB a0d1 online
73 a0e32s8 558GiB a0d0 online errs: media:0 other:17
74 a0e32s9 279GiB a0d1 online
75 a0e32s10 279GiB a0d1 online
76 a0e32s11 279GiB a0d1 online
77 a0e32s12 279GiB a0d1 online
78 a0e32s13 279GiB a0d1 online
79
80 #
81 </pre>
82
83 <p>In addition to displaying a simple status report, it can also test
84 individual drives and print the various event logs. Perhaps you too
85 find it useful?</p>
86
87 <p>In the packaging process I provided some patches upstream to
88 improve installation and ensure
89 <ahref="https://github.com/namiltd/megactl/pull/2">a Appstream
90 metainfo file is provided</a> to list all supported HW, to allow
91 <a href="https://tracker.debian.org/isenkram">isenkram</a> to propose
92 the package on all servers with a relevant PCI card.</p>
93
94 <p>As usual, if you use Bitcoin and want to show your support of my
95 activities, please send Bitcoin donations to my address
96 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
97