Blog – A Daily Dose of Power https://ddpwr.com IBM Power Systems and the Like Tue, 27 May 2014 20:40:41 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.3 AIX RPM Dependency Hell https://ddpwr.com/2014/05/aix-rpm-dependency-hell/ Tue, 27 May 2014 20:40:41 +0000 http://ddpwr.com/?p=166 Anyone that’s ever worked in a mixed OS environment has surely encountered a time when they’ve needed to install rpm’s on AIX. Whether is was to get the latest GNU version of utilities for more flexible scripting, to support 3rd party monitoring tools, or because you’re developers were too lazy to properly compile installp bundles, we’ve almost all been there. It does, however, seem as if IBM added the rpm support and then has been on vacation ever since. The single most annoying limitation is the lack of dependency resolution. RPM “a” requires rpm’s “a-l” and each of those rpm’s require others, and it goes on and on and on. A simple port of YUM would be stupendous, but alas, we are left without. One man, Michael Perzl, of “http://www.perzl.org/” has graciously supported maintaining various rpm’s compiled for AIX and has even taken some great strides to setting up an infrastructure to support rpm dependency trees for AIX. Michael has setup the rpm distribution and has programmatically generated some dependency lists for those rpm’s. The last remaining step of the rpm dependency hell resolution is to have dependency lists for all rpm’s in the tree sorted and downloaded automatically. I think I’ve fixed the final piece with a script that recursively calls a function to build a list and download all unique rpm’s in the tree.. I’ve tested locally to much success, but as always, feel free to try it out and let me know if anything breaks. My tools are meant to be free, open, and a product of the larger Power community, so I’ve added this out to GitHub to make distribution easier.

Let me know if you have any questions or additions/corrections.

 

AIX RPM Dependency Script at GitHub

 

Joe Searcy is a UNIX Systems Engineer living in Atlanta, GA. He’s an avid Power Systems enthusiast with a very diverse IT background. He’s a Certified IBM Systems Administrator for AIX 6.1, and is the founder of this site. In addition to promoting the Power Systems community, Joe enjoys working with Open Source software and currently contributes on a few projects.
]]>
Scripts to the Rescue! https://ddpwr.com/2014/03/scripts-to-the-rescue/ Sat, 08 Mar 2014 02:22:05 +0000 http://ddpwr.com/?p=161 It’s been a while since I’ve added anything new to the site, but hopefully that will change soon. I’m no longer traveling every week and I’m back in a Production Shop so I should be able to generate some juicy content! While you all wait for that, I’m uploaded some scripts I’ve written for various things here and there to GitHub. Some are polished and have a good amount of logic….some are NOT! Feel free to peruse and hopefully they can be of use to someone out there.

https://github.com/jmsearcy/scripts/tree/master/AIX

 

I will eventually move these to a dedicated DDPWR GitHUb account, but they will be under my personal account for now. If you have any personal scripts you’re fond of, feel free to shoot them this way and I can add them to the collection (or add you to the repo on GitHub).

Enjoy!

]]>
Migrating an LV from one VG to another https://ddpwr.com/2012/02/migrating-an-lv-from-one-vg-to-another/ https://ddpwr.com/2012/02/migrating-an-lv-from-one-vg-to-another/#comments Thu, 09 Feb 2012 05:16:09 +0000 http://ddpwr.com/?p=123 In a perfect world you define a standard build (Golden Image), deploy it, and then let it be, never touching it again…..right? If you can answer “yes” to this, I’d like to shake your hand. In most of the environments I’ve worked in, even the term “standard” is relative. You have a patches that are released, configs that change, and technology that gets updated or made obsolete. There are many forces that would cause your beloved golden image to be made “null and void”. That being said, you sometimes have to revisit older machines deployed in the beginning and bring them up to new standards.

In a few environments, you may even be faced with picking up the pieces where other, less skilled folk, may have been in charge. This can often leave you scratching your head asking, “What in the heck were they thinking…” One common scenario I’ve encountered is when someone built the system and included application/database volumes within “rootvg”. Although not a complete wreck, I highly recommend not doing this, for more reasons than it’s worth to explain. This leads me to the topic if this post, how to migrate a logical volume from one volume group to another. Let’s dive in:

 
NOTE: This example shows how to migrate the “optopenv” LV from “rootvg’ to “nbuvg” and renames the LV to “nbu_optopenv_lv”

 

Create new VG (or use an existing VG)

$ mkvg -S -y [vgname] -s [pp size in MB] [pv1] [pv2] ...

EXAMPLE:

$ mkvg -S -y nbuvg -s 512 hdisk3

Copy the LV to the new VG

NOTE: The LV being copied needs to be inactive for this, please make sure the associated FS is unmounted

$ cplv -v [new vg] [lv name]

EXAMPLE:

$ cplv -v nbuvg optopenv

NOTE: The new LV will have a generic name similar to “lv00”

Setup LV log

– For inline log FS’s

$ logform /dev/[lvname]

EXAMPLE:

$ logform /dev/lv00

– For external log

$ mklv -t jfs2log [vg name] 1

EXAMPLE:

$ mklv -t jfs2log nbuvg 1

NOTE: this will create a new log LV similar to “loglv00”

$ logform /dev/loglv00

Change the FS to reference the new log

– For inline log FS’s

$ chfs -a /dev/[lv name] -a log=INLINE /filesystem

EXAMPLE:

$ chfs -a /dev/lv00 -a log=INLINE /opt/openv

– For external log FS’s

$ chfs -a /dev/[lv name] -a log=/dev/[log lv name] /filesystem

EXAMPLE:

$ chfs -a /dev/lv00 -a log=/dev/loglv00 /opt/openv

Perform a FS integrity check

$ fsck -p /dev/[lv name]

EXAMPLE:

$ fsck -p /dev/lv00

NOTE: It is common to receive errors after running fsck -p /dev/lvname prior to mounting the filesystem.
These errors are due to a known bug that development is currently aware of and which will be resolved in a future release of AIX.
Once the filesystem is mounted, a future fsck with the filesystem unmounted should no longer produce an error.

Mount the FS

$ mount /[fs name]

EXAMPLE:

$ mount /opt/openv

Remove old LV

$ rmlv [old lv name]

EXAMPLE:

$ rmlv optopenv

Rename new LV

$ chlv -n [new name] [old name]

EXAMPLE:

$ chlv -n nbu_optopenv_lv lv00

 

Joe Searcy is a UNIX Systems Engineer living in Atlanta, GA. He’s an avid Power Systems enthusiast with a very diverse IT background. He’s a Certified IBM Systems Administrator for AIX 6.1, and is the founder of this site. In addition to promoting the Power Systems community, Joe enjoys working with Open Source software and currently contributes on a few projects.
]]>
https://ddpwr.com/2012/02/migrating-an-lv-from-one-vg-to-another/feed/ 1
DDPWR is now on Twitter! https://ddpwr.com/2011/11/ddpwr-is-now-on-twitter/ Thu, 01 Dec 2011 02:34:46 +0000 http://ddpwr.com/?p=88 You can now follow DDPWR on Twitter: @ddpwr

We’ll tweet a link for all new articles posted to give you even more ways to access our content.

 

 

 

 

Joe Searcy is a UNIX Systems Engineer living in Atlanta, GA. He’s an avid Power Systems enthusiast with a very diverse IT background. He’s a Certified IBM Systems Administrator for AIX 6.1, and is the founder of this site. In addition to promoting the Power Systems community, Joe enjoys working with Open Source software and currently contributes on a few projects.
]]>