Unixclubhouse PodcastStatisticsLast entry: 2012-05-11 23:48
4 entries written
0 comments have been made
Top Referrersforum.codecall.net (2)
www.google.com (1) |
HP-UX SAS controller tipFriday, May 11. 2012
This entry has to do with work and HP-UX...
The past few days I've had to work with firmware configurable raid 1 (mirror) arrays. I administer a number of HP-UX enterprise Itanium based Integrity servers which each have SAS (serial attached SCSI) interfaces model (HP 8 Internal Port SAS Controller w/ raid). This controller supports 2 raid 1 mirror arrays with a spare, but I've decided to break the mirrors (oh no, 7 years bad luck) and experiment with the controller prior to the boot disk upgrades (replacing 72 gig. dual-port 15k SAS drives with 146 gig. versions). This may not seem like much space, but all the data is stored on a SAN (Storage Area Network) via fiber channel interfaces. When you add a single new drive (any location) a new raid 1 logical drive is created in degraded status as there is only 1 disk of a 2 disk mirror configuration. When you remove this disk, the logical drive is NOT removed which is very important as Checking your raid status: #> sasmgr -N get_info -D /dev/sasd0 -q raid All changes to the raid logical drives is accomplished via firmware so you need to boot to the EFI shell> drvcfg -s If you delete a logical drive that contains a single or pair of disks which is a destructive process all references to the disks are lost so HP-UX no longer sees these devices, however they can be recovered with data intact. Boot to the EFI shell> map You should see the drive(s) as FS0 or FS2, etc... EFI shell> fs0: EFI shell> cd EFI EFI shell> cd HPUX EFI shell> hpux.efi (boots the kernel file) Once the kernel is booted #> ioscan -fnNC disk #> setboot -p (primary) or -a (alternate) /dev/disk/diskX (X should be what you got back from ioscan) Once you have used setboot the references should be fixed, so you can reboot normally. In addition, I normally make a clone (dd) of the boot disk and set that to alternate boot. #> dd if=/dev/rdisk/disk1 bs=1024k of=/dev/rdisk/disk2 Just a little tip on working with the SAS controller. After EFI shell> drvcfg -s firmware options such as, creating and deleting arrays is menu driven and user friendly. ADDITIONAL NOTE: You probably want to clean up your lvmtab file as it still contains the old array info and if vg00 is your volume group then... #> mv /etc/lvmtab /etc/lvmtab.bak #> mv /etc/lvmtab_p /etc/lvmtab_p.bak #> vgscan -k -f /dev/vg00 #> lvlnboot -R /dev/vg00 #> lvlnboot -v (to verify the new settings) Dogs, you got to love um...Wednesday, May 9. 2012Life with 3 dogs can be a heck of a ride... Awesome most of the time, but every now and then...
OK, about 2 weeks ago I decided to grow a new lawn from seed (most of the front and some of the back). Not sure what I was thinking at the time, but charged ahead with 6 yards of nice dark topsoil, 3 bags of tall fescue grass seed and all day shoveling, raking, tree pruning, watering, etc... After finishing the back, I let the dogs out and kept working around the front. My better half comes home a few hours later and she lets the dogs in... Of course all 3 dogs had been rolling and running around in the the recently watered topsoil so they proceeded to track mud all over the house, muddy paw prints were everywhere, which of course was MY fault. In order for the seed to sprout, I had to water the "dirt" each day and of course those lovable dogs would roll around in it and track it all over the house. If I wasn't in the dog house over the topsoil thing, I was most certainly in it over the new dog food thing. You see, I'm an avid "low-carber" and (in my infinite wisdom) decided to get the lowest carb dog food I could find (EVO http://www.evopet.com/ ). We started mixing the new food in at about 60 or 70%, they absolutely loved it, but I realize now we should have mixed it in at about 20 to 30% because one of them got sick all over the rug and of course got sick again (all over the rug) on the second day. We're up to 100% on the new food now and they have fully adjusted, but the rug may never be the same and of course, that was MY fault also.
A Simple Bash Weather ScriptSunday, May 6. 2012A while back, I wrote this script using the Google weather API (Application Programming Interface). I think it's a pretty good example of using SED (Stream Editor), GREP (Global Regular Expression Print), WGET (World Wide Web Get) and shell variables. I'll break down each part and do my best to explain how it works. #!/bin/bash echo -n "Enter a valid 5-digit zipcode: " read zipcode var_url="http://www.google.com/ig/api?weather=$zipcode&hl=en" var_weather_wget=`wget -q $var_url -O -` var_weather_xml=`echo "$var_weather_wget" | sed 's/<forecast_conditions>.*//'` var_weather=`echo "$var_weather_xml" | sed 's/></>\n</g'` var_date=`echo "$var_weather" | grep -e '<forecast_date' | \ sed -e 's/<forecast_date data="//' -e 's/"\/>//'` var_city=`echo "$var_weather" | grep -e '<city' | \ sed -e 's/<city data="//' -e 's/"\/>//'` var_condition=`echo "$var_weather" | grep -e '<condition' | \ sed -e 's/<condition data="//' -e 's/"\/>//'` var_temp_f=`echo "$var_weather" | grep -e '<temp_f' | \ sed -e 's/<temp_f data="//' -e 's/"\/>//'` var_temp_c=`echo "$var_weather" | grep -e '<temp_c' | \ sed -e 's/<temp_c data="//' -e 's/"\/>//'` var_humidity=`echo "$var_weather" | grep -e '<humidity' | \ sed -e 's/<humidity data="//' -e 's/"\/>//'` var_wind=`echo "$var_weather" | grep -e '<wind' | \ sed -e 's/<wind_condition data="//' -e 's/"\/>//'` echo "Date: $var_date" echo "City: $var_city" echo "Condition: $var_condition" echo "Temp: $var_temp_f Deg. Fahrenheit / $var_temp_c Deg. Celsius" echo "$var_humidity" echo "$var_wind" #!/bin/bash
echo -n "Enter a valid 5-digit zipcode: " The (read) command reads a line from standard input. The (zipcode) is simply the name of the variable where the input will be saved. Once the read command is executed, the script stops until it receives input (which ends with the <enter> key), so in this example, the script is waiting for a zipcode which will be saved into a variable called zipcode. Once the input is saved, it can be retrieved by using the ($) and variable name, ($zipcode).
var_url="http://www.google.com/ig/api?weather=$zipcode&hl=en"
var_weather_wget=`wget -q $var_url -O -` var_weather_xml=`echo "$var_weather_wget" | sed 's/<forecast_conditions>.*//'` svar_weather=`echo "$var_weather_xml" | sed 's/></>\n</g'` var_date=`echo "$var_weather" | grep -e '<forecast_date' | \ echo "Date: $var_date"
New Blog and Forum for Unixclubhouse.comThursday, May 3. 2012Welcome to the Unix Clubhouse Blog. Initially the unixclubhouse.com website was completely hand coded with the exception of a Simple Machines Forum, but maintenance became time consuming and what once was an enjoyable experiment soon became a After a friend of mine noticed and sent me an email (thanks), I decided to start over.
This time I chose to take advantage of a few open source software projects and use their infrastructure to easily maintain this site. My initial requirements were a simple blog and forum which could both use a SQLite Serendipity CMS for the blog as well as the initial landing site and FUDforum for the site forum. Not only did these projects both support a SQLite backend, but they offer excellent customizing capabilities. I was
This is only the first blog post, so time will tell if I chose wisely or poorly, but I'm already enjoying the reduction in website maintenance time... I might even crunch out a podcast in the near future and get UPDATE: 5/9/2012 -- I've decide to drop the forum and replace it with something like a custom tag cloud, not sure yet...
(Page 1 of 1, totaling 4 entries)
|
QuicksearchSyndicate This BlogCategoriesCalendarArchivesBlog Administration |


