The every day things from Thalamus' life.

Thalamus' Blog

22 January, 2007

Hide your mailto: …

Filed under: ComputerStuff_en — Thalamus @ 15:34

Today I was amazed when I saw my sisters email address right there in the open, ready for any spam bot to harvest. I told her to at least make it harder by implementing some coded text instead. But, of course, this ain’t a full proof way of doing it. I prefer to make mine as a gif image, pr. example on this URL.

Third, but – I’m sure so well known that even the spam bots search for it is by writing something like this “username [at] host dot com”. The main thing is – never – ever post your email address like a mailto: – it will totally render your email address unusable for years to come.

• • •

16 January, 2007

QLogic, HSV210, Multipath, RedHat Enterprise 4 on a HP Proliant DL360 G5

Filed under: ComputerStuff_en — Thalamus @ 10:28

Goal: Get a working setup of multiple SAN paths to a HP HSV210 – running QLogic FCA’s.

Whooah. Today I finally could verify that my setup is working. Pulled out the fibre on one of the FCA’s and yes, machine was switching over without too much problems. And here is how I did it.

First of all, the OS was RedHat Enterprise ES 4 update 4 without any patches applied. The first thing I did was to pull out both the fibers off the FCA’s. This ain’t a requirement, just easier when choosing how the server should boot. (I boot off the hard drives, setup with mirrored raid off the compaq driver). After installation of the OS itself. The first thing I did was to download the official HP QLogic drivers. This mainly since HP them self wants me to … in order to have any support at all :p The archive I’ve used was called “hp_qla2x00-2006-10-11”. Its a tar file that contains the source code and the fiberutils-2.1.5 rpm.

After opening the tar file, you get the folder “hp_qla2x00-2006-10-11” folder. Go into it – find the script and run it as “sh ./”. You could supply the “-a” parameter, but, I didn’t want it for all the kernels at that moment. What the install does, is simply compile the kernel for you and installing the drivers as modules. Easy stuff. Oh, forgot – of course you need to install the kernel-source rpm before you get this working :p

Ok, done with the first step. The SAN has a Ultrium drive attached to a MSL6100 controller. I wanted to get that working. After the new drivers – I didn’t find any tape-drive. How come ? Well, the there is a command that allows you to probe all the LUN’s, it is located in /opt/hp/hp_fibreutils/pbl/ folder after installation of the HP QLogic drivers – these comes off the already mentioned fibreutils rpm. From there you can issue a “./ -i” command. It will simply put the “probe-luns” command into /etc/rc.sysinit – forcing all the LUN’s to be probed.

If you don’t have a tape drive that don’t show up or something like that – well, then you don’t need to add this of course.

Now, at this stage – you should be able to see the disks that is presented to you – if you of course have done this step already. In my case I saw 8 generic scsi disks as /dev/sd[a to g].

It is time now to make them all into ONE device, witch you should use for the future. The tool I choose was using multipath. The two RPMs needed is “device-mapper-1.02.07-4.0.RHEL4” and “device-mapper-multipath-0.4.5-16.1.RHEL4”. After installing those, you’ll get a config file named /etc/multipath.conf – this is a template you may edit to your liking. For my setup, where I just wanted all the eight (8) paths to become one single drive. I used the following config file.

# This is an example configuration file for device mapper multipath.
# For a complete list of the default configuration values, see
# /usr/share/doc/device-mapper-multipath-0.4.5/multipath.conf.defaults
# For a list of configuration options with descriptions, see
# /usr/share/doc/device-mapper-multipath-0.4.5/multipath.conf.annotated
# Blacklist all devices by default. Remove this to enable multipathing
# on the default devices. 
devnode_blacklist {
        devnode "^cciss!c[0-9]d[0-9]*"
        devnode "^hd[a-z]"
        devnode "ide[0-9]"
## Use user friendly names, instead of using WWIDs as names.
defaults {
        user_friendly_names yes
## This is a template multipath-tools configuration file
## Uncomment the lines relevent to your environment
defaults {
        udev_dir                /dev
        polling_interval        10
        selector                "round-robin 0"
        path_grouping_policy    multibus
        getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
        prio_callout            /bin/true
        path_checker            readsector0
        rr_min_io               100
        rr_weight               priorities
        failback                immediate
		features                "1 queue_if_no_path"
        no_path_retry           fail
        user_friendly_name      yes

The rest of the config file is just comments. On the top, you see some blacklisted devices. Those are the devices (disk-devices) that you have on your system that you don’t want multipath to even try to interpret. Now, after this, you want the multipathd to start up at runtime, this is as easy as adding it with the following command “chkconfig multipathd on” – since it already is installed and ready for you in the /etc/init.d directory.

Now, let’t boot the server. In my case, after the reboot – the multipath software all on itself finds and made the multipath device. In my case the device was named /dev/mapper/mpath01. You can verify this by issuing pr. example “dmsetup info”. For me it yielded

Name:              mpath0
State:             ACTIVE
Tables present:    LIVE
Open count:        0
Event number:      1
Major, minor:      253, 0
Number of targets: 1
UUID: mpath-3600508b4001063bb0000900000b80000

Then to verify the size etc. I issued a “fdisk -l /dev/mapper/mpath01”. The response in my case was …

Disk /dev/mapper/mpath0: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/mapper/mpath0 doesn't contain a valid partition table

Goodie – goodie. I then after this, partitioned, formatted, edited it into /etc/fstab and rebooted just to verify everything came up as expected. I then forced some continues writes to the device while I unplugged one of the FCA, one at the time (not both at the same time ofc).

The kernel warned me …

qla2400 0000:0b:00.0: LOOP DOWN detected (2).
SCSI error : <1 0 0 2> return code = 0x10000
SCSI error : <1 0 1 2> return code = 0x10000
SCSI error : <1 0 2 2> return code = 0x10000
SCSI error : <1 0 3 2> return code = 0x10000
device-mapper: dm-multipath: Failing path 8:128.
SCSI error : <1 0 0 2> return code = 0x10000
device-mapper: dm-multipath: Failing path 8:160.
SCSI error : <1 0 1 2> return code = 0x10000
device-mapper: dm-multipath: Failing path 8:192.
SCSI error : <1 0 2 2> return code = 0x10000
device-mapper: dm-multipath: Failing path 8:224.
SCSI error : <1 0 3 2> return code = 0x10000
SCSI error : <1 0 0 1> return code = 0x10000
SCSI error : <1 0 0 2> return code = 0x10000

But, thats just dandy I guess. No problem with the already up and running diskaccess to the SAN.

Conclusion: Mission Complete 🙂

• • •

4 January, 2007

Happy new year all !

Filed under: Private_en — Thalamus @ 05:15

So, another year have passed and I’m just getting older. Funny stuff ain’t it ? :p Well, not much more to say about that except that I wish you all a happy new year. I myself have had a normal start on the new year, just as expected like. Back to work and days are going slower than ever. Maybe because I want to go home and do some fun stuff with the computer rather using it as a work tool. But, hey – thats how it is being in the business that I am I guess. Was a tad bored yesterday, could not sleep so I wipped up a new layout to the front page. Ugly as hell, but well – my old one was even worse. Would not be surprised if the next thing I’m going to do when I can’t sleep, would be to do it all over again.

• • •