{"id":112,"date":"2009-10-20T10:34:30","date_gmt":"2009-10-20T15:34:30","guid":{"rendered":"http:\/\/www.hpux.ws\/?p=112"},"modified":"2009-10-20T10:42:35","modified_gmt":"2009-10-20T15:42:35","slug":"hp-ux-integrity-software-mirror-procedure","status":"publish","type":"post","link":"http:\/\/www.hpux.ws\/?p=112","title":{"rendered":"HP-UX Integrity Software mirror procedure"},"content":{"rendered":"<p>This was written by a former colleague. It is better than anything else I have seen. SEP<\/p>\n<p>Mirroring a Boot Disk with LVM on HP-UX 11i for HP Integrity<\/p>\n<p>Servers<\/p>\n<p>The following diagram shows the disk layout of a boot disk. The disk<\/p>\n<p>contains a Master Boot Record (MBR) and Extensible Firmware<\/p>\n<p>Interface (EFI) partition tables that point to each of the partitions. The<\/p>\n<p><strong>idisk<\/strong><\/p>\n<p>command is used to create the partitions (see <em>idisk <\/em><em>(1M)).<\/em><em><\/em><\/p>\n<p><em>Figure 6-5 Example LVM Disk Layout on HP Integrity Server<\/em><\/p>\n<p><em>Before starting the procedure, make sure that add-on product HP<\/em><\/p>\n<p><em>MirrorDisk\/UX (B5403BA) is installed. This product is an extra-cost<\/em><\/p>\n<p><em>product available on the HP-UX 11i application release media. For<\/em><\/p>\n<p><em>example:<\/em><\/p>\n<p><strong><em>swlist -l fileset | grep -i mirror<\/em><\/strong><em><\/em><\/p>\n<p><em>LVM.LVM-MIRROR-RUN B.11.22 LVM Mirror<\/em><\/p>\n<p><em>Step 1.<\/em><\/p>\n<p><em>file.<\/em><\/p>\n<p><em>Partition the disk using the <\/em><em>idisk <\/em><em>command and a partition description<\/em><em><\/em><\/p>\n<p><em>a.<\/em><\/p>\n<p><em>Create a partition description file. For example:<\/em><em><\/em><\/p>\n<p><strong><em>vi \/tmp\/idf<\/em><\/strong><em><\/em><\/p>\n<p><em>In this example the partition description file contains:<\/em><\/p>\n<p><em>3<\/em><\/p>\n<p><em>EFI 500MB<\/em><\/p>\n<p><em>HPUX 100%<\/em><\/p>\n<p><em>HPSP 400MB<\/em><\/p>\n<p><em>NOTE<\/em><\/p>\n<p><em>an EFI partition, an HP-UX partition, and an HP Service partition.<\/em><\/p>\n<p><em>Boot disks of earlier HP Integrity Servers may have an EFI partition<\/em><\/p>\n<p><em>of only 100MB and may not contain the HPSP partition.<\/em><\/p>\n<p><em>The values in the example represent a boot disk with three partitions:<\/em><em><\/em><\/p>\n<p><em>b.<\/em><\/p>\n<p><em>Partition the disk using <\/em><em>idisk <\/em><em>and your partition description file:<\/em><em><\/em><\/p>\n<p><strong><em>idisk -f \/tmp\/idf -w \/dev\/rdsk\/c3t1d0<\/em><\/strong><em><\/em><\/p>\n<p><em>c.<\/em><\/p>\n<p><em>To verify you can run:<\/em><em><\/em><\/p>\n<p><strong><em>idisk \/dev\/rdsk\/c3t1d0<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 2.<\/em><\/p>\n<p><em>the partitions. For example:<\/em><\/p>\n<p><em>Use the <\/em><em>insf <\/em><em>command with the <\/em><em>-e <\/em><em>option to create the device files for all<\/em><em><\/em><\/p>\n<p><strong><em>insf -e -H 0\/18\/1\/2\/0.0.1.0<\/em><\/strong><em><\/em><\/p>\n<p><em>You should now have eight device files for this disk:<\/em><\/p>\n<p><em>\/dev\/[r]dsk\/c?t?d?<\/em><\/p>\n<p><em>(This refers to the entire disk)<\/em><\/p>\n<p><em>\/dev\/[r]dsk\/c?t?d?s1<\/em><\/p>\n<p><em>(This refers to the EFI partition)<\/em><\/p>\n<p><em>\/dev\/[r]dsk\/c?t?d?s2<\/em><\/p>\n<p><em>(This will be the HP-UX partition)<\/em><\/p>\n<p><em>\/dev\/[r]dsk\/c?t?d?s3<\/em><\/p>\n<p><em>(This refers to the Service partition)<\/em><\/p>\n<p><em>Step 3.<\/em><\/p>\n<p><em>disk:<\/em><\/p>\n<p><em>Use <\/em><em>pvcreate <\/em><em>to make the HP-UX partition of the disk an LVMmanaged<\/em><em><\/em><\/p>\n<p><strong><em>pvcreate -B \/dev\/rdsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 4.<\/em><\/p>\n<p><em>Add the disk to <\/em><em>vg00<\/em><em>:<\/em><em><\/em><\/p>\n<p><strong><em>vgextend vg00 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 5.<\/em><\/p>\n<p><em>Place the boot files on the disk using <\/em><em>mkboot<\/em><em>:<\/em><em><\/em><\/p>\n<p><strong><em>mkboot -e -l \/dev\/rdsk\/c3t1d0<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 6.<\/em><\/p>\n<p><em>Copy any autoboot file from the original boot disk to this one.<\/em><em><\/em><\/p>\n<p><em>a.<\/em><\/p>\n<p><em>partition to the current directory. Make sure to use the device file<\/em><\/p>\n<p><em>with the<\/em><\/p>\n<p><em>Use <\/em><em>efi_cp <\/em><em>to copy the <\/em><em>AUTO <\/em><em>file from the original boot disk\u2019s EFI<\/em><em>s1 <\/em><em>suffix, as it refers to the EFI partition:<\/em><em><\/em><\/p>\n<p><strong><em>efi_cp -d \/dev\/rdsk\/cntndns1 -u \/efi\/hpux\/auto .\/AUTO<\/em><\/strong><em><\/em><\/p>\n<p><em>b.<\/em><\/p>\n<p><em>partition:<\/em><\/p>\n<p><em>Copy the file from the current directory into the new disk\u2019s EFI<\/em><em><\/em><\/p>\n<p><strong><em>efi_cp -d \/dev\/rdsk\/c3t1d0s1 .\/AUTO \/efi\/hpux\/auto<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 7.<\/em><\/p>\n<p><em>volume group onto the desired physical volume. The logical volumes<\/em><\/p>\n<p><em>must be extended in the same order that they are configured on the<\/em><\/p>\n<p><em>original boot disk. Use the<\/em><\/p>\n<p><em>determine the list of logical volumes and their order. For example:<\/em><\/p>\n<p><em>Use the <\/em><em>lvextend <\/em><em>command to mirror each logical volume in the root<\/em><em>pvdisplay <\/em><em>command with the <\/em><em>-v <\/em><em>option to<\/em><em><\/em><\/p>\n<p><strong><em>pvdisplay -v \/dev\/dsk\/c0t0d0s2 | grep \u2019current.*0000$\u2019<\/em><\/strong><em><\/em><\/p>\n<p><em>00000 current \/dev\/vg00\/lvol1 00000<\/em><\/p>\n<p><em>00038 current \/dev\/vg00\/lvol2 00000<\/em><\/p>\n<p><em>00550 current \/dev\/vg00\/lvol3 00000<\/em><\/p>\n<p><em>00583 current \/dev\/vg00\/lvol4 00000<\/em><\/p>\n<p><em>00608 current \/dev\/vg00\/lvol5 00000<\/em><\/p>\n<p><em>00611 current \/dev\/vg00\/lvol6 00000<\/em><\/p>\n<p><em>00923 current \/dev\/vg00\/lvol7 00000<\/em><\/p>\n<p><em>01252 current \/dev\/vg00\/lvol8 00000<\/em><\/p>\n<p><em>In this example, mirror the logical volumes as follows:<\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lvol1 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lvol2 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lvol3 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lv0l4 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lvol5 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lvol6 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lvol7 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><strong><em>lvextend -m 1 \/dev\/vg00\/lvol8 \/dev\/dsk\/c3t1d0s2<\/em><\/strong><em><\/em><\/p>\n<p><em>If<\/em><\/p>\n<p><em>lvextend <\/em><em>fails with following message:<\/em><em><\/em><\/p>\n<p><em>&#8220;m&#8221;: Illegal option<\/em><\/p>\n<p><em>then HP MirrorDisk\/UX is not installed.<\/em><\/p>\n<p><em>Step 8.<\/em><\/p>\n<p><em>Update the root volume group information:<\/em><em><\/em><\/p>\n<p><strong><em>lvlnboot -R \/dev\/vg00<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 9.<\/em><\/p>\n<p><em>disk and that the boot, root, and swap logical volumes appear to be on<\/em><\/p>\n<p><em>both disks:<\/em><\/p>\n<p><em>Display the BDRA. Verify that the mirrored disk is displayed as a boot<\/em><em><\/em><\/p>\n<p><strong><em>lvlnboot \u2013v<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 10.<\/em><\/p>\n<p><em>Specify the mirror disk as the alternate boot path in nonvolatile memory:<\/em><em><\/em><\/p>\n<p><strong><em>setboot -a path_to_disk<\/em><\/strong><em><\/em><\/p>\n<p><em>Step 11.<\/em><\/p>\n<p><em>text editor:<\/em><\/p>\n<p><em>Add a line to <\/em><em>\/stand\/bootconf <\/em><em>for the new boot disk using <\/em><em>vi <\/em><em>or another<\/em><em><\/em><\/p>\n<p><em>vi \/stand\/bootconf<\/em><\/p>\n<p><em>l \/dev\/dsk\/c3t1d0s2<\/em><\/p>\n<p><em>where<\/em><\/p>\n<p><em>l <\/em><em>denotes LVM.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This was written by a former colleague. It is better than anything else I have seen. SEP Mirroring a Boot Disk with LVM on HP-UX 11i for HP Integrity Servers The following diagram shows the disk layout of a boot disk. The disk contains a Master Boot Record (MBR) and Extensible Firmware Interface (EFI) partition [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/112"}],"collection":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=112"}],"version-history":[{"count":0,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}