]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.html
Generated.
[homepage.git] / blog / index.html
index 91f4f77ab136bb6c2e4393645372f0ef7857b4b8..d06c8eb642c224bf5fddfffcd9ca2dc81cfe6268 100644 (file)
 
 
     
+    <div class="entry">
+      <div class="title"><a href="http://people.skolelinux.org/pere/blog/How_to_figure_out_which_RAID_disk_to_replace_when_it_fail.html">How to figure out which RAID disk to replace when it fail</a></div>
+      <div class="date">14th February 2012</div>
+      <div class="body"><p>Once in a while my home server have disk problems.  Thanks to Linux
+Software RAID, I have not lost data yet (but
+<a href="http://comments.gmane.org/gmane.linux.raid/34532">I was
+close</a> this summer :).  But once a disk is starting to behave
+funny, a practical problem present itself.  How to get from the Linux
+device name (like /dev/sdd) to something that can be used to identify
+the disk when the computer is turned off?  In my case I have SATA
+disks with a unique ID printed on the label.  All I need is a way to
+figure out how to query the disk to get the ID out.</p>
+
+<p>After fumbling a bit, I
+<a href="http://www.cyberciti.biz/faq/linux-getting-scsi-ide-harddisk-information/">found
+that hdparm -I</a> will report the disk serial number, which is
+printed on the disk label.  The following (almost) one-liner can be
+used to look up the ID of all the failed disks:</p>
+
+<blockquote><pre>
+for d in $(cat /proc/mdstat |grep '(F)'|tr ' ' "\n"|grep '(F)'|cut -d\[ -f1|sort -u);
+do
+    printf "Failed disk $d: "
+    hdparm -I /dev/$d |grep 'Serial Num'
+done
+</blockquote></pre>
+
+<p>Putting it here to make sure I do not have to search for it the
+next time, and in case other find it useful.</p>
+
+<p>At the moment I have two failing disk. :(</p>
+
+<blockquote><pre>
+Failed disk sdd1:       Serial Number:      WD-WCASJ1860823
+Failed disk sdd2:       Serial Number:      WD-WCASJ1860823
+Failed disk sde2:       Serial Number:      WD-WCASJ1840589
+</blockquote></pre>
+
+<p>The last time I had failing disks, I added the serial number on
+labels I printed and stuck on the short sides of each disk, to be able
+to figure out which disk to take out of the box without having to
+remove each disk to look at the physical vendor label.  The vendor
+label is at the top of the disk, which is hidden when the disks are
+mounted inside my box.</p>
+
+<p>I really wish the check_linux_raid Nagios plugin for checking Linux
+Software RAID in the
+<a href="http://packages.qa.debian.org/n/nagios-plugins.html">nagios-plugins-standard</a>
+debian package would look up this value automatically, as it would
+make the plugin a lot more useful when my disks fail.  At the moment
+it only report a failure when there are no more spares left (it really
+should warn as soon as a disk is failing), and it do not tell me which
+disk(s) is failing when the RAID is running short on disks.</p>
+</div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/raid">raid</a>. 
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
     <div class="entry">
       <div class="title"><a href="http://people.skolelinux.org/pere/blog/Automatic_proxy_configuration_with_Debian_Edu___Skolelinux.html">Automatic proxy configuration with Debian Edu / Skolelinux</a></div>
       <div class="date">13th February 2012</div>
@@ -87,11 +151,11 @@ first place.  In Debian Edu, the proxy setup is updated using dhcp and
 ifupdown hooks, to make sure the configuration is updated every time
 the network setup changes.</p>
 
-The WPAD system is documented in a
+<p>The WPAD system is documented in a
 <a href="http://tools.ietf.org/html/draft-ietf-wrec-wpad-01">IETF
 draft</a> and a
 <a href="http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol">Wikipedia
-page</a> for those that want to learn more.
+page</a> for those that want to learn more.</p>
 </div>
       <div class="tags">
         
@@ -631,29 +695,6 @@ from within Iceweasel instead.</p>
     </div>
     <div class="padding"></div>
     
-    <div class="entry">
-      <div class="title"><a href="http://people.skolelinux.org/pere/blog/Second_beta_version_of_Debian_Edu___Skolelinux_based_on_Squeeze.html">Second beta version of Debian Edu / Skolelinux based on Squeeze</a></div>
-      <div class="date"> 7th January 2012</div>
-      <div class="body"><p>I am happy to announce that today we managed to wrap up and publish
-the second beta version of
-<a href="http://www.skolelinux.org/">Debian Edu / Skolelinux</a>.  If
-you want to test a LDAP backed Kerberos server with out of the box PXE
-configuration for running diskless machines and installing new
-machines, check it out.  If you need a software solution for your
-school, check it out too.  The full announcement is
-<a href="http://lists.debian.org/debian-edu-announce/2012/01/msg00000.html">available</a>
-on the project announcement list.</p>
-</div>
-      <div class="tags">
-        
-        
-        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>. 
-        
-        
-      </div>
-    </div>
-    <div class="padding"></div>
-    
     <p style="text-align: right;"><a href="index.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS feed" width="36" height="14" /></a></p>
     <div id="sidebar">
       
@@ -667,7 +708,7 @@ on the project announcement list.</p>
 
 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
 
-<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (4)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (5)</a></li>
 
 </ul></li>
 
@@ -792,7 +833,7 @@ on the project announcement list.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (7)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (106)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (107)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (13)</a></li>
 
@@ -820,6 +861,8 @@ on the project announcement list.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (46)</a></li>
 
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
+
  <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (2)</a></li>