{"id":282,"date":"2010-10-19T17:46:13","date_gmt":"2010-10-19T23:46:13","guid":{"rendered":"http:\/\/benincosa.com\/blog\/?p=282"},"modified":"2014-11-19T11:25:59","modified_gmt":"2014-11-19T17:25:59","slug":"using-the-hp-array-configuration-utility-cli-for-linux","status":"publish","type":"post","link":"https:\/\/benincosa.com\/?p=282","title":{"rendered":"Using the HP Array Configuration Utility CLI for Linux"},"content":{"rendered":"<p>This week I took part in an installation where we got a large amount of HP BL460c G6 blades sent to us.\u00a0 One of the daunting tasks was to configure the RAID.\u00a0 The normal thing I see is people waiting for the BIOS to pop up, press F8 or some other trickery of keystrokes to finally get to the RAID menu and configure it.\u00a0 I&#8217;m cool doing this one time.\u00a0 I might even do this two times.\u00a0 But at some point a man has got to define a limit to doing mundane repetitive tasks that are better done by computers.<\/p>\n<p>A good guy I know is a dude named Johnny.\u00a0 He pointed me to this link of the <a href=\"http:\/\/h20000.www2.hp.com\/bizsupport\/TechSupport\/SoftwareIndex.jsp?lang=en&amp;cc=us&amp;prodNameId=3884099&amp;prodTypeId=3709945&amp;prodSeriesId=3884098&amp;swLang=13&amp;taskId=135&amp;swEnvOID=4004#78221\">hpacucli<\/a>.\u00a0 I still don&#8217;t know how he found the link.\u00a0 His google-foo is better than mine I suppose.<\/p>\n<p>This program can be installed on a Linux machine and then the RAID can be configured.\u00a0 But you&#8217;re telling me:\u00a0 &#8216;Chicken and Egg problem!&#8217; How do you run a program on the OS to configure the RAID when you need an OS installed on the RAID to run the program?\u00a0 Simple:\u00a0 You netboot the machines with a stateless image so that the OS is in memory and doesn&#8217;t require hard drives.\u00a0 Too bad for you that you probably don&#8217;t have<a href=\"http:\/\/xcat.sf.net\"> xCAT<\/a>.\u00a0 Cause I do, and I use it without reservation.\u00a0 And since I have it, it took me 5 minutes to create a stateless image that booted up on the servers. (I&#8217;ll tell you how to do that at the end of this little writeup).<\/p>\n<p>Once the machine booted up I ran the command to get the status:<\/p>\n<pre># hpacucli ctrl slot=0 logicaldrive all show status<\/pre>\n<p>Probably nothing happening since I haven&#8217;t done anything yet.\u00a0 So I took at a look at the physical drives:<\/p>\n<pre># hpacucli ctrl slot=0 pd all show\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\r\n\r\nSmart Array P410i in Slot 0 (Embedded)\r\n\r\n unassigned\r\n\r\n physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)\r\n physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)<\/pre>\n<p>So then I just made a RAID1 on those disks:<\/p>\n<pre># hpacucli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=1<\/pre>\n<p>I rebooted the blade into ESXi4.1 kickstart and all was bliss.\u00a0 But then I got even more gnarley.\u00a0 I didn&#8217;t want to log into each blade and run that command.\u00a0 So \u00a0 I used xCAT&#8217;s psh to update them all:<\/p>\n<pre># psh vhost004-vhost048 'hpacucli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=1'<\/pre>\n<p>Boom!\u00a0 Instant RAID.\u00a0 Now check them:<\/p>\n<pre># psh vhost003-vhost048 'hpacucli ctrl slot=0 logicaldrive all show status'\r\nvhost003: \r\nvhost003:\u00a0\u00a0\u00a0 logicaldrive 1 (136.7 GB, RAID 1): OK\r\nvhost003: \r\nvhost005: \r\nvhost005:\u00a0\u00a0\u00a0 logicaldrive 1 (136.7 GB, RAID 1): OK\r\nvhost005: \r\nvhost004: \r\nvhost004:\u00a0\u00a0\u00a0 logicaldrive 1 (136.7 GB, RAID 1): OK\r\nvhost004:\r\n...<\/pre>\n<p>I&#8217;ve used this technique with IBM blades in the past as well.\u00a0 Now all my blades are installed with ESXi 4.1 and I didn&#8217;t have to wait through any nasty BIOS boot up menus.\u00a0 I&#8217;ve also automated this in the past by sticking this script in the<\/p>\n<h2>xCAT image creation for HP 460c G6<\/h2>\n<p>This is fairly easy.\u00a0 First, create or modify the \/opt\/xcat\/share\/xcat\/netboot\/centos\/compute.pkglist so that it looks like this:<\/p>\n<pre>bash\r\nnfs-utils\r\nopenssl\r\ndhclient\r\nkernel\r\nopenssh-server\r\nopenssh-clients\r\nbusybox-anaconda\r\nwget\r\nrsync\r\nlibgcc.i386\r\nlibgcc.x86_64\r\nlibstdc++.x86_64\r\nlibstdc++.i386<\/pre>\n<p>Next, run &#8216;genimage&#8217;.\u00a0 The trick with the HP Blades is to add the &#8216;bnx2x&#8217; driver.\u00a0 Once you&#8217;re done with this, install the hpacucli RPM in the stateless image:<\/p>\n<pre># rpm -Uivh hpacucli-8.60-8.0.noarch.rpm -r \/install\/netboot\/centos5.5\/x86_64\/compute\/rootimg<\/pre>\n<p>Once this is done, run:<\/p>\n<pre># packimage -p compute -a x86_64 -o centos5.5<\/pre>\n<p>Then a simple:<\/p>\n<pre># nodeset vhost001 netboot=centos5.5-x86_64-compute\r\n# rpower vhost001<\/pre>\n<p>will install the nodes to this image.\u00a0 That&#8217;s it, then you can run the commands above to get the RAID set up.<\/p>\n<p>Bonus points:\u00a0 Then<a href=\"http:\/\/sumavi.com\/chapters\/vmware\"> install ESXi 4.1 with xCAT.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>hpacucli, bl460c g6,configure raid,xCAT<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[94,986,916],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/282"}],"collection":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=282"}],"version-history":[{"count":4,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":2806,"href":"https:\/\/benincosa.com\/index.php?rest_route=\/wp\/v2\/posts\/282\/revisions\/2806"}],"wp:attachment":[{"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benincosa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}