Friday, July 20, 2007

Mapping device names to LUNs in Solaris 10

After a bunch of digging, I was finally able to figure out how to getthe LUN from the /dev/dsk/cNtGUIDdNsN device name. It involves using the luxadm (1m) command, and looking at the "Device Address" field. The part after the ',' is the LUN in hex. In the following example the LUN (shown in bold) is 16:

datum:~# luxadm display /dev/rdsk/c4t600601608ED80800C109FE8C4652DB11d0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c4t600601608ED80800C109FE8C4652DB11d0s2
Vendor: DGC
Product ID: RAID 3
Revision: 0219
Serial Num: APM000317000
Unformatted capacity: 20480.000 MBytes
Read Cache: Enabled
Minimum prefetch: 0x0
Maximum prefetch: 0x0
Device Type: Disk device
Path(s):

/dev/rdsk/c4t600601608ED80800C109FE8C4652DB11d0s2
/devices/scsi_vhci/ssd@g600601608ed80800c109fe8c4652db11:c,raw
Controller /devices/pci@7c0/pci@0/pci@8/SUNW,emlxs@0/fp@0,0
Device Address 5006016220600008,10
Host controller port WWN 10000000c957a610
Class primary
State ONLINE
Controller /devices/pci@7c0/pci@0/pci@8/SUNW,emlxs@0/fp@0,0
Device Address 5006016320600008,10
Host controller port WWN 10000000c957a610
Class primary
State ONLINE
Controller /devices/pci@7c0/pci@0/pci@8/SUNW,emlxs@0/fp@0,0
Device Address 5006016a20600008,10
Host controller port WWN 10000000c957a610
Class secondary
State STANDBY
Controller /devices/pci@7c0/pci@0/pci@8/SUNW,emlxs@0/fp@0,0
Device Address 5006016b20600008,10
Host controller port WWN 10000000c957a610
Class secondary
State STANDBY
Controller /devices/pci@7c0/pci@0/pci@9/SUNW,emlxs@0/fp@0,0
Device Address 5006016120600008,10
Host controller port WWN 10000000c957a3ed
Class primary
State ONLINE
Controller /devices/pci@7c0/pci@0/pci@9/SUNW,emlxs@0/fp@0,0
Device Address 5006016020600008,10
Host controller port WWN 10000000c957a3ed
Class primary
State ONLINE
Controller /devices/pci@7c0/pci@0/pci@9/SUNW,emlxs@0/fp@0,0
Device Address 5006016820600008,10
Host controller port WWN 10000000c957a3ed
Class secondary
State STANDBY
Controller /devices/pci@7c0/pci@0/pci@9/SUNW,emlxs@0/fp@0,0
Device Address 5006016920600008,10
Host controller port WWN 10000000c957a3ed
Class secondary
State STANDBY


Tuesday, July 17, 2007

15 Unfortunately Placed Ads

This is one of the funniest things I've seen in a while.

C++ is evil

Somewhere between TSM version 5.2.4 and 5.4.0 the XBSA library changed to a C++ library, which means it needed the C++ run-time libraries to run. The problem is that when using dlopen(3c) to load this library from a standard C application the C++ run-time libraries don't get loaded properly. We ran into this when our AFS backup system stopped working after we upgraded our TSM clients to 5.4.0 (bad IBM!). It turns out that ld.so.1(1) has some cool debugging flags which made finding the problem pretty easy. You can setenv LD_DEBUG to a list of parameters, run your program, and *poof*, you have all the information you need on how the dynamic libraries are loaded.

As it turns out, it was a 2 line fix to the AFS butc source code to pre-load the C++ libraries, and all is happy. The patch can be found here.

Sunday, July 15, 2007

Lamb Meatballs

Ingredients:
1 lb ground lamb
1 tbsp fresh mint, chopped
1 egg
1/3 cup bread crumbs
1 tbsp dried oregano
1/2 tbsp balsamic vinegar
1/2 tbsp crushed red pepper flakes
1/2 tsp cinnamon
salt, pepper

Directions:
Put all the ingredients in a bowl and combine with your hands until well incorporated. Form into golf ball sized balls and cook in a small amount of olive oil over medium-high heat turning regularly to brown all sides.

Links of the Day (7/15/12007)

Top 10 Things Americas Want But Can't Have

The Rise and Fall of The Simpsons

Tuesday, July 10, 2007

