Вы находитесь на странице: 1из 14

vxvm root mirroring in solaris 10 steps By :-andrew On 09-09-2010 I am using Veritas volume manger to mirror the active root

disk (c0t0d0) to mirr or (c0t1d0) * First of all we will change the filesystem layout, we are going to do mirro ring from c0t0d0 to c0t1d0. When I installed the operating system I created 3 un assigned slice.Run the following command. # format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /pci@1f,4000/scsi@3/sd@0,0 1. c0t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /pci@1f,4000/scsi@3/sd@1,0 Specify disk (enter its number): 0 selecting c0t0d0 [disk formatted] Warning: Current Disk has mounted partitions. FORMAT MENU: disk type partition current format repair label analyze defect backup verify save inquiry volname !<cmd> quit format> p PARTITION MENU: 0 1 2 3 4 5 6 7 select modify name print label !<cmd> -

select a disk select (define) a disk type select (define) a partition table describe the current disk format and analyze the disk repair a defective sector write label to the disk surface analysis defect list management search for backup labels read and display labels save new disk/partition definitions show vendor, product and revision set 8-character volume name execute <cmd>, then return

change `0' partition change `1' partition change `2' partition change `3' partition change `4' partition change `5' partition change `6' partition change `7' partition select a predefined table modify a predefined partition table name the current table display the current table write partition map and label to the disk execute <cmd>, then return

quit partition> p Current partition table (original): Total disk cylinders available: 7506 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 4346 9.77GB (4347/0/0) 20483064 1 swap wu 4347 - 4792 1.00GB (446/0/0) 2101552 2 backup wm 0 - 7505 16.86GB (7506/0/0) 35368272 3 var wm 4793 - 6966 4.88GB (2174/0/0) 10243888 4 unassigned wm 6967 - 7010 101.23MB (44/0/0) 207328 5 unassigned wm 7011 - 7054 101.23MB (44/0/0) 207328 6 unassigned wm 7055 - 7098 101.23MB (44/0/0) 207328 7 unassigned wm 0 0 (0/0/0) 0 We will free up those 100MB slices so that Veritas can use free space. VXVM requ ires minimum of two unused disk slices to store Veritas public and private regio n on the disk. # format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /pci@1f,4000/scsi@3/sd@0,0 1. c0t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /pci@1f,4000/scsi@3/sd@1,0 Specify disk (enter its number): 0 selecting c0t0d0 [disk formatted] Warning: Current Disk has mounted partitions. FORMAT MENU: disk type partition current format repair label analyze defect backup verify save inquiry volname !<cmd> quit format> p select a disk select (define) a disk type select (define) a partition table describe the current disk format and analyze the disk repair a defective sector write label to the disk surface analysis defect list management search for backup labels read and display labels save new disk/partition definitions show vendor, product and revision set 8-character volume name execute <cmd>, then return

PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition

4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> p Current partition table (original): Total disk cylinders available: 7506 + 2 (reserved cylinders) Part Tag 0 root 1 swap 2 backup 3 var 4 unassigned 5 unassigned 6 unassigned 7 unassigned partition> 4 Part Tag 4 unassigned Flag Cylinders Size Blocks wm 0 - 4346 9.77GB (4347/0/0) 20483064 wu 4347 - 4792 1.00GB (446/0/0) 2101552 wm 0 - 7505 16.86GB (7506/0/0) 35368272 wm 4793 - 6966 4.88GB (2174/0/0) 10243888 wm 6967 - 7010 101.23MB (44/0/0) 207328 wm 7011 - 7054 101.23MB (44/0/0) 207328 wm 7055 - 7098 101.23MB (44/0/0) 207328 wm 0 0 (0/0/0)

Flag wm

Cylinders 6967 - 7010

Size 101.23MB

Blocks (44/0/0) 207328

Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[6967]: 0 Enter partition size[207328b, 44c, 43e, 101.23mb, 0.10gb]: 0 partition> 5 Part Tag Flag Cylinders Size Blocks 5 unassigned wm 7011 - 7054 101.23MB (44/0/0) 207328 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[7011]: 0 Enter partition size[207328b, 44c, 43e, 101.23mb, 0.10gb]: 0 partition> 6 Part Tag Flag Cylinders Size Blocks 6 unassigned wm 7055 - 7098 101.23MB (44/0/0) 207328 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[7055]: 0 Enter partition size[207328b, 44c, 43e, 101.23mb, 0.10gb]: 0 partition> p Current partition table (unnamed): Total disk cylinders available: 7506 + 2 (reserved cylinders) Part Tag 0 root 1 swap 2 backup 3 unassigned 4 unassigned Flag wm wu wm wm wm Cylinders 0 - 4346 4347 - 4792 0 - 7505 4793 - 6966 0 Size 9.77GB 1.00GB 16.86GB 4.88GB 0 Blocks (4347/0/0) 20483064 (446/0/0) 2101552 (7506/0/0) 35368272 (2174/0/0) 10243888 (0/0/0) 0

