2011/08/31

Turning off the highlighting in nano editor

Some times I dislike the highlighting in my nano editor.

To turn it off:

a) You just remember to launch nano with the -I option in the command line to ignore the nanorc files where the color settings are,

nano -I

b) You may set an alias for the command:

alias nano='nano -c -S -I'

c) ?


2011/08/25

Adding a physical disk as RAID 0 using hpacucli in Debian GNU/Linux and HP DL380 G7

This webpage shows hpacucli in Linux.

To install hpacucli in Debian GNU/Linux you may add the HP's repository for the distro in /etc/apt/sources.list:

deb http://downloads.linux.hp.com/SDR/downloads/ProLiantSupportPack/ lucid current/non-free

Yes, I know it means Ubuntu, but it worked for me.

apt-get update
apt-get install hpacucli

Run hpacucli:

# hpacucli
HP Array Configuration Utility CLI 8.60-8.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.


=>

The current situation:

=> ctrl all show config

Smart Array P410i in Slot 0 (Embedded)    (sn: 50014380102A5090)

   array A (SAS, Unused Space: 0 MB)


      logicaldrive 1 (558.9 GB, RAID 0, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600 GB, OK)

   unassigned

      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600 GB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 600 GB, OK)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 600 GB, OK)
      physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 600 GB, OK)

   SEP (Vendor ID PMCSIERA, Model  SRC 8x6G) 250 (WWID: 50014380102A509F)

=>

I need each disk installed individualy, not mixed in arrays.

To add one physical disk as RAID 0:

=> ctrl slot=0 create type=ld drives=1I:1:2 raid=0

Then, the result is what I expected:

=> ctrl all show config                           

Smart Array P410i in Slot 0 (Embedded)    (sn: 50014380102A5090)

   array A (SAS, Unused Space: 0 MB)


      logicaldrive 1 (558.9 GB, RAID 0, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 600 GB, OK)

   array B (SAS, Unused Space: 0 MB)


      logicaldrive 2 (558.9 GB, RAID 0, OK)

      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 600 GB, OK)

   unassigned

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 600 GB, OK)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 600 GB, OK)
      physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 600 GB, OK)

   SEP (Vendor ID PMCSIERA, Model  SRC 8x6G) 250 (WWID: 50014380102A509F)

=>  
After that, you may setup LVM in minutes as this site suggests.

Nice, what powerful the console is!

Installing Debian GNU/Linux 6 from network using a USB flash drive and HP firmware for HP DL380 G7

This is the easiest way to do the job (of course, it is not a new procedure but I need to register it).

This Debian webpage shows us the propietary firmware available and this webpage shows how to prepare you flash drive to install Debian GNU/Linux 6 in your server!

The procedure

First, download the image from the Debian's repository with propietary firmware.

Second, download the image to format the flash drive from here, in my case amd64 for the HP DL380 G7.

Third, prepare your flash drive in other Linux machine. Let /dev/sdX be the place where your flash drive is mounted.

zcat boot.img.gz > /dev/sdX
mkdir -p /mnt/pendrive
mount /dev/sdX /mnt/pendrive
cp firmware-6.0.2.1-amd64-netinst.iso /mnt/pendrive
umount /mnt/pendrive

Fourth, boot your server with the flash drive inserted to install the system from network. The firmware for the network card will be available (plus some others).

Enjoy!

2011/08/13

org.jboss.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:XXX

This exception:

org.jboss.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:1234
        at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303)
        at org.geoaire.jobscheduler.server.netty.JSServer.start(JSServer.java:82)
        at org.geoaire.jobscheduler.server.Server.process(Server.java:83)
        at org.geoaire.jobscheduler.server.ui.cli.main.Main.run(Main.java:65)
        at org.geoaire.common.ui.cli.CommonMain.start(CommonMain.java:95)
        at org.geoaire.jobscheduler.server.ui.cli.main.Main.main(Main.java:93)
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind(Native Method)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:148)
        at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:100)
        at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:74)
        at org.jboss.netty.channel.Channels.bind(Channels.java:468)
        at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:200)
        at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:348)
        at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:176)
        at org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:85)
        at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:142)
        at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:90)
        at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:282)
        ... 5 more


may have several causes but sometimes you just need to check out the basics... did you check the plug?

Well, in my case this was a little "virtual" because the unconnected device was the loopback network interface! Yep, I lost it after playing with my network definitions... :-P

As David J. Agans mentioned in the chapter 9 of his useful book Debugging, there is a process to debugging anything and one step is to check the basics as "Check the plug". Ok, I recognize that it took me a time to remember this simple stuff... but the lesson is now very fresh.

So after editing /etc/network/interfaces and bringing back my lo interface, the program run ok.