Asus WL-330N3G and Tango Luxembourg K4605 3G key

November 24th, 2012

If you live in Luxemburg and want to share a 3G connection with a Wireless router, you’ll find out that no wireless router is officially supported.
Here is how I’ve configured an Asus WL-330N3G with a Luxemburgish Tango K4605 3G Key.

First, the onboard CD must be disabled on the 3G key. To do so, connect the key to your computer, and send the following AT command.
Note that I’m using a Mac. To be able to send AT commands, I’ve used screen. From a Terminal:

mac:~ user$ screen /dev/tty/usbHuaweiXXX

Once connected, test the modem with the AT command. You should receive a OK
Then disable the onboard CD with the following:


Note: To get back to normal, send the following command:


Once this is done, plug the Tango (Vodafone) 3G key in the Asus WL-330N3G wireless router, and use the 3G sharing menu.
Make sure that the wireless router is running the latest release of firmware.

In the bottom right hand corner of the web interface of the wireless router, edit the 3G parameters. Click on more details next to the Apply button, and choose the following to match the APN settings for Tango Luxemburg

  • Location: Manual
  • ISP: Manual
  • APN service: hspa
  • Dial Number: *99***1#
  • Account: tango
  • Password: tango


What to do when a PV is missing..

April 23rd, 2012

Here is a stupid command for a stupid me!
After some SAN maintenance, I figure out that I was no longer able to modify a LV on a RHEL 6.2 server, due to Cannot change VG vgname while PVs are missing..

The LV was first set as a two legs mirror, but only shows up as a single leg LV after the SAN maintenance:

 lvs -a -olv_name,vg_name,devices vgname
  LV                        VG       Attr   LSize  Origin Snap%  Move Log Copy%  Convert Devices
  lv_orabin             vgname       lv_orabin_mimage_0(0),lv_orabin_mimage_1(0)
  [lv_orabin_mimage_0]  vgname       /dev/mapper/360060160da612e00b879dacb1857e111(15360)
  [lv_orabin_mimage_1]  vgname       /dev/mapper/3600601602c502e00424263f91957e111(15360)
  lv_users              vgname       /dev/mapper/3600601602c502e00424263f91957e111(0)

The previous output shows that lv_users is not mirrored, but trying to mirror it leads to the missing PV error:

lvconvert -m1 -b vgname/lv_users --mirrorlog core \
  Cannot change VG vgname while PVs are missing.
  Consider vgreduce --removemissing.

To fix this, I probably don’t want to use the proposed solution (vgreduce), but the solution was in the following:

vgextend --restoremissing vgname /dev/mapper/360060160da612e00b879dacb1857e111

This has just made my day! ;-)

Looking for uuencode on RHEL6?

January 30th, 2012

If you are used to send attachments by email using the mailx command line, you are probably used to uuencode.
I’ve just spent some time trying to figure out what happened to the sharutils package providing uuencode.

It appears that you no longer need it (for this purpose actually), as mailx now has the ability to send attachments:

       mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] \
             [-b bcc-addr] [-r from-addr] [-h hops] [-A account] \
             [-S variable[=value]] to-addr . . .


As previously stated, mailx is now able to attach files firectly to your emails, but, as a MIME attachment… And what if you want to process the email in an automated manner, let say, with procmail?
Well, in this case, you likely will use Perl and the MIME::Parser module.
Here is an example of a script saving the attachment to the /tmp directory:


use lib "/opt/my/compiled/perl-5.8.8/lib/site_perl";
use MIME::Parser;

$parser = MIME::Parser->new( );

### Parse an input filehandle:
$entity = $parser->parse(\*STDIN);

exit 0;

Things are getting better, but what if you’re not able to use Perl to extract the attachment and have to use uudecode?
Well, you can replace uuencode by using openssl to encode the attachment in base64, as shown below:

(echo; echo "begin-base64 644 $TOATTACH"; cat $TOATTACH | \ 
openssl base64; echo "====") |  mailx -s "One human readable subject" $DEST

instead of

(echo; cat $TOATTACH | uuencode $TOATTACH) | \
 mailx -s "One human readable subject" $DEST

Purge postfix mail queue

November 14th, 2011

So ugly, but actually working if needed:

for mailid in 
`mailq | awk -F' ' '{ if ( $1 ~ /^[A-F0-9]/ ) { print $1; } }'`; do 
    postsuper -d $mailid; 

multipath, display blacklisted devices

November 11th, 2011

A very simple command that can help troubleshooting a multipath configuration on linux, that you may already know about:

[root@linuxsrv ~]# multipathd -k
> show devices
> show blacklist

help” is my favorite :D