5 unassigned 6 unassigned 7 unassigned

wm wm wm

0 0 0

0 0 0

(0/0/0) (0/0/0) (0/0/0)

0 0 0

partition> label Ready to label disk, continue? yes partition> quit Next step is to install VXVM # cd /cdrom # cd volume_manager # ./installvm VERITAS VOLUME MANAGER 4.0 INSTALLATION PROGRAM Copyright (c) 2004 VERITAS Software Corporation. All rights reserved. VERITAS, the VERITAS Logo and all other VERITAS product names and slogans are trademarks or registered trademarks of VERITAS Software Corporation. VERITAS and the VERITAS Logo Reg. U.S. Pat. & Tm. Off. Other product names and/or slogans mentioned herein may be trademarks or registered trademarks of their respective companies. Enter the system names separated by spaces on which to install VxVM: E220 Checking OS version on E220 ................................. SunOS 5.9 Checking VRTSvxvm package ............................... not installed Initial system check completed successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.0 INSTALLATION PROGRAM VERITAS Infrastructure package installation: Installing VERITAS Infrastructure packages on E220: Checking VRTScpi package ................................ not installed Checking VRTSvlic package ............................... not installed Checking file system space ................ required space is available Installing VRTScpi 4.0.5 on E220 ................................. Done Installing VRTSvlic 3.02.005d on E220 ............................ Done VERITAS Infrastructure packages installed successfully. Press [Return] to continue: VERITAS VOLUME MANAGER 4.0 INSTALLATION PROGRAM installvm can install the following optional VxVM packages: VRTSobgui VRTSvmman VRTSvmdoc VERITAS Enterprise Administrator VERITAS Volume Manager Manual Pages VERITAS Volume Manager Documentation

1) Install all of the optional packages

2) Install none of the optional packages 3) View package descriptions and select optional packages Select the optional packages to be installed on all systems? [1-3,q,?] (1) VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM installvm will install the following VxVM packages: VRTSperl VERITAS Perl 5.8.0 Redistribution VRTSob VERITAS Enterprise Administrator Service VRTSmuob VERITAS Enterprise Administrator Service Localized Package VRTSobgui VERITAS Enterprise Administrator VRTSvxvm VERITAS Volume Manager Binaries VRTSvmman VERITAS Volume Manager Manual Pages VRTSvmdoc VERITAS Volume Manager Documentation VRTSvmpro VERITAS Volume Manager Management Services Provider VRTSfspro VERITAS File System Management Services Provider VRTSalloc VERITAS Volume Manager Intelligent Storage Provisioning VRTSddlpr VERITAS Device Discovery Layer Services Provider Press [Return] to continue: VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM Checking system installation requirements: Checking VxVM installation requirements on E220: Checking VRTSperl package .................................................. ..................................................................... not instal led Checking VRTSob package .................................................... ..................................................................... not instal led Checking VRTSmuob package .................................................. ..................................................................... not instal led Checking VRTSobgui package ................................................. ..................................................................... not instal led Checking VRTSvxvm package .................................................. ..................................................................... not instal led Checking VRTSvmman package ................................................. ..................................................................... not instal led Checking VRTSvmdoc package ................................................. ..................................................................... not instal led Checking VRTSvmpro package ................................................. ..................................................................... not instal led Checking VRTSfspro package ................................................. ..................................................................... not instal led Checking VRTSalloc package ................................................. ..................................................................... not instal led Checking VRTSddlpr package .................................................

..................................................................... not instal led Checking VERITAS patch 115209 .............................................. ..................................................................... not instal led Checking VERITAS patch 115212 .............................................. ..................................................................... not instal led Checking VERITAS patch 115210 .............................................. ..................................................................... not instal led Checking VERITAS patch 115217 .............................................. ..................................................................... not instal led Checking for any Solaris patch issues ...................................... .............................................................................. N one Checking file system space ................................................. ....................................................... required space is availa ble Checking for any AP driver issues .......................................... .............................................................................. N one Checking vxsvc process ..................................................... ....................................................................... not runn ing Installation requirement checks completed successfully. Press [Return] to continue: VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM Installing Volume Manager 4.0 on E220: Installing VRTSperl 4.0.2 on E220 .......................................... ................................................................ Done 1 of 15 st eps Installing VRTSob 3.2.514.0 on E220 ........................................ ................................................................ Done 2 of 15 st eps Installing VRTSmuob 3.2.514.0 on E220 ...................................... ................................................................ Done 3 of 15 st eps Installing VRTSobgui 3.2.514.0 on E220 ..................................... ................................................................ Done 4 of 15 st eps Installing VRTSvxvm 4.0 on E220 ............................................ ................................................................ Done 5 of 15 st eps Installing VRTSvmman 4.0 on E220 ........................................... ................................................................ Done 6 of 15 st eps Installing VRTSvmdoc 4.0 on E220 ........................................... ................................................................ Done 7 of 15 st

