Posts Tagged photoblog
Messy Mesh
Just a teaser of being messy
I can literally pinpoint each cable for where its going and what it does
More Raid tidbits – Monitoring all raid events and changing default email template
A geek really knows the importance of his or her data and backups that just avoids pulling the hair off! When one of my hard drives on a server just died after having a well served 6000+ hours of life span, I found myself really lucky as other array component of RAID1 came to the rescue. Reason was a perhaps a short circuit which could have cost me the biggest loss of my data ever, I had in my life, so a blazing smile was well deserved. Electric power is one of the infinite things that doesn’t work here like it always (oh, its a long story – I should tell some of it sometime later)!
I got an email from mdmonitor telling me about DegradedArray event. So, when I was rebuilding the array, I noticed I got no alerts about rebuild process or array status updates which I really wanted to investigate. Till that time, I wasn’t event knowing that ‘mdadm –monitor’ only sends you the critical updates. So, I pulled up man pages and saw these are critical events:
- DeviceDisappeared
- Fail
- FailSpare
- DegradedArray
Rest of the events are not reported at all! Also, that RHEL5′s mdadm package has pre-compiled template of email that mdadm sends upon occurrence of a critical event which I wanted to change from as well cause it looks pretty immature:
This is an automatically generated mail message from mdadm running on HOSTNAME A DegradedArray event had been detected on md device /dev/md1. Faithfully yours, etc. P.S. The /proc/mdstat file currently contains the following: bla bla bla
Seriously, it says “faithfully”… wth? Lol. We know that all machines are faithful to a human unless they’re not broken or gay!
It definitely needed to be changed. Checking /etc/init.d/mdmonitor at least gave an idea that its not something changeable but it uses default template when MAILADDR is specified while it doesn’t when PROGRAM parameter is used in /etc/mdadm.conf by passing on RAID array as arguments to the script which is used, instead.
I did this then.
# mdadm --detail --scan >> /etc/mdadm.conf # echo "PROGRAM /etc/raidalerter" >> /etc/mdadm.conf # sed -e '1i\DEVICE partitions' -i /etc/mdadm.conf # cat /etc/raidalerter (create this file with below script) #!/bin/bash echo -e "Likely an unfavourable or a bad thing just happened to your RAID. Even if its recovering, it was a bad thing which caused this! \n\n\n" $(cat -A /proc/mdstat | sed 's/\$/\\n/g') | mail -s "$1 on $2 $3 at $HOSTNAME" some-mail-address@example.com # chmod +x /etc/raidalerter # service mdmonitor restart
Provided that you’ve an MTA working fine, mails would be delivered upon any of RAID incidents to the maximum verbosity possible. I don’t think that any of the hardware raids does so?!
I then tested it on a small array to make sure that alerts are deliverable.
# mdadm /dev/md0 -f /dev/sdb1 -r /dev/sdb1 mdadm: set /dev/sdb1 faulty in /dev/md0 mdadm: hot removed /dev/sdb1 # mdadm /dev/md0 -a /dev/sdb1 mdadm: re-added /dev/sdb1
Preview:
Subject: RebuildFinished on /dev/md0 at ToughGuy
Likely an unfavorable or a bad thing just happened to your RAID. Even if its recovering, it was a bad thing which caused this! Personalities :
[raid1]
md1 : active
raid1 sdb3[1] sda3[0]
724555520 blocks [2/2] [UU]
md0 : active
raid1 sdb1[1] sda1[0]
4008064 blocks [2/2] [UU]
unused devices: <none>
Total Rsync Progress
If you use rsync frequently, you might be aware of the fact that rsync doesn’t show overall or total transfer statistics when you’re syncing directories recursively. Even options like ‘–progress’, ‘–stats’ and ‘-vv’ won’t do that. I was searching for that, was about to write a script to run in dry-run mode and measure an overall rsync progress but found a patch here written by Graeme Humphries. This patch later was incorporated into latest dev version 3.1dev downloadable here at http://samba.anu.edu.au/ftp/rsync/dev/nightly/ with an option invokable by ‘–info=progress2′.
Excerpts from the man pages:
There is also a --info=progress2 option that outputs statistics based on the whole transfer, rather than individual files. Use this flag without outputting a filename (e.g. avoid -v or specify --info=name0 if you want to see how the transfer is doing without scrolling the screen with a lot of names. (You don't need to specify the --progress option in order to use --info=progress2.)
So, I downloaded, compiled and installed this dev version and guess what now, there’s no creepy scrolls in shell console filling up the screen with individual file progress.
Yea, I know Red Hat and CentOS are slow in updating their packages repository but lets hope when this build is final, Dag’s repo may have an rpm for it.
Easiest way to create selfsigned certificates
For Linux its going to be with tool ‘genkey’ – a part of crypto-utils package available in Red Hat distros.
# genkey servername
And for Windows, easiest way to do is with SelfSSL available in IIS 6.x Resource Tools.
ASCII Art in Linux
I’m fond of two ascii art tools in Linux.
- linux_logo
- figlet
Both of these are available in RPMForge/Dag’s repository. Second one, figlet draws the ascii art for any text that is input. It has a lot of font options available (see man for figlet and figlist).
Installing HPLIP 3.9.10 on CentOS 5.4 for newer printers (HP LaserJet M1120 MFP)
CentOS 5′s base repository has an older version of HPLIP, something about ’1.6.7′ or so which of course is not adequate to get newer HP printers specially the LaserJet series, to get to work. Now the natural way to have this installed, you may think is to compile it from source – if you’re thinking that then no, that won’t help out! Even after fulfilling all of the required dependencies. I got about almost 14 errors when running hp-check utility after compiling, got’em reduced to 10 but no far lesser than that if you know what I mean.
error: NOT FOUND! This is a REQUIRED/RUNTIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP. error: NOT FOUND! This is a REQUIRED/RUNTIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP. warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly. warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly. error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP. error: Could not access file: No such file or directory error: 10 errors and/or warnings. ----------- | SUMMARY | ----------- Please refer to the installation instructions at: http://hplip.sourceforge.net/install/index.html
Pretty insane though, many of these dependencies were already installed. I would assume that this would be the reason why hplip is not under active development for CentOS and why its not current under CentOS as I saw quite a few HP’s devs and techs saying a big “no” to this community based distribution when people complained on their Launchpad about these compilation errors. Plus, the relative hplip installation issues I found on CentOS’ forum.
After being in disappointed (oops wth) situation, I tried running the RHEL5′s rpm (can be downloaded from hplip’s site) on it after removing the source installed version, but it too gave the dependency errors which I hoped I would resolve and I did later on.
Installing……
# rpm -ivh /Raid/hplip-3.9.10_rhel-5.0.i386.rpm Preparing... ########################################### [100%] file /usr/bin/hpijs from install of hplipfull-3.9.10-0.i386 conflicts with file from package hpijs-1.6.7-4.1.el5.4.i386 file /usr/lib/libhpip.so.0.0.1 from install of hplipfull-3.9.10-0.i386 conflicts with file from package hpijs-1.6.7-4.1.el5.4.i386 file /usr/lib/sane/libsane-hpaio.so.1.0.0 from install of hplipfull-3.9.10-0.i386 conflicts with file from package libsane-hpaio-1.6.7-4.1.el5.4.i386
So, I decided to remove problematic hpijs
Package Arch Version Repository Size Removing: hpijs i386 1:1.6.7-4.1.el5.4 installed 588 k Removing for dependencies: libsane-hpaio i386 1.6.7-4.1.el5.4 installed 94 k sane-backends i386 1.0.18-5.el5 installed 3.1 M sane-backends-devel i386 1.0.18-5.el5 installed 27 k sane-backends-libs i386 1.0.18-5.el5 installed 5.2 M xsane i386 0.991-5.el5 installed 4.5 M Transaction Summary Install 0 Package(s) Update 0 Package(s) Remove 6 Package(s)
But realised soon that it also removed libsane sub-dependency as well.
# rpm -ivh /Raid/hplip-3.9.10_rhel-5.0.i386.rpm error: Failed dependencies: libsane.so.1 is needed by hplipfull-3.9.10-0.i386
Because installing sane would also install hpijs and other conflicting stuff as well so the solution here was to remove problematic packages without ‘removing’ any dependencies needed.
[root@ToughGuy ~]# rpm -ivh /Raid/hplip-3.9.10_rhel-5.0.i386.rpm Preparing... ########################################### [100%] file /usr/bin/hpijs from install of hplipfull-3.9.10-0.i386 conflicts with file from package hpijs-1.6.7-4.1.el5.4.i386 file /usr/lib/libhpip.so.0.0.1 from install of hplipfull-3.9.10-0.i386 conflicts with file from package hpijs-1.6.7-4.1.el5.4.i386 file /usr/lib/sane/libsane-hpaio.so.1.0.0 from install of hplipfull-3.9.10-0.i386 conflicts with file from package libsane-hpaio-1.6.7-4.1.el5.4.i386 # # rpm -ev --nodeps libsane-hpaio # rpm -ivh /Raid/hplip-3.9.10_rhel-5.0.i386.rpm Preparing... ########################################### [100%] file /usr/bin/hpijs from install of hplipfull-3.9.10-0.i386 conflicts with file from package hpijs-1.6.7-4.1.el5.4.i386 file /usr/lib/libhpip.so.0.0.1 from install of hplipfull-3.9.10-0.i386 conflicts with file from package hpijs-1.6.7-4.1.el5.4.i386 # # rpm -ev --nodeps hpijs # # rpm -ivh /Raid/hplip-3.9.10_rhel-5.0.i386.rpm Preparing... ########################################### [100%] 1:hplipfull ########################################### [100%] #
Concluding the overall steps:
# yum install cups cups-devel ghostscript* PyQt xsane -y # Download and install hplip-3.9.10_rhel-5.0.i386.rpm from http://hplipopensource.com/hplip-web/install_wizard/index.html choosing RHEL5. # rpm -ev --nodeps libsane-hpaio # rpm -ev --nodeps hpijs # rpm -ivh hplip-3.9.10_rhel-5.0.i386.rpm # Reboot the system if you're lucky enough, you'll see no errors # reboot # system-config-printer
And configure the printer now as usual. Just out of curiosity, this was my XenServer where I installed it (yea I know it would sound funny) and I got scanner (LaserJet M1120 is dual scanner and printer) working fine as well with xsane. Check it out
NOTE: If this post helped you out or provided you with ways of troubleshooting, feel free to say a little thanks
Cats in an international airport!
Just came across this snap in my cell’s pic gallery which I took at Zia Intl. Airport. Funny!

Error 0x800706d5 upon adding a host to NLB Cluster on Windows
Is this error freaking you out upon adding a new or second host to your existing set of clusters in Windows Network Load Balance Manager? Well, it always does somehow depending upon the dns and the way of addition being followed

0x800706d5 NLB Error
To fix, make sure:
1. The host you’re adding, your DNS server can resolve its FQDN/Computer name or you’ve a proper entry of it setup in Windows hosts file. This also means that a proper DNS suffix is setup if its a FQDN under Computer name properties.
2. And you’re logging in to this dialog box using full computername i.e. “computername/administrator” instead of merely using computername.
OR
Just in case if you prefer to do things manually like I usually do then this would have already set you free from catchy Windows wizards











Recent Comments