{"id":384,"date":"2014-05-28T17:13:42","date_gmt":"2014-05-28T17:13:42","guid":{"rendered":"https:\/\/www.nicktailor.com\/?p=384"},"modified":"2022-10-21T11:55:21","modified_gmt":"2022-10-21T11:55:21","slug":"how-to-move-off-san-boot-to-local-disk-with-hp-servers","status":"publish","type":"post","link":"https:\/\/nicktailor.com\/tech-blog\/how-to-move-off-san-boot-to-local-disk-with-hp-servers\/","title":{"rendered":"How to move off san boot to local disk with HP servers"},"content":{"rendered":"<p><strong>How to move off san boot to local disk<\/strong><br \/>\n===========================<br \/>\n1. add the disks to the server<br \/>\nnext do a rescan-scsi-bus.sh to see if the new disks show up<\/p>\n<p>2. Setup the Raid controler f8 (hp)<br \/>\n3. Boot off of system rescue cd<br \/>\n4. find the new drive, use<em> fdisk -l&nbsp;<\/em><br \/>\n5. copy partition over using dd and reboot to see new parition table<\/p>\n<p><strong>Examples:<\/strong><\/p>\n<ul>\n<li><em>dd if=\/dev\/mapper\/3600508b4000618d90000e0000b8f0000 of=\/dev\/sda bs=1M<br \/>\n<strong>or&nbsp;<\/strong><\/em><\/li>\n<li><em>dd if=\/dev\/sdar of=\/dev\/cciss\/c0d0 bs=1M<\/em><\/li>\n<\/ul>\n<p><em><strong>reboot unpresent the SAN&#8217;s from virtual connect or whatever storage interface your using.<br \/>\nYou&nbsp;need to have the boot from san volumes disabled in VCEM<\/strong><\/em><\/p>\n<p>6. make new swap using cfdisk and then run<\/p>\n<ul>\n<li><em>mkswap \/dev\/cciss\/c0d0p9 <\/em><em>&nbsp;(This controller0 drive0 Parititon 9)&nbsp;<\/em><\/li>\n<li><em style=\"color: #333333;\">The size of the swap partition will vary, I used 32000M when i created it in cfdisk, you are free to use fdisk to do this also.<\/em><\/li>\n<\/ul>\n<p>7. now you need to mount \/ to a directory, so make a empty directory<\/p>\n<ul>\n<li>mkdir \/mnt\/root<br \/>\nand mount it, examples below<br \/>\n<em>mount \/dev\/sda6 \/mnt\/root<\/em> <strong>or<\/strong> <em>mount \/dev\/cciss\/c0d0p6 \/mnt\/root<\/em><\/li>\n<\/ul>\n<p>9. fix the fstab (cfdisk works great for this if your system rescue disk)<\/p>\n<ul>\n<li><em>vi \/mnt\/root\/etc\/fstab<\/em><\/li>\n<li>change \/dev\/mapper\/mpath0p* to cciss\/c0d0*<\/li>\n<li>comment out the swap volume<\/li>\n<li>add new swap (\/dev\/cciss\/c0d0p9)<\/li>\n<\/ul>\n<p>10. next fix vi \/mnt\/root\/etc\/multipath.conf<\/p>\n<ul>\n<li>uncomment: devnode &#8220;^cciss!c[0-9]d[0-9]*&#8221;<\/li>\n<li>for EMC add:<\/li>\n<\/ul>\n<p>device {<br \/>\nvendor &#8220;EMC&#8221;<br \/>\nproduct &#8220;Invista&#8221;<br \/>\nproduct_blacklist &#8220;LUNZ&#8221;<br \/>\ngetuid_callout &#8220;\/sbin\/scsi_id -g -u -s \/block\/%n&#8221;<br \/>\nfeatures &#8220;0&#8221;<br \/>\nhardware_handler &#8220;0&#8221;<br \/>\npath_selector &#8220;round-robin 0&#8221;<br \/>\npath_grouping_policy multibus<br \/>\nrr_weight uniform<br \/>\nno_path_retry 5<br \/>\nrr_min_io 1000<br \/>\npath_checker tur<br \/>\n}<\/p>\n<p>11. next mount the boot parition<\/p>\n<p><strong>Examples<\/strong><\/p>\n<ul>\n<li><em>mount \/dev\/sda1 \/mnt\/root\/boot<\/em><br \/>\n<strong>or&nbsp;<\/strong><\/li>\n<li><em>mount \/dev\/cciss\/c0d0p1 \/mnt\/root\/boot<\/em><\/li>\n<\/ul>\n<p>12. edit grub.conf<\/p>\n<ul>\n<li>vi \/mnt\/root\/boot\/grub.conf<\/li>\n<li>change \/dev\/mapper\/mpath0p* to \/dev\/sda*<br \/>\n<strong>or&nbsp;<\/strong><\/li>\n<li>change \/dev\/mapper\/mpath0p* to \/dev\/cciss\/c0d0<\/li>\n<\/ul>\n<p>13. edit device.map<\/p>\n<ul>\n<li>vi \/mnt\/root\/boot\/device.map<\/li>\n<li>change \/dev\/mapper\/mpath0 to \/dev\/sda<br \/>\n<strong>or&nbsp;<\/strong><\/li>\n<li>change \/dev\/mapper\/mpath0 to \/dev\/cciss\/c0d0<\/li>\n<\/ul>\n<p>14. fix the initrd<\/p>\n<ul>\n<li>zcat \/mnt\/root\/boot\/initrd-2.6.18-3&#8230;&#8230;. | cpio -i -d<\/li>\n<li>edit the file &#8216;init&#8217;<\/li>\n<li>change mkrootdev line to \/dev\/cciss\/c0d0p6 (this is the is \/ partition)<\/li>\n<li>change resume line to \/dev\/cciss\/c0d0p9 (this is the new swap partition)<\/li>\n<\/ul>\n<p>15. Make a backup of the new partition<\/p>\n<ul>\n<li>mv \/mnt\/root\/boot\/initrd-2.6.18-&#8230;. \/mnt\/root\/boot\/initrd-2.6.18-&#8230;&#8230;backup<\/li>\n<\/ul>\n<p>16. recompress the new initrd<\/p>\n<ul>\n<li>find . | cpio -o -H newc |gzip -9 &gt; \/mnt\/root\/boot\/initrd-2.6.18-348.2.1.el5.img<\/li>\n<\/ul>\n<p>17. upon reboot, change the boot order in the bios settings to use the hp smart array controller<\/p>\n<p>18. You may need to create a new inird using the redhat linux distro if the initrd doesnt boot.<\/p>\n<ul>\n<li>chroot to \/mnt\/sysimage for \/<\/li>\n<li>then go to the boot parition and<\/li>\n<li>mkinitrd -f -v initrd-2.6.18-53.1.4.el5.img 2.6.18-53.1.4.el5<\/li>\n<\/ul>\n<p>19. reboot<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to move off san boot to local disk =========================== 1. add the disks to the server next do a rescan-scsi-bus.sh to see if the new disks show up 2. Setup the Raid controler f8 (hp) 3. Boot off of system rescue cd 4. find the new drive, use fdisk -l&nbsp; 5. copy partition over using dd and reboot to<a href=\"https:\/\/nicktailor.com\/tech-blog\/how-to-move-off-san-boot-to-local-disk-with-hp-servers\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,125,138,27],"tags":[],"class_list":["post-384","post","type-post","status-publish","format-standard","hentry","category-centos","category-diskstuff","category-linux","category-san-boot-to-local-disks"],"_links":{"self":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=384"}],"version-history":[{"count":9,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/384\/revisions"}],"predecessor-version":[{"id":1616,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/384\/revisions\/1616"}],"wp:attachment":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}