eps Installing VRTSvmpro 4.0 on E220 ........................................... ................................................................ Done 8 of 15 st eps Installing VRTSfspro 4.0 on E220 ........................................... ................................................................ Done 9 of 15 st eps Installing VRTSalloc 4.0 on E220 ........................................... ............................................................... Done 10 of 15 st eps Installing VRTSddlpr 4.0 on E220 ........................................... ............................................................... Done 11 of 15 st eps Adding patch 115209-05 on E220 ............................................. ............................................................... Done 12 of 15 st eps Adding patch 115212-05 on E220 ............................................. ............................................................... Done 13 of 15 st eps Adding patch 115210-05 on E220 ............................................. ............................................................... Done 14 of 15 st eps Adding patch 115217-01 on E220 ............................................. ............................................................... Done 15 of 15 st eps Volume Manager installation completed successfully. Press [Return] to continue: VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM VxVM Licensing Verification: Checking VxVM license key on E220 .......................................... ...................................................................... not licen sed Enter a VxVM license key for E220: [?] 49764191372022959161665 CPI WARNING V-9-10-1374 49764191372022959161665 is not a valid VxVM license key for system E220. Do you want to enter another license key for E220? [y,n,q,?] (n) y Enter a VxVM license key for E220: 50262249018562707515955 CPI WARNING V-9-10-1374 50262249018562707515955 is not a valid VxVM license key for system E220. Do you want to enter another license key for E220? [y,n,q,?] (n) VxVM licensing verified successfully. Press [Return] to continue: VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM It is optional to configure VxVM now. If you choose to configure VxVM later, you can either do so manually or run the installvm -configure command. Are you ready to configure VxVM? [y,n,q] (y) VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM

installvm will now ask sets of VxVM configuration-related questions. When a [b] is presented after a question, 'b' may be entered to go back to the f irst question of the configuration set. When a [?] is presented after a question, '?' may be entered for help or additio nal information about the question. Following each set of questions, the information you have entered will be presen ted for confirmation. To repeat the set of questions and correct any previous errors, enter 'n' at the confirmation prompt. No configuration changes are made to the systems until all configuration questio ns are completed and confirmed. Press [Return] to continue: The enclosure-based naming scheme is a feature of Volume Manager. It allows one to reference disks using a symbolic name that is more meaningful than the operat ing system's normal device access name. This symbolic name is typically derived fro m the array name. Evaluating which systems can be configured for the enclosure-based naming scheme ... System E220 is eligible -- can configure. Do you want to set up the enclosure-based naming scheme? [y,n,q,?] (n) VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM Do you want to start Volume Manager processes now? [y,n,q] (y) Evaluating which systems can now be started... System E220 is eligible -- can be started. Preparing to start VxVM on target systems... Begin starting VxVM on system E220 Disabling enclosure-based naming ........................................... .............................................................................. D one Starting vxconfigd for VxVM ................................................ ............................................................................ Fai led Done starting VxVM on system E220 Done with starting VxVM on target systems... Press [Return] to continue: Many Volume Manager commands affect the contents or configuration of a disk grou p. Such commands require that the user specify a disk group. This is accomplish ed

by using the -g option of a command or setting the VXVM_DEFAULTDG environment va riable. An alternative to these two methods is to configure the default disk gr oup of a system. Evaluating which systems can now have their default disk group configured... vxconfigd on system E220 is not available -- cannot set the default disk group. None of the target systems can be configured because 1) its previous configurati on was restored, 2) the vxconfigd daemon is not running properly, or 3) VxVM is already configured. Use the vxdctl(1M) command to configure the default disk group after the install ation is completed. Press [Return] to continue:

Not starting VxVM daemons on E220: vxconfigd is not enabled. Volume Manager was started successfully. Press [Return] to continue: VERITAS VOLUME MANAG ER 4.0 INSTALLATION PROGRAM Installation of Volume Manager 4.0 has completed successfully. The installation summary is saved at: /opt/VRTS/install/logs/installvm511110320.summary The installvm log is saved at: /opt/VRTS/install/logs/installvm511110320.log The installation response file is saved at: /opt/VRTS/install/logs/installvm511110320.response * Follow this step only if licences are not installed succesfully when installi ng VxVM in the previous step.* # /opt/VRTSvlic/bin/vxlicinst VERITAS License Manager vxlicinst utility version 3.00.007d Copyright (C) VERITAS Software Corp 2002. All Rights reserved. Enter your license key : 1144 3385 4498 7652 4920 229 Key successfully installed in /etc/vx/licenses/lic/11443385449876524920229.vxlic Install VXVM license key and start vxconfigd demons # vxinstall

VxVM uses license keys to control access. If you have not yet installed a VxVM l icense key on your system, you will need to do so if you want to use the full fu nctionality of the product. Licensing information: System host ID:<hostid> Host type:<server-id> Are you prepared to enter a license key [y,n,q] (default: n) y Do you want to use enclosure based names for all disks ? [y,n,q,?] (default: n) Do you want to setup a system wide default disk group ? [y,n,q,?] (default: y) And some default questions. This will end with the process installed successfull y. Next step is to encapsulate root disk # vxdiskadm Volume Manager Support Operations Menu: VolumeManager/Disk 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 list ? ?? q Add or initialize one or more disks Encapsulate one or more disks Remove a disk Remove a disk for replacement Replace a failed or removed disk Mirror volumes on a disk Move volumes from a disk Enable access to (import) a disk group Remove access to (deport) a disk group Enable (online) a disk device Disable (offline) a disk device Mark a disk as a spare for a disk group Turn off the spare flag on a disk Unrelocate subdisks back to a disk Exclude a disk from hot-relocation use Make a disk available for hot-relocation use Prevent multipathing/Suppress devices from VxVM's view Allow multipathing/Unsuppress devices from VxVM's view List currently suppressed/non-multipathed devices Change the disk naming scheme Get the newly connected/zoned disks in VxVM view Change/Display the default disk layouts Mark a disk as allocator-reserved for a disk group Turn off the allocator-reserved flag on a disk List disk information Display help about menu Display help about the menuing system Exit from menus

Select an operation to perform: 2 Encapsulate one or more disks Menu: VolumeManager/Disk/Encapsulate Use this operation to convert one or more disks to use the Volume Manager.