25 things learned in 50 years (By Dave Barry)

1. The badness of a movie is directly proportional to the number of helicopters in it.

2. You will never find anybody who can give you a clear and compelling reason why we observe daylight-saving time.

3. People who feel the need to tell you that they have an excellent sense of humor are telling you that they have no sense of humor.

4. The most valuable function performed by the federal government is entertainment.

5. You should never say anything to a woman that even remotely suggests you think she's pregnant unless you can see an actual baby emerging from her at that moment.

6. A penny saved is worthless.

7. They can hold all the peace talks they want, but there will never be peace in the Middle East. Billions of years from now, when Earth is hurtling toward the Sun and there is nothing left alive on the planet except a few microorganisms, the microorganisms living in the Middle East will be bitter enemies.

8. The most powerful force in the universe is gossip.

9. The one thing that unites all human beings, regardless of age, gender, religion, economic status, or ethnic background, is that, deep down inside, we all believe that we are above-average drivers.

10. There comes a time when you should stop expecting other people to make a big deal about your birthday. That time is age 11.

11. There is a very fine line between "hobby" and "mental illness."

12. People who want to share their religious views with you almost never want you to share yours with them.

13. There apparently exists, somewhere in Los Angeles, a computer that generates concepts for television sitcoms. When TV executives need a new concept, they turn on this computer; after sorting through millions of possible plot premises, it spits out, "THREE QUIRKY BUT ATTRACTIVE YOUNG PEOPLE LIVING IN AN APARTMENT," and the executives turn this
concept into a show. The next time they need an idea, the computer spits out, "SIX QUIRKY BUT ATTRACTIVE YOUNG PEOPLE LIVING IN AN APARTMENT." Then the next time, it spits out, "FOUR QUIRKY BUT ATTRACTIVE YOUNG PEOPLE LIVING IN AN APARTMENT." And so on. We need to locate this computer and destroy it with hammers.

14. Nobody is normal.

15. At least once per year, some group of scientists will become very excited and announce that:
* The universe is even bigger than they thought!
* There are even more subatomic particles than they thought!
* Whatever they announced last year about global warming is wrong.

16. If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be "meetings."

17. The main accomplishment of almost all organized protests is to annoy people who are not in them.

18. The value of advertising is that it tells you the exact opposite of what the advertiser actually thinks. For example:
* If the advertisement says "This is not your father's Oldsmobile," the advertiser is desperately concerned that this Oldsmobile, like all other Oldsmobiles, appeals primarily to old farts like your father.
* If Coke and Pepsi spend billions of dollars to convince you that there are significant differences between these two products, both companies realize that Pepsi and Coke are virtually identical.
* If the advertisement strongly suggests that Nike shoes enable athletes to perform amazing feats, Nike wants you to disregard the fact that shoe brand is unrelated to athletic ability.
* If Budweiser runs an elaborate advertising campaign stressing the critical importance of a beer's "born-on" date, Budweiser knows this factor has virtually nothing to do with how good a beer tastes.

19. If there really is a God who created the entire universe with all of its glories, and He decides to deliver a message to humanity, He will not use, as His messenger, a person on cable TV with a bad hairstyle.

20. You should not confuse your career with your life.

21. A person who is nice to you, but rude to the waiter, is not a nice person.

22. No matter what happens, somebody will find a way to take it too seriously.

23. When trouble arises and things look bad, there is always one individual who perceives a solution and is willing to take command. Very often, that individual is crazy.

24. Your friends love you anyway.

25. Nobody cares if you can't dance well. Just get up and dance.

Sunday, July 8, 2007

Zombie Food Pyramid

Who knew zombies had to eat right too?

Monday, July 2, 2007

Best. Idea. Ever.

7-11 has changed 11 of their stores in the US to resemble a Kwik-E-Mart for the upcoming release of The Simpsons movie, and one of them just happens to be right down the street from College Park. Of course I had to use my lunch break to go down there and take a few pictures, as well as buy a squishee.

Pictures are available here.

Sunday, July 1, 2007

Sorting MP3s

I've spent most of the evening sorting through my mp3s with a program called Music Brainz. It works by taking fingerprints of each of your mp3s, and then comparing that information against it's database. It can figure out what songs you have, even if the filenames or ID3 tags are wrong or missing. It's also great for normalizing the names of your mp3s so they show up properly in your iPod (You no longer have 3 different spellings for 2pac).