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

vxvm root mirroring in solaris 10 steps Recommendations: 1.

The disk which holds the Solaris Operating System and the disk where the operating system is to be mirrored could be with same geometry. 2. Copy the /etc/system file and /etc/vfstab file as a precaution before initiating the changes. Condition: 1. The disk (which has the operating system) and the disk going to have the mirror should be brought under the control of volume manager only with Sliced layout. 2. Here the disk had been brought under the volume manager control as mentioned above under the disk group named rootdg 3. We have to bring the disk (which has the operating system) under the control of volume manager through Encapsulation. This is done to preserve the data, contained in the disk. Output: Before bringing the disk under the volume manager control: bash-3.00# vxdisk list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:none - - online invalid c1t1d0s2 auto:none online invalid c2t3d0s2 auto:simple - - online invalid c2t5d0s2 auto:cdsdisk oradg1 oradg online c2t9d0s2 auto:cdsdisk oradg2 oradg online c2t10d0s2 auto:cdsdisk oradg3 oradg online c2t12d0s2 auto:cdsdisk oradg4 oradg online

Steps followed: # cp /etc/system /etc/system.orig.bkp # cp /etc/vfstab /etc/vfstab.orig.bkp # vxdiskadm Choose the option: 2 Used to bring the disk under volume manager control through encapsulation. This utility will guide us, while bringing the disk under volume control bring it wit h Sliced layout, under the group rootdg . Initially the disk group named rootdg will not exist. Create the same at time of i nitiating the disk. Once the disk ( OS disk ) is brought under the control of volume manager, it req uires to restart the system twice. Once the system is restarted, we can observe the changes to the file /etc/system and /etc/vfstab. Output : /etc/vfstab (After restarting the system twice) bash-3.00# cat /etc/vfstab #device device mount FS fsck mount mount

#to mount to fsck point type pass at boot options # fd - /dev/fd fd - no /proc - /proc proc - no /dev/vx/dsk/bootdg/swapvol - - swap - no nologging /dev/vx/dsk/bootdg/rootvol /dev/vx/rdsk/bootdg/rootvol / ufs 1 no nologging /devices - /devices devfs - no sharefs - /etc/dfs/sharetab sharefs - no ctfs - /system/contract ctfs - no objfs - /system/object objfs - no swap - /tmp tmpfs - yes #/dev/dsk/c1t1d0s3 /dev/rdsk/c1t1d0s3 /mnt/veritas ufs - yes #NOTE: volume rootvol (/) encapsulated partition c1t0d0s0 #NOTE: volume swapvol (swap) encapsulated partition c1t0d0s1 Note: 1. rootvol and swapvol should exist in the disk group that is chosen to be boot disk group.(Also, with name rootvol and swapvol, volumes can be created on other disk groups.) Only the rootvol and swapvol in bootdg can be used to boot the sy stem. 2. bootdg is an alias for the disk group that contains the volumes that are used to boot the system. 3. Volume manager sets bootdg to the appropriate disk group, if it takes the con trol of the root disk. Otherwise, bootdg is set to nodg (no disk group). We can observe the changes by executing # vxprint vt We have to bring the next disk under the volume manager control as above with sl iced layout either by using # vxdiskadm utility or by executing # vxdisksetup i c1t1d0 format=sliced

Note: Here system has to be restarted twice. Output: After bringing both the disk under the disk group (rootdg) with sliced l ayout. bash-3.00# vxdisk list DEVICE TYPE DISK GROUP STATUS c1t0d0s2 auto:sliced rootdg01 rootdg online c1t1d0s2 auto:sliced rootdg02 rootdg online c2t3d0s2 auto:simple - - online invalid c2t5d0s2 auto:cdsdisk oradg1 oradg online c2t9d0s2 auto:cdsdisk oradg2 oradg online c2t10d0s2 auto:cdsdisk oradg3 oradg online c2t12d0s2 auto:cdsdisk oradg4 oradg online

# vxmake g rootdg mirror rootvol will mirror the root. The sync status can be observed in another terminal by executing # vxtask list This takes some time sync. or # vxmirror g rootdg a This command, mirrors all existing volumes for the specified disk group. Note: # vxmirror 1. Provides a mechanism to mirror all non-mirrored volumes, that are located on a specified disk, to mirror all currently non-mirrored volumes in the specified disk group. 2. To change or display the current defaults for mirroring 3. All volumes that have only a single plex (mirror copy), are mirrored by adding additional plex. 4. Volumes containing sub-disks that reside on MORE THAN ONE DISK ARE NOT MIRRORED by this vxmirror command.

Similarly to mirror the swap, # vxmake g rootdg mirror swapvol

Outputs: After mirroring the root bash-3.00# df -h Filesystem size used avail capacity Mounted on /dev/vx/dsk/bootdg/rootvol 5.8G 5.3G 465M 93% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 2.0G 1.6M 2.0G 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab /platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1 5.8G 5.3G 465M 93% /platform/sun4u-us3/lib/libc_psr.so.1 /platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 5.8G 5.3G 465M 93% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1 fd 0K 0K 0K 0% /dev/fd swap 2.0G 120K 2.0G 1% /tmp swap 2.0G 40K 2.0G 1% /var/run swap 2.0G 0K 2.0G 0% /dev/vx/dmp swap 2.0G 0K 2.0G 0% /dev/vx/rdmp

bash-3.00# vxprint -s

Disk group: rootdg TY sd sd sd sd sd NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 rootdg01-B0 swapvol-01 ENABLED 1 0 - - Block0 rootdg01-01 swapvol-01 ENABLED 4097330 1 - - rootdg01-02 rootvol-01 ENABLED 12288402 0 - - rootdg02-01 rootvol-02 ENABLED 12288402 0 - - rootdg02-02 swapvol-02 ENABLED 4097331 0 - -

bash-3.00# vxprint -p Disk group: rootdg TY pl pl pl pl NAME ASSOC rootvol-01 rootvol-02 swapvol-01 swapvol-02 KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 rootvol ENABLED 12288402 - ACTIVE - rootvol ENABLED 12288402 - ACTIVE - swapvol ENABLED 4097331 - ACTIVE - swapvol ENABLED 4097331 - ACTIVE - -

bash-3.00# vxprint -v Disk group: rootdg TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0 v rootvol root ENABLED 12288402 - ACTIVE - v swapvol swap ENABLED 4097331 - ACTIVE -

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