Archive for August, 2009


No Gravatar

I trawled Google for a fair amount of time trying to figure out how to rescan the SCSI bus.
Here’s the scenario. You have a server that connects to a tape drive via a fiber channel network (using FC switches).
The server loses connectivity through the fiber channel network to the tape drive momentarily.
As a result the server looses access to the tape drive. After the failure the fiber channel network comes back up.
However the server is showing blank device entries in it’s lsscsi out put. The luns and the host entries are there, but it’s not being assigned a /dev/st0 device node.
You check another server connected to the fiber channel network and it can see the tape drive, so that means the fiber channel network is ok.

What to do? This is actually a Fiber Channel controller issue and not really the SCSI controllers fault.
Reading up about SCSI, I found that a SCSI rescan only picks up new devices, it won’t “reconnect” to devices that have failed. So in the case above the SCSI rescan won’t help me. Also the problem is also deeper than just SCSI, so you need to also issue a rescan on the Fiber Channel HBA.

In Theory, rescan the Fiber Channel HBA, after that the device comes back up, rescan SCSI and the LUN, Host entries are correct and your device becomes accessible again.
If the device is still hanging around in lsscsi but has no device node entry (/dev/st0) then you may have to delete the entries manually before issuing the Fiber Channel and SCSI rescan.

Here’s the process to start a rescan. This should work in SLES 10 and CentOS 5.
host$num is the number of the Fiber Channel controller. This is the first number that shows up when you run and lsscsi.|
E.G
[7:0:10:0]   mediumx STK      SL500            1126  -
So the host$num is host7

# cd /sys/class/fc_host/host$num
# echo 1 > issue_lip

The Fiber Channel controller will now rescan the network. Wait about 15 seconds. You should see some entries in /var/log/messages.
Next you need to rescan SCSI.

# cd /sys/class/scsi_host/host$num
Host$num is the number of the SCSI controller. If you run a “cat proc_name” and get “<NULL>” then it’s not a valid SCSI controller. The “cat proc_name” should return something other than “<NULL>”.

# echo “- – - ” > scan

This should rescan the SCSI bus and presto, your device returns :)

More on the 55GB logfile

No Gravatar

So I’m still trying to process this massive log file, which is basically a list of files from a file system.
The best solution to this takes a couple steps.

* Grep out the partition I’m interested in which reduces the file size to about 25gb.
* Split the resulting 25GB file into 2GB chunks. This allows me to load the files into memory. The box I’m using has 16GB of RAM, so loading the whole thing into memory isn’t possible with the 25GB file. With the smaller files I can.
* The server also has Dual Quad Core Xeons, so in theory… I could load 8 of the 2 GB chunks into memory at a time and run 8 separate processes to scan them in parallel, instead of trying to scan one 2GB chunk at a time with one process.
The bottleneck here would be the I/O to disk. However I’ve got an Apple X-Raid connected via Fiber Channel which is pretty quick, so it should have the throughput to handle this. Only downfall is I would probably need to right a way for the process to talk to each other, but I might be able to get away without having to do this.

Funny thing is I could write this in such a way that I could submit it to on of my Super Computers and grind it away.
My Corvus cluster has 544 processors and 544GB or RAM hehe :)
That would chew this up and spit it out quickly. Why didn’t I think of that?

55gb log files and bash

No Gravatar

I found that I need to scan a 55gb log file nearly 6000 times today. I’ve got a bash script to do the particular job which is relate to files stored in a tape silo, but if I start the process it will probably complete when I retire lol. So I’m thinking of shrinking the log file by only pulling out the information I need and the splitting that into say 500mb files and writing a script in perl to traverse the files smartly. I could also load the small files into memory to speed it up.
I always hear of people having to do this stuff and think “poor bastard”. Now I’m the poor bastard. Lol.

It’s been a while….

No Gravatar

I’ve neglected my blog for a while. I’d like to blame being insanely busy all the time.
But I guess it could be laziness that has made me neglect the blog for a while.
Anyway, here I am now, typing away on my laptop while at work.

http://www.news.com.au/story/0,27574,25879579-421,00.html

This morning on the news it was reported the Australian Federal Police arrested a number of Australian Citizens who were implicated in planning suicide terrorist attacks on Victoria based army bases. Turns out they were Somalian and part of a terrorist cell that is based in South Somalia, which has ties to Al Qaeda. Yes they had the magic word that would have the American’s ears prick up.
So here is my question. Why is it that a bunch of Somalian Terrorists get permanent residency in Australia, but I have to jump through hoops and stand on my head? Believe me this is a touchy topic for me at the moment.
Am I missing something here? I didn’t realize “suicidal terrorist” was on the Department of Immigration’s required skills list.

Recently I’ve been working to apply for my permanent residence, but I have hit a hurdle regarding my IT qualifications and experience. I need another 8 months of experience before they will certify my work experience and qualifications. So next year February, I will be able to get over the first hurdle to permanent residency. There after I need some police checks, a medical checkup and finally need to put all the documentation into DIMA (Department of Immigration Australia). Hopefully that goes well. It’s costing me a fair amount of money for the whole exercise.

Well, I need to get back to doing some work.

Cheers

Powered by WordPress | Theme: Motion by 85ideas.