Plex Mirroring for Business Continuity With Veritas Volume Manager and the Solaris 10 OSPradeep Baby, November 2009 Target Readers: Professionals interested in Veritas who have mid-level knowledge of the Solaris Operating System and Veritas technology. IntroductionApplications, the network, the OS, database, and storage are the major components of a data center. In huge data centers the data redundancy and business continuity are attained by means of centralized storage with RAID configurations. But here I am interested in configuring and demonstrating a business continuity setup in a small environment using the Solaris OS and Veritas Volume Manager (VxVM) from Symantec. Professionals who have experience with the Solaris OS and Veritas should be able to understand the concepts quickly; I am not discussing the basic commands and concepts. Brief DescriptionHere I am using Veritas Storage Foundation 4.1 version on the Solaris 10 OS. I have
added three 10 GB disks to the Veritas disk group, keeping one disk as
a spare for hot relocation. I created a mirrored volume with two
other disks that are for hot relocation use in the same disk group.
Here I did not use Summary of steps followed in the procedure:
Step-by-Step Procedure for Configuring the Mirror1. Add the three disks to the disk group.First, use the # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_1 auto:none - - online invalid Disk_2 auto:none - - online invalid Disk_3 auto:none - - online invalid Add the three disks ( # vxdiskadm
Executing
For all other options, use the default settings as input. One such option is to include the disk in hot relocation use. After we add the disk to the VxVM control, the disks are visible as follows: # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_0 auto:none - - online invalid Disk_1 auto:cdsdisk pbn-test01 pbn-test online Disk_2 auto:cdsdisk pbn-test02 pbn-test online Disk_3 auto:cdsdisk pbn-test03 pbn-test online The default disk name 2. Make one disk as spare for hot relocation.Assign one disk, for example # vxedit -g pbn-test set spare=on pbn-test03 Use the # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_1 auto:cdsdisk pbn-test01 pbn-test online Disk_2 auto:cdsdisk pbn-test02 pbn-test online Disk_3 auto:cdsdisk pbn-test03 pbn-test online spare Make sure that all other disks are in hot relocation use. As we can see, Use the # vxedit -g pbn-test set nohotuse=on pbn-test01 Check the status of the disks again using the # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_1 auto:cdsdisk pbn-test01 pbn-test online nohotuse Disk_2 auto:cdsdisk pbn-test02 pbn-test online Disk_3 auto:cdsdisk pbn-test03 pbn-test online spare To make the disk # vxedit -g pbn-test set nohotuse=off pbn-test01 Check the status of the disks. # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_1 auto:cdsdisk pbn-test01 pbn-test online Disk_2 auto:cdsdisk pbn-test02 pbn-test online Disk_3 auto:cdsdisk pbn-test03 pbn-test online spare 3. Create two different subdisks using the two vmdisks.# vxprint -ht Disk group: pbn-test DG NAME NCONFIG NLOG MINORS GROUP-ID ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK CO NAME CACHEVOL KSTATE STATE VT NAME NVOLUME KSTATE STATE V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO dg pbn-test default default 54000 1250332486.37.f50318-11 dm pbn-test01 Disk_1 auto 2048 20967936 - dm pbn-test02 Disk_2 auto 2048 20967936 - dm pbn-test03 Disk_3 auto 2048 20967936 - From the We are making use of a complete disk to create the subdisks, so in this case, we are creating subdisk # vxmake -g pbn-test sd pt-sd1 pbn-test01,0,20967936 # vxmake -g pbn-test sd pt-sd2 pbn-test02,0,20967936 Run the # vxprint -ht Disk group: pbn-test DG NAME NCONFIG NLOG MINORS GROUP-ID ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK CO NAME CACHEVOL KSTATE STATE VT NAME NVOLUME KSTATE STATE V NAME RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO dg pbn-test default default 54000 1250332486.37.f50318-11 dm pbn-test01 Disk_1 auto 2048 20967936 - dm pbn-test02 Disk_2 auto 2048 20967936 - dm pbn-test03 Disk_3 auto 2048 20967936 SPARE sd pt-sd1 - pbn-test01 0 20967936 - Disk_1 ENA sd pt-sd2 - pbn-test02 0 20967936 - Disk_2 ENA The output shows we have created two subdisks with the names 4. Attach the subdisks to two plexes.Like metadevices in Solaris Volume Manager, the file systems are mounted using volumes in Veritas, and these volumes are created by attaching plexes to volumes. These plexes are made of subdisks. In this case, we are creating two plexes ( # vxmake -g pbn-test plex pt-plex01 sd=pt-sd1 # vxmake -g pbn-test plex pt-plex02 sd=pt-sd2 Run the # vxprint -ht Disk group: pbn-test : : : dg pbn-test default default 54000 1250332486.37.f50318-11 dm pbn-test01 Disk_1 auto 2048 20967936 - dm pbn-test02 Disk_2 auto 2048 20967936 - dm pbn-test03 Disk_3 auto 2048 20967936 SPARE pl pt-plex01 - DISABLED - 20967936 CONCAT - RW sd pt-sd1 pt-plex01 pbn-test01 0 20967936 0 Disk_1 ENA pl pt-plex02 - DISABLED - 20967936 CONCAT - RW sd pt-sd2 pt-plex02 pbn-test02 0 20967936 0 Disk_2 ENA 5. Associate the plexes to a volume.The volume name is # vxmake -g pbn-test -U fsgen vol pbn-vol1 \ plex=pt-plex02,pt-plex01 Next we start the volume. # vxvol -g pbn-test start pbn-vol1 At this point in time, if you check the task, you can see the synching is happening with the two plexes: # sudo vxtask list TASKID PTID TYPE/STATE PCT PROGRESS 174RDWRBACK/R 45.33% 0/20967936/9504768 VOLSTART pbn-vol1 pbn-test And the dg pbn-test default default 54000 1250332486.37.f50318-11 dm pbn-test01 Disk_1 auto 2048 20967936 - dm pbn-test02 Disk_2 auto 2048 20967936 - dm pbn-test03 Disk_3 auto 2048 20967936 SPARE v pbn-vol1 - ENABLED ACTIVE 20967936 ROUND - fsgen pl pt-plex01 pbn-vol1 ENABLED ACTIVE 20967936 CONCAT - RW sd pt-sd1 pt-plex01 pbn-test01 0 20967936 0 Disk_1 ENA pl pt-plex02 pbn-vol1 ENABLED ACTIVE 20967936 CONCAT - RW sd pt-sd2 pt-plex02 pbn-test02 0 20967936 0 Disk_2 ENA Here our volume 6. Create the file system using the raw device and mount it on the server.# mkfs -F vxfs /dev/vx/rdsk/pbn-test/pbn-vol1 Mount the file system on a mount point: # mount -F vxfs /dev/vx/dsk/pbn-test/pbn-vol2 /pbn-mnt So the file system is up and ready for use. 7. Fail one of the mirrored disks from the Veritas volume.
We fail one of the vmdisks for the purpose of demonstration. In this case, I removed the disk # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_0 auto:none - - online invalid Disk_1 auto:cdsdisk pbn-test01 pbn-test online Disk_2 auto - - error Disk_3 auto:cdsdisk pbn-test03 pbn-test online spare We see error status for 8. Verify that Veritas has reconfigured the failed disk.Here we verify that Veritas has replaced the failed disk automatically with the spare disk. On the TASKID PTID TYPE/STATE PCT PROGRESS VxVM vxtask WARNING V-5-1-2497 Unable to get disk group record: Record not in disk group 342 PARENT/R 0.00% 1/0(1) VXRECOVER 0.0 0.0 343 343 ATCOPY/R 00.10% 0/20967936/20480 PLXATT 0.1051 0.1048 1024.36 : : TASKID PTID TYPE/STATE PCT PROGRESS VxVM vxtask WARNING V-5-1-2497 Unable to get disk group record: Record not in disk group 342 PARENT/R 0.00% 1/0(1) VXRECOVER 0.0 0.0 343 343 ATCOPY/R 99.37% 0/20967936/20836352 PLXATT 0.1051 0.1048 1024.36 TASKID PTID TYPE/STATE PCT PROGRESS From And here is the output from dg pbn-test default default 54000 1250332486.37.f50318-11 dm pbn-test01 Disk_1 auto 2048 20967936 - dm pbn-test02 - - - - NODEVICE dm pbn-test03 Disk_3 auto 2048 20967936 SPARE v pbn-vol1 - ENABLED ACTIVE 20967936 ROUND - fsgen pl pt-plex01 pbn-vol1 ENABLED ACTIVE 20967936 CONCAT - RW sd pt-sd1 pt-plex01 pbn-test01 0 20967936 0 Disk_1 ENA pl pt-plex02 pbn-vol1 ENABLED STALE 20967936 CONCAT - WO sd pbn-test03-01 pt-plex02 pbn-test03 0 20967936 0 Disk_3 ENA So here VxVM has automatically assigned the spare disk # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_1 auto:cdsdisk pbn-test01 pbn-test online Disk_3 auto:cdsdisk pbn-test03 pbn-test online spare - - pbn-test02 pbn-test failed was:Disk_2 This shows 9. Replace the failed disk with another disk and check how Veritas reverts the configuration automatically.Here we check that Veritas automatically reconfigures the failed disk and makes the spare disk available for reuse. I made # vxdisksetup -i Disk_2 Use the # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_1 auto:cdsdisk pbn-test01 pbn-test online Disk_2 auto:cdsdisk - - online Disk_3 auto:cdsdisk pbn-test03 pbn-test online spare - - pbn-test02 pbn-test failed was:Disk_2 Using the # vxdiskadm From the menu, I selected the fifth option to replace a failed disk. I used "list" when asked for selecting the disk, and from the list I selected the failed disk. At this point, Veritas shows the disks that are available for replacement. You can select the disk to use as a replacement. Select the default settings and proceed. # vxdisk list DEVICE TYPE DISK GROUP STATUS Disk_1 auto:cdsdisk pbn-test01 pbn-test online Disk_2 auto:cdsdisk pbn-test02 pbn-test online Disk_3 auto:cdsdisk pbn-test03 pbn-test online spare Thus we can see that everything is reconfigured and
Comments (latest comments first)Discuss and comment on this resource in the BigAdmin Wiki
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics | ||||||||||