This adds the disks to a disk group and replaces existing partitions with volumes. Disk encapsulation requires a reboot for the changes to take effect. More than one disk or pattern may be entered at the prompt. Here are some disk selection examples: all: c3 c4t2: c3t4d2: xyz_0 : xyz_ : all disks all disks on both controller 3 and controller 4, target 2 a single disk (in the c#t#d# naming scheme) a single disk (in the enclosure based naming scheme) all disks on the enclosure whose name is xyz

Select disk devices to encapsulate: [<pattern-list>,all,list,q,?] list DEVICE c0t0d0 c0t1d0 DISK GROUP STATUS online invalid online

Select disk devices to encapsulate: [<pattern-list>,all,list,q,?] c0t0d0 Here is the disk selected. Output format: [Device_Name] c0t0d0 Continue operation? [y,n,q,?] (default: y) You can choose to add this disk to an existing disk group or to a new disk group. To create a new disk group, select a disk group name that does not yet exist. Which disk group [<group>,list,q,?] (default: rootdg) Use a default disk name for the disk? [y,n,q,?] (default: y) The selected disks will be encapsulated and added to the rootdg disk group with default disk names. c0t0d0 Use a default disk name for the disk? [y,n,q,?] (default: y) Add disk as a spare disk for rootdg? [y,n,q,?] (default: n) Exclude disk from hot-relocation use? [y,n,q,?] (default: n) A new disk group will be created named rootdg and the selected disks will be added to the disk group with default disk names. c0t0d0 Continue with encapsulation? [y,n,q,?] (default: y) A new disk group rootdg will be created and the disk device c0t0d0 will be encapsulated and added to the disk group with the disk name rootdg01. Enter desired private region length [<privlen>,q,?] (default: 2048) The c0t0d0 disk has been configured for encapsulation.

The first stage of encapsulation has completed successfully. You should now reboot your system at the earliest possible opportunity. The encapsulation will require two or three reboots which will happen automatically after the next reboot. To reboot execute the command: shutdown -g0 -y -i6 This will update the /etc/vfstab file so that volume devices are used to mount the file systems on this disk device. You will need to update any other references such as backup scripts, databases, or manually created swap devices. # shutdown -g0 -y -i6 ... Reboot the system Now next step is to initilized the second disk bash-2.05# vxdiskadm Volume Manager Support Operations Menu: VolumeManager/Disk 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 list ? ?? q Add or initialize one or more disks Encapsulate one or more disks Remove a disk Remove a disk for replacement Replace a failed or removed disk Mirror volumes on a disk Move volumes from a disk Enable access to (import) a disk group Remove access to (deport) a disk group Enable (online) a disk device Disable (offline) a disk device Mark a disk as a spare for a disk group Turn off the spare flag on a disk Unrelocate subdisks back to a disk Exclude a disk from hot-relocation use Make a disk available for hot-relocation use Prevent multipathing/Suppress devices from VxVM's view Allow multipathing/Unsuppress devices from VxVM's view List currently suppressed/non-multipathed devices Change the disk naming scheme Get the newly connected/zoned disks in VxVM view Change/Display the default disk layouts Mark a disk as allocator-reserved for a disk group Turn off the allocator-reserved flag on a disk List disk information Display help about menu Display help about the menuing system Exit from menus

Select an operation to perform: 1 Follow the steps. Dont forget to keep it in the same disk group as the root disk. Make this disk "Sliced" when it asked for (CDS, SLiced, Simple)

And say no when it asks for Encapsulation and quit from the menu. Then quit from the menu. Run the following command to see the disk group and type of both disk it should be same. # vxdisk -o alldgs list ( It will look like this) DEVICE c0t0d0s2 c0t1d0s2 TYPE auto:sliced auto:sliced DISK rootdg01 rootdg02 GROUP rootdg rootdg STATUS online online

Now mirror the Operating system # vxdiskadm Volume Manager Support Operations Menu: VolumeManager/Disk 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 list ? ?? q Add or initialize one or more disks Encapsulate one or more disks Remove a disk Remove a disk for replacement Replace a failed or removed disk Mirror volumes on a disk Move volumes from a disk Enable access to (import) a disk group Remove access to (deport) a disk group Enable (online) a disk device Disable (offline) a disk device Mark a disk as a spare for a disk group Turn off the spare flag on a disk Unrelocate subdisks back to a disk Exclude a disk from hot-relocation use Make a disk available for hot-relocation use Prevent multipathing/Suppress devices from VxVM's view Allow multipathing/Unsuppress devices from VxVM's view List currently suppressed/non-multipathed devices Change the disk naming scheme Get the newly connected/zoned disks in VxVM view Change/Display the default disk layouts Mark a disk as allocator-reserved for a disk group Turn off the allocator-reserved flag on a disk List disk information Display help about menu Display help about the menuing system Exit from menus

Select an operation to perform: 6 Mirror volumes on a disk Menu: VolumeManager/Disk/Mirror This operation can be used to mirror volumes on a disk. These volumes can be be mirrored onto another disk or onto any available disk space. Volumes will not be mirrored if they are already mirrored. Also, volumes that are comprised of more than

one subdisk will not be mirrored. Mirroring volumes from the boot disk will produce a disk that can be used as an alternate boot disk. At the prompt below, supply the name of the disk containing the volumes to be mirrored. Enter disk name [<disk>,list,q,?] list Disk group: rootdg DM NAME dm rootdg01 dm rootdg02 DEVICE c0t0d0s2 c0t1d0s2 TYPE auto auto PRIVLEN PUBLEN 9423 4455 STATE

35358848 35358848 -

Enter disk name [<disk>,list,q,?] rootdg01 You can choose to mirror volumes from disk rootdg01 onto any available disk space, or you can choose to mirror onto a specific disk. To mirror to a specific disk, select the name of that disk. To mirror to any available disk space, select "any". Enter destination disk [<disk>,list,q,?] (default: any) rootdg02 The requested operation is to mirror all volumes on disk rootdg01 in disk group rootdg onto available disk space on disk rootdg02. VxVM NOTICE V-5-2-3650 This operation can take a long time to complete. Continue with operation? [y,n,q,?] (default: y) VxVM vxmirror INFO V-5-2-22 Mirror volume rootvol ... VxVM vxmirror INFO V-5-2-22 Mirror volume swapvol ... VxVM vxmirror INFO V-5-2-22 Mirror volume var ... VxVM INFO V-5-2-674 Mirroring of disk rootdg01 is complete. Mirror volumes on another disk? [y,n,q,?] (default: n) q Having completed mirroring look for the output # vxprint -ht Now from ok prompt try to boot from either root disk or root mirror disk.

Вам также может понравиться