I have always advised in my books and articles to take great care when you first set up disks on your HP-UX systems to make sure that the disk layout you select is one you can live with for a long time. No matter how careful you are, however, you often need to perform some logical volume reconfiguration. It is much more difficult to make changes to an existing logical volume layout than it is to set up your system correctly when it is first installed. This section describes the steps performed to make some changes to the dump and mirror on an existing system. This is not a procedure you should follow. It is an example of some advanced Logical Volume Manager (LVM) commands used to reconfigure some disks on a specific system. It is a good procedure for illustrating how several LVM commands can be used. Why Change? Figure 9-12 shows the original configuration of disks on a system and the updated configuration we wish to implement. Figure 9-12. Disk Reconfiguration Diagram The overall objective here is to move the 4 GByte disk used as the mirror of the root disk to a different SCSI channel and to install a 2 GByte dump device on the same SCSI channel as the root disk. The procedure consists of several parts. The first is to obtain a snapshot of the system before any reconfigurations. This serves two purposes. The first is to have documentation of the original system configuration that can be included in the system administration notebook. Should any questions arise in the future as to the original configuration and changes made to it, the original configuration will be in the system administration notebook. The second purpose of having this information is to have all of the relevant information about the configuration available as you proceed with the reconfiguration process. The second part of the procedure is to shut down the system, install the new 2 GByte disk, and move the 4 GByte disk. The last part of the procedure is to perform the system administration reconfiguration of the dump and mirror. Figures 9-13, 9-14, and 9-15 show a flowchart depicting the procedure we'll follow throughout this section. The step numbers in the upcoming procedure correspond to the step numbers shown in these figures. Let's now proceed beginning with the snapshot of the system. Figure 9-13. Disk Reconfiguration Flow Diagram - Part 1 (Rearrange Disks) Figure 9-14. Disk Reconfiguration Flow Diagram - Part 2 (Set Up Dump) Figure 9-15. Disk Reconfiguration Flow Diagram - Part 3 (Reinstate Mirrors) ________________________________ F1 - to scan First let's run ioscan to see the disks on the system. $ /usr/sbin/ioscan -funC disk Class I H/W Path Driver S/W State H/W Type Description ======================================================================= disk 2 10/0.5.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c0t5d0 /dev/rdsk/c0t5d0 disk 3 10/0.6.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c0t6d0 /dev/rdsk/c0t6d0 disk 6 10/4/4.4.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c1t4d0 /dev/rdsk/c1t4d0 disk 7 10/4/4.5.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c1t5d0 /dev/rdsk/c1t5d0 disk 8 10/4/4.6.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c1t6d0 /dev/rdsk/c1t6d0 disk 9 10/4/12.4.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t4d0 /dev/rdsk/c2t4d0 disk 10 10/4/12.5.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t5d0 /dev/rdsk/c2t5d0 disk 11 10/4/12.6.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t6d0 /dev/rdsk/c2t6d0 disk 5 10/12/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5401TA /dev/dsk/c3t2d0 /dev/rdsk/c3t2d0 Note that the disks in this configuration correspond to those on the top of Figure 9-4. We haven't yet looked at the logical volume information related to these disks, only their physical addresses. __________________________________ F1 - vgdisplay Next run vgdisplay to see the volume groups. lvol2 on vg00 is the dump logical volume we are going to move to a separate 2 GByte disk. We don't yet know if lvol1-7 on vg00 are all mirrored. # vgdisplay -v --- Volume groups --- VG Name /dev/vg00 VG Write Access read/write VG Status available Max LV 255 Cur LV 7 Open LV 7 Max PV 16 Cur PV 2 Act PV 2 Max PE per PV 1023 VGDA 4 PE Size (Mbytes) 4 Total PE 2046 Alloc PE 688 Free PE 1358 Total PVG 0 --- Logical volumes -- LV Name /dev/vg00/lvol1 LV Status available/syncd LV Size (Mbytes) 92 Current LE 23 Allocated PE 46 Used PV 2 LV Name /dev/vg00/lvol2 LV Status available/syncd LV Size (Mbytes) 500 Current LE 125 Allocated PE 250 Used PV 2 LV Name /dev/vg00/lvol3 LV Status available/syncd LV Size (Mbytes) 20 Current LE 5 Allocated PE 10 Used PV 2 LV Name /dev/vg00/lvol4 LV Status available/syncd LV Size (Mbytes) 252 Current LE 63 Allocated PE 126 Used PV 2 LV Name /dev/vg00/lvol5 LV Status available/syncd LV Size (Mbytes) 32 Current LE 8 Allocated PE 16 Used PV 2 LV Name /dev/vg00/lvol6 LV Status available/syncd LV Size (Mbytes) 320 Current LE 80 Allocated PE 160 Used PV 2 LV Name /dev/vg00/lvol7 LV Status available/syncd LV Size (Mbytes) 160 Current LE 40 Allocated PE 80 Used PV 2 --- Physical volumes -- PV Name /dev/dsk/c0t6d0 PV Status available Total PE 1023 Free PE 679 PV Name /dev/dsk/c0t5d0 PV Status available Total PE 1023 Free PE 679 ________________________________ F1 - lvdisplay View detailed logical volume information with lvdisplay. Note that all of these logical volumes are mirrored and that each has "current" status. Only lvol1 and lvol2 are shown in the listing. lvol3 through lvol7 are not shown. # lvdisplay -v /dev/vg00/lvol* --- Logical volumes --- LV Name /dev/vg00/lvol1 VG Name /dev/vg00 LV Permission read/write LV Status available/syncd Mirror copies 1 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 92 Current LE 23 Allocated PE 46 Stripes 0 Stripe Size (Kbytes) 0 Bad block off Allocation strict/contiguous --- Distribution of logical volume -- PV Name LE on PV PE on PV /dev/dsk/c0t6d0 23 23 /dev/dsk/c0t5d0 23 23 --- Logical extents -- LE PV1 PE1 Status 1 PV2 PE2 Status 2 0000 /dev/dsk/c0t6d0 0000 current /dev/dsk/c0t5d0 0000 current 0001 /dev/dsk/c0t6d0 0001 current /dev/dsk/c0t5d0 0001 current 0002 /dev/dsk/c0t6d0 0002 current /dev/dsk/c0t5d0 0002 current 0003 /dev/dsk/c0t6d0 0003 current /dev/dsk/c0t5d0 0003 current 0004 /dev/dsk/c0t6d0 0004 current /dev/dsk/c0t5d0 0004 current 0005 /dev/dsk/c0t6d0 0005 current /dev/dsk/c0t5d0 0005 current 0006 /dev/dsk/c0t6d0 0006 current /dev/dsk/c0t5d0 0006 current 0007 /dev/dsk/c0t6d0 0007 current /dev/dsk/c0t5d0 0007 current 0008 /dev/dsk/c0t6d0 0008 current /dev/dsk/c0t5d0 0008 current 0009 /dev/dsk/c0t6d0 0009 current /dev/dsk/c0t5d0 0009 current 0010 /dev/dsk/c0t6d0 0010 current /dev/dsk/c0t5d0 0010 current 0011 /dev/dsk/c0t6d0 0011 current /dev/dsk/c0t5d0 0011 current 0012 /dev/dsk/c0t6d0 0012 current /dev/dsk/c0t5d0 0012 current 0013 /dev/dsk/c0t6d0 0013 current /dev/dsk/c0t5d0 0013 current 0014 /dev/dsk/c0t6d0 0014 current /dev/dsk/c0t5d0 0014 current 0015 /dev/dsk/c0t6d0 0015 current /dev/dsk/c0t5d0 0015 current 0016 /dev/dsk/c0t6d0 0016 current /dev/dsk/c0t5d0 0016 current 0017 /dev/dsk/c0t6d0 0017 current /dev/dsk/c0t5d0 0017 current 0018 /dev/dsk/c0t6d0 0018 current /dev/dsk/c0t5d0 0018 current 0019 /dev/dsk/c0t6d0 0019 current /dev/dsk/c0t5d0 0019 current 0020 /dev/dsk/c0t6d0 0020 current /dev/dsk/c0t5d0 0020 current 0021 /dev/dsk/c0t6d0 0021 current /dev/dsk/c0t5d0 0021 current 0022 /dev/dsk/c0t6d0 0022 current /dev/dsk/c0t5d0 0022 current LV Name /dev/vg00/lvol2 VG Name /dev/vg00 LV Permission read/write LV Status available/syncd Mirror copies 1 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 500 Current LE 125 Allocated PE 250 Stripes 0 Stripe Size (Kbytes) 0 Bad block off Allocation strict/contiguous --- Distribution of logical volume -- PV Name LE on PV PE on PV /dev/dsk/c0t6d0 125 125 /dev/dsk/c0t5d0 125 125 --- Logical extents -- LE PV1 PE1 Status 1 PV2 PE2 Status 2 0000 /dev/dsk/c0t6d0 0023 current /dev/dsk/c0t5d0 0023 current 0001 /dev/dsk/c0t6d0 0024 current /dev/dsk/c0t5d0 0024 current 0002 /dev/dsk/c0t6d0 0025 current /dev/dsk/c0t5d0 0025 current 0003 /dev/dsk/c0t6d0 0026 current /dev/dsk/c0t5d0 0026 current 0004 /dev/dsk/c0t6d0 0027 current /dev/dsk/c0t5d0 0027 current 0005 /dev/dsk/c0t6d0 0028 current /dev/dsk/c0t5d0 0028 current 0006 /dev/dsk/c0t6d0 0029 current /dev/dsk/c0t5d0 0029 current 0007 /dev/dsk/c0t6d0 0030 current /dev/dsk/c0t5d0 0030 current 0008 /dev/dsk/c0t6d0 0031 current /dev/dsk/c0t5d0 0031 current 0009 /dev/dsk/c0t6d0 0032 current /dev/dsk/c0t5d0 0032 current 0010 /dev/dsk/c0t6d0 0033 current /dev/dsk/c0t5d0 0033 current 0011 /dev/dsk/c0t6d0 0034 current /dev/dsk/c0t5d0 0034 current 0012 /dev/dsk/c0t6d0 0035 current /dev/dsk/c0t5d0 0035 current 0013 /dev/dsk/c0t6d0 0036 current /dev/dsk/c0t5d0 0036 current . . . 0111 /dev/dsk/c0t6d0 0134 current /dev/dsk/c0t5d0 0134 current 0112 /dev/dsk/c0t6d0 0135 current /dev/dsk/c0t5d0 0135 current 0113 /dev/dsk/c0t6d0 0136 current /dev/dsk/c0t5d0 0136 current 0114 /dev/dsk/c0t6d0 0137 current /dev/dsk/c0t5d0 0137 current 0115 /dev/dsk/c0t6d0 0138 current /dev/dsk/c0t5d0 0138 current 0116 /dev/dsk/c0t6d0 0139 current /dev/dsk/c0t5d0 0139 current 0117 /dev/dsk/c0t6d0 0140 current /dev/dsk/c0t5d0 0140 current 0118 /dev/dsk/c0t6d0 0141 current /dev/dsk/c0t5d0 0141 current 0119 /dev/dsk/c0t6d0 0142 current /dev/dsk/c0t5d0 0142 current 0120 /dev/dsk/c0t6d0 0143 current /dev/dsk/c0t5d0 0143 current 0121 /dev/dsk/c0t6d0 0144 current /dev/dsk/c0t5d0 0144 current 0122 /dev/dsk/c0t6d0 0145 current /dev/dsk/c0t5d0 0145 current 0123 /dev/dsk/c0t6d0 0146 current /dev/dsk/c0t5d0 0146 current 0124 /dev/dsk/c0t6d0 0147 current /dev/dsk/c0t5d0 0147 current ____________________________________ F1 - ll /dev/vg00 Next, view /dev/vg00 to have a record of the logical volumes. # ll /dev/vg00 /dev/vg00: total 0 crw-r--r-- 1 root sys 64 0x000000 May 29 04:44 group brw-r----- 1 root sys 64 0x000001 May 29 04:44 lvol1 brw-r----- 1 root sys 64 0x000002 Jul 9 17:10 lvol2 brw-r----- 1 root sys 64 0x000003 May 29 04:44 lvol3 brw-r----- 1 root sys 64 0x000004 May 29 04:44 lvol4 brw-r----- 1 root sys 64 0x000005 May 29 04:44 lvol5 brw-r----- 1 root sys 64 0x000006 May 29 04:44 lvol6 brw-r----- 1 root sys 64 0x000007 May 29 04:44 lvol7 crw-r----- 1 root sys 64 0x000001 May 29 04:44 rlvol1 crw-r----- 1 root sys 64 0x000002 Jul 9 17:10 rlvol2 crw-r----- 1 root sys 64 0x000003 May 29 04:44 rlvol3 crw-r----- 1 root sys 64 0x000004 May 29 04:44 rlvol4 crw-r----- 1 root sys 64 0x000005 May 29 04:44 rlvol5 crw-r----- 1 root sys 64 0x000006 May 29 04:44 rlvol6 crw-r----- 1 root sys 64 0x000007 May 29 04:44 rlvol7 ____________________________________ F1 - ll /dev/vg_nw Next, view /dev/vg_nw and any other volume groups. # ll /dev/vg_nw /dev/vg_nw: total 0 crw-rw-rw- 1 root sys 64 0x010000 Jul 9 12:03 group brw-r----- 1 root sys 64 0x010003 Jul 9 13:01 lv_nwbackup brw-r----- 1 root sys 64 0x010004 Jul 9 13:01 lv_nwlog brw-r----- 1 root sys 64 0x010002 Jul 9 12:54 lv_nwsys brw-r----- 1 root sys 64 0x010001 Jul 9 12:53 lv_nwtext crw-r----- 1 root sys 64 0x010003 Jul 9 13:01 rlv_nwbackup crw-r----- 1 root sys 64 0x010004 Jul 9 13:01 rlv_nwlog crw-r----- 1 root sys 64 0x010002 Jul 9 12:55 rlv_nwsys crw-r----- 1 root sys 64 0x010001 Jul 9 12:54 rlv_nwtext ______________________________ F1 - bdf Next, view the file systems with bdf. Notice that lvol2 is not shown because this is a swap and dump device. # bdf Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol1 91669 31889 50613 39% / /dev/vg00/lvol7 159509 83630 59928 58% /var /dev/vg00/lvol6 319125 197912 89300 69% /usr /dev/vg00/lvol5 31829 11323 17323 40% /tmp /dev/vg00/lvol4 251285 67854 158302 30% /opt /dev/vg_nw/lv_nwtext 4099465 2070905 1618613 56% /nwtext /dev/vg_nw/lv_nwsys 4099465 1063909 2625609 29% /nwsys /dev/vg_nw/lv_nwlog 99669 17313 72389 19% /nwlog /dev/vg_nw/lv_nwbackup 2552537 377388 1919895 16% /nwbackup /dev/vg00/lvol3 19861 2191 15683 12% /home __________________________________ F1 - swapinfo Next, run swapinfo to see that lvol2 is the only swap device. # swapinfo Kb Kb Kb PCT START/ Kb TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 512000 0 512000 0% 0 - 1 /dev/vg00/lvol2 reserve - 512000 -512000 memory 1670828 1474704 196124 88% ___________________________________ F1 - lvlnboot Next, look at the boot information with lvlnboot. lvol2 on vg00 is the dump device. # lvlnboot -v /dev/vg00 Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/dsk/c0t6d0 (10/0.6.0) -- Boot Disk /dev/dsk/c0t5d0 (10/0.5.0) -- Boot Disk Root: lvol1 on: /dev/dsk/c0t6d0 /dev/dsk/c0t5d0 Swap: lvol2 on: /dev/dsk/c0t6d0 /dev/dsk/c0t5d0 Dump: lvol2 on: /dev/dsk/c0t6d0, 0 _____________________________________ F1 - lifls Look at the boot area with lifls. #lifls -Clv /dev/dsk/c0t6d0 volume ISL10 data size 7984 directory size 8 94/11/04 15:46:53 filename type start size implement created =============================================================== ODE -12960 584 496 0 95/05/19 13:36:50 MAPFILE -12277 1080 32 0 95/05/19 13:36:50 SYSLIB -12280 1112 224 0 95/05/19 13:36:50 CONFIGDATA -12278 1336 62 0 95/05/19 13:36:50 SLMOD -12276 1400 70 0 95/05/19 13:36:50 SLDEV -12276 1472 68 0 95/05/19 13:36:50 SLDRIVERS -12276 1544 244 0 95/05/19 13:36:50 MAPPER -12279 1792 93 0 95/05/19 13:36:51 IOTEST -12279 1888 150 0 95/05/19 13:36:51 PERFVER -12279 2040 80 0 95/05/19 13:36:51 PVCU -12801 2120 64 0 95/05/19 13:36:51 SSINFO -12286 2184 1 0 96/09/16 09:04:01 ISL -12800 2192 240 0 94/11/04 15:46:53 AUTO -12289 2432 1 0 94/11/04 15:46:53 HPUX -12928 2440 800 0 94/11/04 15:46:54 LABEL BIN 3240 8 0 96/05/29 01:49:55 ______________________________________ F2 After all the appropriate information has been saved for the existing configuration, we can begin the reconfiguration. First, we break the mirror with lvreduce and the -m option. # lvreduce -m 0 /dev/vg00/lvol1 Logical volume "/dev/vg00/lvol1" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvreduce -m 0 /dev/vg00/lvol2 Logical volume "/dev/vg00/lvol2" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvreduce -m 0 /dev/vg00/lvol3 Logical volume "/dev/vg00/lvol3" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvreduce -m 0 /dev/vg00/lvol4 Logical volume "/dev/vg00/lvol4" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvreduce -m 0 /dev/vg00/lvol5 Logical volume "/dev/vg00/lvol5" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvreduce -m 0 /dev/vg00/lvol6 Logical volume "/dev/vg00/lvol6" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvreduce -m 0 /dev/vg00/lvol7 Logical volume "/dev/vg00/lvol7" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf You can type each command or make a file with the lvreduce commands in it and run the file. You can call the file /tmp/reduce with the following entries: lvreduce -m 0 /dev/vg00/lvol1 lvreduce -m 0 /dev/vg00/lvol2 lvreduce -m 0 /dev/vg00/lvol3 lvreduce -m 0 /dev/vg00/lvol4 lvreduce -m 0 /dev/vg00/lvol5 lvreduce -m 0 /dev/vg00/lvol6 lvreduce -m 0 /dev/vg00/lvol7 After you create this file, change it to executable and then run with the following two commands. # chmod 555 /tmp/reduce # /tmp/reduce You will then see all the output of having run the lvreduce commands. ________________________________ F3 Check to see that mirroring of lvol1-7 has been reduced with lvdisplay. Look to see that mirrored copies are equal to 0. Only lvol1 through lvol3 are shown in this listing. # lvdisplay -v /dev/vg00/lvol* | more --- Logical volumes --- LV Name /dev/vg00/lvol1 VG Name /dev/vg00 LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 92 Current LE 23 Allocated PE 23 Stripes 0 Stripe Size (Kbytes) 0 Bad block off Allocation strict/contiguous LV Name /dev/vg00/lvol2 VG Name /dev/vg00 LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 500 Current LE 125 Allocated PE 125 Stripes 0 Stripe Size (Kbytes) 0 Bad block off Allocation strict/contiguous LV Name /dev/vg00/lvol3 VG Name /dev/vg00 LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 20 Current LE 5 Allocated PE 5 Stripes 0 Stripe Size (Kbytes) 0 Bad block on Allocation strict ___________________________________ F4 Now remove c0t5d0 from vg00 with vgreduce. Since there is no mirroring in place, this approach will work. This disk will be put on a different SCSI controller and again used for mirroring later in the procedure. # vgreduce /dev/vg00 /dev/dsk/c0t5d0 Volume group "/dev/vg00" has been successfully reduced. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf ____________________________________ F5 At this point c0t5d0 is no longer in vg00. Verify that "PVName" c0t5d0 is no longer in vg00 with vgdisplay. # vgdisplay -v There should be no c0t5d0 in vg00. ____________________________________ F6 Verify that "dump lvol" is in /stand/system. If not, add "dump vol" and reconfigure the kernel. See the kernel rebuild procedure in Chapter 1. ____________________________________ F7 Now the hardware upgrade takes place. The system is shut down, disk drives are added and moved, and the system is rebooted. The 4 GByte disk / dev/dsk/c0t5d0 becomes /dev/dsk/c1t3d0 at address 10/4/4.3.0, and a new 2GByte disk is introduced as 10/0.5.0 with the device name /dev/dsk/ c0t5d0. The second half of Figure 9-4 depicts this change. ____________________________________ F8 The first activity to perform after the hardware upgrade is to view the new disks with ioscan. There is now a 2 GByte disk at 10/0.5.0 and a 4 GByte disk at 10/4/4.3.0. # ioscan -funC disk Class I H/W Path Driver S/W State H/W Type Description ====================================================================== disk 2 10/0.5.0 sdisk CLAIMED DEVICE SEAGATE ST32550W /dev/dsk/c0t5d0 /dev/rdsk/c0t5d0 disk 3 10/0.6.0 sdisk CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c0t6d0 /dev/rdsk/c0t6d0 disk 12 10/4/4.3.0 disc3 CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c1t3d0 /dev/rdsk/c1t3d0 /dev/floppy/c1t3d0 /dev/rfloppy/c1t3d0 disk 6 10/4/4.4.0 disc3 CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c1t4d0 /dev/rdsk/c1t4d0 /dev/floppy/c1t4d0 /dev/rfloppy/c1t4d0 disk 7 10/4/4.5.0 disc3 CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c1t5d0 /dev/rdsk/c1t5d0 /dev/floppy/c1t5d0 /dev/rfloppy/c1t5d0 disk 8 10/4/4.6.0 disc3 CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c1t6d0 /dev/rdsk/c1t6d0 /dev/floppy/c1t6d0 /dev/rfloppy/c1t6d0 disk 9 10/4/12.4.0 disc3 CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t4d0 /dev/rdsk/c2t4d0 /dev/floppy/c2t4d0 /dev/rfloppy/c2t4d0 disk 10 10/4/12.5.0 disc3 CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t5d0 /dev/rdsk/c2t5d0 /dev/floppy/c2t5d0 /dev/rfloppy/c2t5d0 disk 11 10/4/12.6.0 disc3 CLAIMED DEVICE SEAGATE ST15150W /dev/dsk/c2t6d0 /dev/rdsk/c2t6d0 /dev/floppy/c2t6d0 /dev/rfloppy/c2t6d0 disk 5 10/12/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5401TA /dev/dsk/c3t2d0 /dev/rdsk/c3t2d0 ____________________________________ F9 Now we run vgdisplay to see new volume group information. Only c0t6d0 is in vg00 and no mirroring is yet configured. The other volume groups have remained the same. Only lvol1 through lvol3 are shown in our example. # vgdisplay -v /dev/vg00 --- Volume groups -- VG Name /dev/vg00 VG Write Access read/write VG Status available Max LV 255 Cur LV 7 Open LV 7 Max PV 16 Cur PV 1 Act PV 1 Max PE per PV 1023 VGDA 2 PE Size (Mbytes) 4 Total PE 1023 Alloc PE 344 Free PE 679 Total PVG 0 --- Logical volumes -- LV Name /dev/vg00/lvol1 LV Status available/syncd LV Size (Mbytes) 92 Current LE 23 Allocated PE 23 Used PV 1 LV Name /dev/vg00/lvol2 LV Status available/syncd LV Size (Mbytes) 500 Current LE 125 Allocated PE 125 Used PV 1 LV Name /dev/vg00/lvol3 LV Status available/syncd LV Size (Mbytes) 20 Current LE 5 Allocated PE 5 Used PV 1 ____________________________________ (F9 continued) Only the first three logical volumes in /dev/vg_nw are shown. # vgdisplay -v /dev/vg_nw VG Name /dev/vg_nw VG Write Access read/write VG Status available Max LV 255 Cur LV 4 Open LV 4 Max PV 16 Cur PV 6 Act PV 6 Max PE per PV 1023 VGDA 12 PE Size (Mbytes) 4 Total PE 6138 Alloc PE 5416 Free PE 722 Total PVG 2 --- Logical volumes --- LV Name /dev/vg_nw/lv_nwtext LV Status available/syncd LV Size (Mbytes) 4092 Current LE 1023 Allocated PE 2046 Used PV 2 LV Name /dev/vg_nw/lv_nwsys LV Status available/syncd LV Size (Mbytes) 4092 Current LE 1023 Allocated PE 2046 Used PV 2 LV Name /dev/vg_nw/lv_nwbackup LV Status available/syncd LV Size (Mbytes) 2548 Current LE 637 Allocated PE 1274 Used PV 2 ____________________________________ F10 Use vgextend to add the 4 GByte disk to vg00 for mirroring (you may also have to run pvcreate here, too). # vgextend /dev/vg00 /dev/dsk/c1t3d0 Volume group "/dev/vg00" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf ____________________________________ F11 Now we can create the new 2 GByte disk and add it to vg00 using the two following commands: pvcreate (F11) to create the physical volume and vgextend (F12) to extend the volume group. # pvcreate -f /dev/rdsk/c0t5d0 Physical volume "/dev/rdsk/c0t5d0" has been successfully created. ____________________________________ F12 # vgextend /dev/vg00 /dev/dsk/c0t5d0 Volume group "/dev/vg00" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf ____________________________________ F13 We can check to see that these two disks have indeed been added to vg00 with vgdisplay. Only lvol1 through lvol3 are shown in our example. The end of the display is the significant part of the listing showing three physical volumes. # vgdisplay -v /dev/vg00 --- Volume groups --- VG Name /dev/vg00 VG Write Access read/write VG Status available Max LV 255 Cur LV 7 Open LV 7 Max PV 16 Cur PV 3 Act PV 3 Max PE per PV 1023 VGDA 6 PE Size (Mbytes) 4 Total PE 2554 Alloc PE 344 Free PE 2210 Total PVG 0 --- Logical volumes --- LV Name /dev/vg00/lvol1 LV Status available/syncd LV Size (Mbytes) 92 Current LE 23 Allocated PE 23 Used PV 1 LV Name /dev/vg00/lvol2 LV Status available/syncd LV Size (Mbytes) 500 Current LE 125 Allocated PE 125 Used PV 1 LV Name /dev/vg00/lvol3 LV Status available/syncd LV Size (Mbytes) 20 Current LE 5 Allocated PE 5 Used PV 1 . . . --- Physical volumes --- PV Name /dev/dsk/c0t6d0 PV Status available Total PE 1023 Free PE 679 PV Name /dev/dsk/c1t3d0 PV Status available Total PE 1023 Free PE 1023 PV Name /dev/dsk/c0t5d0 PV Status available Total PE 508 Free PE 508 ____________________________________ F14 We can now create the dump logical volume in vg00 with lvcreate (F14), extend it to 2 GBytes with lvextend (F15), and view it with lvdisplay (F16). # lvcreate -n dump /dev/vg00 Logical volume "/dev/vg00/dump" has been successfully created with character de- vice "/dev/vg00/rdump". Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf ____________________________________ F15 # lvextend -l 508 /dev/vg00/dump /dev/dsk/c0t5d0 Logical volume "/dev/vg00/dump" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf ____________________________________ F16 # lvdisplay /dev/vg00/dump | more --- Logical volumes -- LV Name /dev/vg00/dump VG Name /dev/vg00 LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 2032 Current LE 508 Allocated PE 508 Stripes 0 Stripe Size (Kbytes) 0 Bad block on Allocation strict --- Distribution of logical volume -- PV Name LE on PV PE on PV /dev/dsk/c0t5d0 508 508 . . . ____________________________________ F17 In order to make /dev/vg00/dump the dump device, we must first make it contiguous with lvchange and then make it a dump device with lvlnboot. # lvchange -C y /dev/vg00/dump # lvlnboot -d /dev/vg00/dump ____________________________________ F18 View dump devices. # lvlnboot -v | more Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/dsk/c0t6d0 (10/0.6.0) -- Boot Disk /dev/dsk/c1t3d0 (10/4/4.3.0) -- Boot Disk /dev/dsk/c0t5d0 (10/0.5.0) Root: lvol1 on: /dev/dsk/c0t6d0 Swap: lvol2 on: /dev/dsk/c0t6d0 Dump: lvol2 on: /dev/dsk/c0t6d0, 0 Dump: dump on: /dev/dsk/c0t5d0, 1 This may not be what we want. The primary dump device, as indicated by the "0" is /dev/dsk/c0t6d0 and the secondary dump device, indicated by the "1," is /dev/dsk/c0t5d0. We can optionally redo this. Let's proceed with mirroring the lvols on /dev/vg00 and come back to dump devices. ____________________________________ F19 Let's now extend all the volumes in vg00 for one mirror using lvextend. # lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t3d0 The newly allocated mirrors are now being synchronized. This operation will take some time. Please wait .... Logical volume "/dev/vg00/lvol1" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf Put the following in /tmp/mirror and run. lvol1 was extended earlier; lvol2 is swap and doesn't need to be extended: lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t3d0 lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t3d0 lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c1t3d0 lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c1t3d0 lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c1t3d0 The newly allocated mirrors are now being synchronized. This operation will take some time. Please wait .... Logical volume "/dev/vg00/lvol2" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf . . . ____________________________________ F20 Let's now verify that the mirroring is in place with lvdisplay (only lvol1 and lvol2 are shown). # lvdsisplay -v /dev/vg00/lvol* | more --- Logical volumes --- LV Name /dev/vg00/lvol1 VG Name /dev/vg00 LV Permission read/write LV Status available/syncd Mirror copies 1 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 92 Current LE 23 Allocated PE 46 Stripes 0 Stripe Size (Kbytes) 0 Bad block off Allocation strict/contiguous --- Distribution of logical volume --- PV Name LE on PV PE on PV /dev/dsk/c0t6d0 23 23 /dev/dsk/c1t3d0 23 23 --- Logical extents --- LE PV1 PE1 Status 1 PV2 PE2 Status 2 0000 /dev/dsk/c0t6d0 0000 current /dev/dsk/c1t3d0 0000 current 0001 /dev/dsk/c0t6d0 0001 current /dev/dsk/c1t3d0 0001 current 0002 /dev/dsk/c0t6d0 0002 current /dev/dsk/c1t3d0 0002 current 0003 /dev/dsk/c0t6d0 0003 current /dev/dsk/c1t3d0 0003 current . . . You can see f rom this listing that c0t6d0 is mirrored on c1t3d0. ____________________________________ F21 Reboot the system to confirm that all changes have taken effect. After reboot, do the following to create a dump. The key must be in the "Service" position for ^b to work (you must be on a server and at the system console for this to work). Use ^b to get the CM> prompt. Use the tc command at the CM> prompt to create core dump ____________________________________ F22 The system will automatically reboot after a core dump. Use the following command to save the core dump to tape. The /var/adm/crash file name is required even though the core dump is in the dump logical volume and not in the /var/adm/crash directory. # savecore -t /dev/rmt/0m /var/adm/crash ____________________________________ F23 Then use savecore -xt and the directory name to the extract core dump. If you do not have room for the core dump, or you want a more thorough check, you can place a call and ask the HP Response Center to verify that the savecore to tape has worked. # savecore -xt /dev/rmt/0m /var/adm/crash The core dump space requirement is calculated from the end of dump back toward the front. For this reason, about roughly 1.5 GBytes is written to the dump logical volume and then roughly 600 MBytes are written to lvol2. ____________________________________ |