400
'symantec.. VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 100·002353·A

-bheritas5fundamentals-

  • Upload
    raryal

  • View
    1.493

  • Download
    1

Embed Size (px)

DESCRIPTION

 

Citation preview

  • 1. 'symantec.. VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 100002353A

2. COURSE DEVELOPERS Gail Ade~ BilJ,(eGerrits lECHNICAL CONTRIBUTORS AND REVIEWERS Jade ArrinJ,(lolI :Iargy Cassid~ Ro~' Freeman Joe Gallagher Bruce Garner Tomer G urantz Bill Havev Geue Henriksen Gerald Jackson Haymond Karns Bill Lehman Boh l.ucas Durivunc Manikhung Chr'istlan Rahanus Dan Rugers Kleher Saldanha Albrecht Scriba "liehe! Simoni Anaudu Sirisena Pete 'Iuemmes Copyright' 2006 Symamec Corporation. All rights reserved. Symantcc. the Symanrec Logo. and "LRITAS arc trademarks or registered trademarks uf 5) mantee Corporation Of its alfiluues in the U.S. and other countries. Other names may be trademarks of their respective owners. -I IllS PUBLICATION IS I'ROVIDfD "AS IS" AND ALL EXPRESS OR IMPLllDCONIlITIONS. REPRESENTArJONS AND WARRANTIES. INCLUDIN(i ANY 11PLlUl WARRANTY OF MFRCHANTA81L1TY. IITNI.sS FOR A PARIICULAR PURPOSE OR NON- INFRIN(iI:MEN r. ARL DISCLAIiIED. EXCEl'! TO THE FXTEN! rHAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. SYIANTI:C CORPORATION SHAl.L NOT HE L1ABLI: lOR INCIDENTAL OR CONSEQULNTIAL DA1AGI-.S IN CONNECTION WITH (HI FURNISHING. PERIC)RMANCE. OR USE OF THIS PUIlLlCAIION. TH~. INFORIATION CONTAINLD H!:RUN IS SUBJECT ro CHANtiE WITHOUT NOTICE. No part orthe contents ofthis hook may be reproduced or transmitted in any torm or b) any means without the , riuen permission of the publisher. tLRIT-l.')' ::';/orugc FOflllllulion 5.0 /iw [,i;V/.': Fundamentals Symnnrec Corporation ~03305te ens Creek 81 U. Cupertino. CA ()SOI4 3. Table of Contents Course Introduction What Is Storage Virtualization?. Introducing VERITAS Storage Foundation VERITAS Storage Foundation Curriculum .. Lesson 1: Virtual Objects Physical Data Storage Virtual Data Storage Volume Manager Storage Objects Volume Manager RAID Levels .. Lesson 2: Installation and Interfaces Installation Prerequisites . Adding License Keys.. . . VERITAS Software Packages .. Installing Storage Foundation. Storage Foundation User Interfaces. Managing the VEA Software Lesson 3: Creating a Volume and File System Preparing Disks and Disk Groups for Volume Creation Creating a Volume . Adding a File System to a Volume Displaying Volume Configuration Information ... Displaying Disk and Disk Group Information Removing Volumes, Disks, and Disk Groups Lesson 4: Selecting Volume Layouts Comparing Volume Layouts ..... Creating Volumes with Various Layouts. Creating a Layered Volume . Allocating Storage for Volumes . Lesson 5: Making Basic Configuration Changes Administering Mirrored Volumes . Resizing a Volume . Moving Data Between Systems Renaming Disks and Disk Groups Managing Old Disk Group Versions .. Table of Contents Copyrigtlt ,( 2006 Svmantec Corporation All rights reserved Intro-2 Intro-6 Intro-11 1-3 1-10 1-13 1-15 2-3 .... 2-5 . 2-7 2-10 2-16 2-21 ...... 3-3 3-12 318 3-21 3-24 3-30 . 4-3 . 4-9 4-18 .425 5-3 5-10 5-16 5-21 5-23 4. Lesson 6: Administering File Systems Comparing the Allocation Policies of VxFS and Traditional File Systems 6-3 Using VERITAS File System Commands 6-5 Controlling File System Fragmentation 6-9 Logging in VxFS , 6-15 Lesson 7: Resolving Hardware Problems How Does VxVM Interpret Failures in Hardware 7-3 Recovering Disabled Disk Groups "" , 7-8 Resolving Disk Failures ,.., , 7-12 Managing Hot Relocation at the Host Level , ,... 7-22 Appendix A: Lab Exercises Lab 1: Introducing the Lab Environment , A-3 Lab 2: Installation and Interfaces ,..,.., A-7 Lab 3: Creating a Volume and File System ,..,.., , A-15 Lab 4: Selecting Volume Layouts , A-21 Lab 5: Making Basic Configuration Changes , , A-29 Lab 6: Administering File Systems...... .. ,.., A-37 Lab 7: Resolving Hardware Problems.. ...., ,.., A-47 Appendix B: Lab Solutions Lab 1 Solutions: Introducing the Lab Environment ,.., B-3 Lab 2 Solutions: Installation and Interfaces , , , B-7 Lab 3 Solutions: Creating a Volume and File System , ,.., B-21 Lab 4 Solutions: Selecting Volume Layouts ,.., B-33 Lab 5 Solutions: Making Basic Configuration Changes ,.." B-47 Lab 6 Solutions: Administering File Systems , " B-67 Lab 7 Solutions: Resolving Hardware Problems " "...................... B-85 Glossary Index VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Copyngt1t . t loi,-,q , '> ll"'''' ~ u; ,- ..." :: t,.i:.,,;~~' .'_..... Three ways to access tasks: 1. Menu bar 2. Toolbar 3. Context menu (right-click) ""'_==":;":'-':'...1 ~';':"'"d,.'.'. '" '~..,~ Using the VEA Interface The VERITAS Enterprise Administrator (VEA) is the graphical user interface for Storage Foundation and other VERITAS products. You can use the Storage Foundation features of VEA to administer disks, volumes, and file systems on local or remote machines. VEA is a Java-based interface that consists of a server and a client. You must install the VEA server on a UNIX machine that is running VERITAS Volume Manager. The VEA client can Tunon any machine that supports the Java 1.4 Runtime Environment, which can be Solaris. IIP-UX, AIX, Linux, or Windows. SOllie Storage Foundation features ofVEA include: Remote Administration Security Multiple Host Support Multiple Views of Objects Setting VE! Preferences You can customize general VEA environment auributes through the Preferences window (Select Tools - --Prcfcrcncev). Lesson 2 Installation and Interfaces 2-17 CopYllght ttl2006 Symanter. Corporation. All rights resetveo 54. symaruec VEA: Viewing Tasks and Commands To view underlying command lines, double-click a task. , *-'(:~New File System 2. ell: Create a mount point directory on which to mount the file system. VEA: Specify the mount point in the New File System dialog box. 3. CLI: Mount the volume to the mount point by using the mount command. VEA: If a file system was previously created on a volume, but not mounted, you can explicitly mount the file system by selecting Actions->File System-> Mount File System. Solaris I HP-UX I ~I~.J. LinuxJ Adding a File System to a Volume: CLI To add a file system to a volume from the command line. you must create the tile system. create a mount point for the tile system, and then mount the tile system. Solaris To create and mount a YxFS tile system: mkfs -F vxfs /dev/vx/rdsk/datadg/datavol mkdir /data mount -F vxfs /dev/vx/dsk/datadg/datavol /data To create and mount a UFS file system: newfs /dev/vx/rdsk/datadg/datavol mkdir Idata 3-18 COpyflglll~ 2006 Symantec Corporation All rights ro servoo VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 79. mount /dev/vx/dsk/datadg/datavol /data HI'-lIX To create and mount a YxFS file system: mkfs -F vxfs /dev/vx/rdsk/datadg/datavol mkdir /data mount -F vxfs /dev!vx/dsk/datadg/datavol /data To create and mount an IIFS file system: newfs -F hfs /dev/vx/rdsk/datadg/datavol mkdir /data mount -F hfs /dev/vx/dsk/datadg/datavol /data AIX To create and mount a YxFS file system using mkfs: mkfs -v vxfs /dev/vx/rdsk/datadg/datavol mkdir /data mount -v vxfs /dev/vx/dsk/datadg/datavol /data To create and mount a YxFS file system using crfs: crfs -v vxfs -d /dev/vx/rdsk/datadg/datavol -m /data -A yes Notes: An uppercase V is used with mkfs: a lowercase v is used with crfs (to avoid conflict with another crfs option). crfs creates the file system. creates the mount point. and updates the file systems file (/etc/filesystems). The -A yes option requests mount at boot. If the file system already exists in /etc/filesystems. you can mount the file system by simply using the syntax: mount mount_point. Linux To create and mount a YxFS file system using mkfs: mkfs -t vxfs /dev/vx/rdsk/datadg/datavol mkdir /data mount -t vxfs /dev/vx/dsk/datadg/datavol /data Lesson 3 Creating a Volume and File System Copyright rr 2006 Sjrnantec Co-potation All riglns reserved I 3-19 80. Mounting a File System at Boot To mount the file system automatically at boot time, edit the OS-specific file system table file to add an entry for the file system. Specify information, such as: Device to mount: Device to f sck: Mount point: File system type: fsck pass: Mount at boot: Mount options: /dev/vx/dsk/datadg/datavol /dev/vx/rdsk/datadg/datavol /data vxfs Mount Options Mount pOlnt,"C":Jd-cala---f ~ Create mount ~oinl syrnarucc. Mounting a File System at Boot Using CLI. if you want the tile system to be mounted at every system boot, you must edit the tile system table file by adding an entry for the file system. If you later decide to remove the volume. you must remove the entry in the tile system table tile. 1 yes C Read only '" Honor setujd Platform File System Tahle File Sularis /etc/vfstab HI'-UX /etc/fstab AIX letc/filesystems l.inux /etc/fstab AIX In AIX, you can use the following commands when working with the tile system table tile, /etc/filesystems: ToJew entnes lsfs mount po i nt: To change details of an entry, use chf s. For example. to turn off mount at boot chfs -A no mount po i nt: 111 YEA. in the Mount File System dialog. mark the "Add to tile system table" and "Mount at boot" (not on HP-UX) check boxes. the entry is made in the file system table tile automatically. Ifthe volume is later removed through YEA. its corresponding tile system table tile entry is also removed automatically. 3-20 COPYJlyht& 2006 Svmantec Corporation. All nqlns reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 81. S)111'l!1t('( I Displaying Volume Information: CLI To display volume configuration information: vxprint -g diskgroup [options] -vpsd Select only volumes (v), plexes (p), subdisks (s), or disks (d). List hierarchies below selected records. Display related records of a volume containing subvolumes. Print single-line output records that depend upon the configuration record type. Display all information from each selected record. -h -r -t -1 - a Display all information about each selected record, one record per line. -A Select from all active disk groups. -e pattern Show records that match an editor pattern. Displaying Volume Configuration Information Displaying Volume Layout Information: ell The vxprint Command You can use the vxpr int command to display information about how a volume is configured. This command displays records from the VxVM configuration database. vxprint -g diskgroup [options] The vxpr int command can display information about disk groups. disk media. volumes. plcxes, and subdisks. You can specify a variety of options with the command to expand or restrict the information displayed. Only some of the options are presented in this training. For more information about additional options. see the vxprint (Lm) manual page. Lesson 3 Creating a Volume and File System 3-21 Copvnqbt ;f' 2006 svroeruec co.oorauco All rights reserved 82. auto auto auto auto 2048 2048 2048 2048 4191264 4191264 4191264 4191264 Displaying Volume Information: ell...- ...-..-...----.--~--.--.-- ..-....-- ..-..-~-.------. vxprint -9 datad9 -ht I more I OG NAME NCONFlG NLOG MINORS GROUP-ID ST NAME STATE DM CNT SPARE CNT APPVOL_ CNT OM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT IlV9 CDS "es Disks: Volumes ColTtlnt'l9!iion Yes Version 140 EtlBblM 'tag JlLl/V.ftlo"ornooe- 01"" uetacn pOll Olobal Ol$kgroupfail POlicy Dgdlsabl~ .AJlo!pd snes 911a ConSIstency O. sne: 3 ~-':f, ,-.p rree eper e 1 :::~:I:, ,.,[3 Viewing Disk Group Properties: VEA Lesson 3 Creating a Volume and File System Copynqht '''' 2006 Syrnantec Corporanon All rights reserved 3-29 90. syrnantec Removing a Volume When a volume is removed, the space used by the volume is freed and can be used elsewhere. Unmount the file system before removing the volume. VEA: Select the volume that you want to remove. Select Actions->Delete Volume. vxassist remove volume: vxassist -g diskgroup remove volume volume name vxassist -g datadg remove volume datavol vxedit: vxedit -g diskgrollp -rf rm volume name vxedit -g datadg -rf rm datavol Removing Volumes, Disks, and Disk Groups Removing a Volume Only remove a volume if you are sure that you do not need the data in the volume, or if the data is backed up elsewhere. A volume must be closed before it can be removed. For example. if the volume contains a tile system. the tile system must be unmounted. You must edit the OS-specitic tile system table tile manually in order to remove the entry for the tile system and avoid errors at boot. If the volume is used as a raw device. the application. such as a database. must close the device. 3-30 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Cupyllghl'f: 20(}6 S,.rnEvacuate Disk. vxdiskadm: "Move volumes from a disk" ell: vxevac -g d i ek qr oiip from disk [to_disk] vxevac -g datadg datadgOl datadg02 To evacuate to any disk except for datadg03: vxevac -g datadg datadg02 !datadg03 Evacuating a disk moves the contents of the volumes on a disk to another disk. The contents of a disk can be evacuated only to disks in the same disk group that hale sufficient free space. Evacuating a Disk Lesson 3 Creating a Volume and File System Copyrighl '[~ 2006 Syrnantec Corporation All rights reserved 3-31 92. symnntrc roup VEA: Select the disk that you want to remove. Select Actions->Remove Disk from Disk Group. vxdiskadm: "Remove a disk" ell: vxdg -g diskgroup rmdisk disk_name Remove the disk from the diskvxdiskunsetup [-CJ device_tag Example: group, and then uninitiatize it. vxdg -g datadg rmdisk datadg02 vxdiskunsetup Disk 2 Removing a Disk I f you select all disks for removal from the disk group, the disk group is destroyed automatically. You can verify the removal by using the vxdisk list command to display disk information. A deconfigured disk has a status ofonline invalid and no longer has a disk media name or disk group assignment. The vxdiskunsetup Command After the disk has been removed from its disk group. you can remove it from Volume Manager control completely by using the vxdiskunsetup command. This command reverses the configuration of a disk by removing the public and private regions that were created by the vxdisksetup command. The vxdiskunsetup command docs not operate on disks that are active members of an imported disk group. This command does not usually operate on disks that appear to be imported by some other hostv for example, a host that shares access to the disk. You can use the - C option to force deconfiguration otthc disk, removing host locks that may be detected. 3-32 COPYright C:'2006 Symaotec Ccrporanoo All righLDestroy Disk Group ell: vxdg destroy diskgroup Example: To destroy the disk group olddg and place its disks in the free disk pool: vxdg destroy olddg IDestroying a Disk Group Destroying a disk group permanently removes a disk group from Volume Manager control, and the disk group ceasesto exist. When you destroy a disk group, all of the disks in the disk group are reinitialized as empty disks. Volumes and configuration information about the disk group are removed. Because you cannot remove the last disk in a disk group, destroying a disk group is the only method to free the last disk in a disk group for reuse. A disk group cannot be destroyed ilany volumes in that disk group arc in use or contain mounted file systems. The bootdg disk group cannot be destroyed. Caution: Destroying a disk group can result in data loss. Only destroy a disk group if you are sure that the volumes and data in the disk group are not needed. Destroying a Disk Group: VEA Actions-c=Desrroy Disk GroupNavigation path: The disk group to be destroyedSelect: Input: Group name: Specify the disk group to be destroyed. Destroying a Disk Group: ell To destroy a disk group 11-0111the command line, use the vxdg destroy command. Note: You can hring back a destroyed disk group by importing it with its dgid. Lesson 3 Creating a Volume and File System Copyriglll =: 2006 Symantec Corporauoo All rights reserved 3-33 94. Labs and solutions for this lesson are located on the following pages: Appendix A provides complete lab instructions. "Lab :;. (I,';IIIII>! a V,)IIIlile' .uul File ~y'k'I11."page i-I~ Appendix B provides complete lab instructions and solutions. "/';iIJ 3 Sohuion-: Cn.:atillg 'I Volume and lrlc S'kPl." I'd!!': 1:121 Key Points In this lesson, you learned how to create a volume with a file system. This lesson also described device-naming schemes and how to add a disk to a disk group, in addition to how to view configuration information for volumes, disk groups, and disks, In addition, you learned how to remove a volume, disk, and disk group. Reference Materials - VERITAS Volume Manager Administrator's Guide - VERITAS Storage Foundation Installation Guide 3-34 svmantec. Lab 3 Lab 3: Creating a Volume and File System In this lab, you create new disk groups, simple volumes, and file systems, mount and unmount the file systems, and observe the volume and disk properties. The first exercise uses the VEA interface. The second exercise uses the command-line interface. For Lab Exercises, see Appendix A, For Lab Solutions, see Appendix B. Copynqnt', 2006 Svrnanu,c Corporatron. AUuqtus reserved VERITAS Storage Foundation 5,0 for UNIX: Fundamentals 95. Lesson 4 Selecting Volume Layouts 96. Lesson Introduction " Lesson 1: Virtual Objects " Lesson 2: Installation and Interfaces " Lesson 3: Creating a Volume and File System " ..~(!!>!>()Il~~:~E!'.(! Improved read"0 Simplified (if properly Fast recovery performance0( administration configured) through logging Fast recovery through logging ., No redundancy No redundancy Requires more Slower writeCIl 01 Single disk Single disk disk space performance s than mirroring e failure causes failure causes Slightly 10 volume failure. volume failure. slower write Poor>"0 performance performance10 ., after a disk 0 failure Comparing Volume Layouts IConcarcnatlon: Advantages Removes size restrictions: Concatenation removes the restriction on size or storage devices imposed by physical disk size. Better utlllzarlon of free space: Concatenation enables better utilization of free space on disks by providing for the ordering of available discrete disk space on multiple disks into a single addressable volume. Simplified administration: System administration complexity is reduced because making snapshots and mirrors uses any size space. and volumes can be increased in size by any available amount. Concatenation: Disadvantages No protection against disk failure: Concatenation does not protect against disk failure. A single disk failure results in the failure of the entire volume. Striping: Advantages Improved performance through parallel data transfer: Improved performance is obtained by increasing the effective bandwidth of the I '0 path to the data. This may be achieved by a single volume JiO operation spanning across a number of disks or by multiple concurrent volume 1/0 operations to more than one disk at the same time. Load-balancing: Striping is also helpful in balancing the I/O load from multiuser applications across multiple disks. Copyriqht '. 20(16 Syrnantec Corporation All dgtlls reserved 4-7Lesson 4 Selecting Volume Layouts 102. Striping: Disadvantages No redundancy: Striping alone offers no redundancy or recovery features. Disk failure: Striping a volume increases the chance that a disk failure results in failure of that volume, For example, if you have three volumes striped across two disks, and one of the disks is used by two of the volumes, then if that one disk goes down, both volumes go down. Mirroring: Advantages Improved reliability and availability: With concatenation or striping, failure of anyone disk makes the entire plex unusable. With mirroring, data is protected against the failure of anyone disk. Mirroring improves the reliability and availability of a striped or concatenated volume. Improved read performance: Reads benefit from having multiple places from which to read the data. Mirroring: Disadvantages Requires more disk space: Mirroring requires twice as much disk space, which can be costly for large configurations. Each mirrored plex requires enough space for a complete copy of the volume's data. Slightly slower write performance: Writing to volumes is slightly slower, because multiple copies have to be written in parallel. The overall time the write operation takes is determined by the time needed to write to the slowest disk involved in the operation. The slower write performance ofa mirrored volume is not generally significant enough to decide against its use. The benefit of the resilience that mirrored volumes provide outweighs the performance reduction. RAIO-5: Advantages Redundancy through parity: With a RAID-5 volume layout data can be re- created from remaining data and parity in case ofthe failure of one disk. Requires less space than mirroring: RAIO-5 stores parity information, rather than a complete copy of the data. Improved read performance: RAID-5 provides similar improvements in read performance as in a normal striped layout Fast recovery through logging: RAID-5 logging minimizes recovery time in case of disk failure. RAIO-5: Disadvantages Slow write performance: The performance overhead for writes can be substantial, because a write can involve much more than simply writing to a data block. A write can involve reading the old data and parity, computing the new parity, and writing the new data and parity. If you have more than twenty percent writes, do not use RAID-5. Very poor performance after a disk failure: After one column fails, all 1/0 performance goes down. This is not the case with mirroring, where a disk failure does not have any significant effect on performance. 4-8 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Couvnqnt ,~ 2006 Symantec Corpcratron All nqhts reserved 103. Selecting a Layout Type: VEA Specify volume attributes. Creating Volumes with Various Layouts You can create volumes with a variety or layouts. In V[i in the Specify Volume Attributes window. select: Layout: Select a layout type from the group of options. The default layout is concatenated. Concatenated:The volume is created using one or more regions of specified disks. Striped: The volume is striped across two or more disks. The default number of columns across which the volume is striped is two. and the default stripe unit size is 12X sectors (64K) on Solaris. iIX. and Linux: 128 sectors (128K) on I II'-UX. You can specify different values. ConcatenatedMirrored and Striped Mirrored: These options denote layered volume layouts. Mirror Info: Mirrored: Mirroring is recommended. To mirror the volume. mark the Mirrored check box. Only striped or concatenated volumes can be mirrored. RiID-S vol limes cannot be mirrored. Total mirrors: Type the total number of mirrors for the volume. i volume can have up to 32 plexcs: however. the practical limit is 31. One plex is reserved by VxVM to perform restructuring or relocation operations. ~olume name: ~~':;;";:~""~""~~~C~~"""'~'"" cornmgnt Si~e' Layout Minor Info .~. Concatenatel! ~! Qtrlped -:' fiAID-5 C; CQn(atenatE'd Mirrored C..StrlQed Mirrored r:-JEna~le [astResync f] !nltiallze zero Lesson 4 Selecting Volume Layouts COP/right '~~.2006 Svmantoc Corporation Ail right~ reserved I 4-9 104. svrnantec Concatenated Volume: CLI To create a concatenated volume: vxassist -g datadg make datavol 109 Disk group name This command creates a concatenated volume called datavol with a length of 10 gigabytes, in the disk group datadg, using any available disks. Creating a Concatenated Volume: CLI By default. vxassist creates a concatenated volume that uses one or more sections of disk space. The vxassist command attempts to locate sufficient contiguous space on one disk for the volume. However. if necessary, the volume is spanned across multiple disks. Vx VM selects the disks on which to create the volume. Note: To guarantee that a concatenated volume is created. include the Layout e nost ri pe attribute in the vxassist makecommand. Without the layout attribute. the default layout is used that may have been changed by the creation of the letc/default/vxassist file. For example: vxassist -g datadg make datavol 109 layout=nostripe If you want the volume to reside on specific disks. you can designate the disks by adding the disk media names to the end of the command. More than one disk can he specified. vxassist [-g diskgroupJ make volume name length [disks ... J 4-10 Copyright :,2006 Symantec Lorporatron All rights reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 105. To create a striped volume. you add the layout type and other attributes to the vxassist makecommand. layout=stripe designates the striped layout. ncol =n designates the number of stripes. or columns. across which the volume is created. This attribute has many aliases. For example. you can also use ns t r ipe e n or s t r ipe s e n. The minimum number or stripes in a volume is 2 and the maximum is R. You can edit these minimum and maximum values in /ete/default/ vxassist using the min _eol umns and max_eol umns attributes. stripeunit=size specifics the size of the stripe unit to he used. The default is MK. To stripe the volume across specific disks. you can specify the disk media names at the end of the command. The order in which disks are listed on the command line does not imply any ordering of disks within the volume layout. To exclude a disk or list of disks. add an exclamation point ( ! ) before the disk media names. For example. !datadgOl specifies that the disk datadgOl should not be used to create the volume. , 5)1 1;1111 -L-ay-o-u-t-V-i-e-w--I [jle liew /olurn" (j~tav(lI02 T~...pe ~:ttlpe(i Size 2097152 #(:01 c State Healthy #1!1irrors 1 Stripe Sz.1 28 ptex ciatavol(l201 Type ~::tripeli I r-r- Siale: P.,ltached r' PrefenecP No ~;tripe Sz 128 #Col: 2 Sul)(Jlsk (latadgO"102 Size "1048576 Colurnnl Offset 20~1T152 Plex Offset (I Usage. Strlpeci Subdlsk datadg(l2-01 t:izel(l48576 Column 0 Offset 0 F'lex Offset (I Usage Sltiped I SelectVieW->Hori~~;:;t~I~~----I' View->Verticalto changethe orientationof thediagram. Volume Layout Window The Volume Layout window displays a graphical view of the selected volume's layout, components, and properties. You can select objects or perform tasks on objects in the Volume Layout window. This window is dynamic. so the objects displayed in this window arc updated automatically when the volume's properties change. To display the Volume Layout window, highlight a volume and select Actions--->Layout View. The View menu changes the way objects are displayed in this window. Select Vicw->Horizontalto display a horizontal layout and View->Vertical to display a vcrticul layout. 4-14 Copyright ~ 2006 Svmantec Corporation AlIllghls reserveo VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 109. , S)111ill1ltX . Volume to Disk Mapping Window Dilk Group: daudg Volumes iii Click a triangle to hide subdisks. * j~..!.~_. .__ ._._ ...__ ._'~.,) Dilk Group: datadg o datodgOl-0l (0: 20111152) ~ Volumes datodgOl.02 (2091152: 1048516) 0dg02. datodg0201(0: 1048516) datodg02.01(0: 1048576) ~ ;' idatadg01 6 dol_'-01 (0: 2(97152) dol 102(2097152: 1048576) Click a dot to highlight an intersecting row and column. ',I IVolume to Disk Mapping Window The Volume to Disk Mapping window displays a tabular view of volumes and their relationships to underlying disks. To display the Volume to Disk Mapping window. highlight a disk group and select Actions vc-Disk/Volumc Map. To view subdisk layouts. click the triangle button to the left of the disk name. or select View-- >Expand All. To help identify thc row and column headings in a large grid, click a dot in the grid to highlight the intersecting row and column. Lesson 4 Selecting Volume Layouts 4-15 Copyrigh1'~ 200b Sjmaruec Corporation, All nghlS reserved 110. symarucc Volume View Window : Highlight a volume and select Actions->Volume View. "'-1" 1:.id:EX~~J'-"" .. .............. AddatavoI01!"':'!TYPe: Concat Size. 1.000 GB Mirrors 1 Logged: No IJJ I .:I3t3dg01.(l'1 II 1.(100 G8 LJdatavoI02!' IIType. Striped Size. 1.000 OB Mirrors 1 Logged. No jJ datadg0201 dal.ldg01-02 512 000 MB 512.000 M8 columnO cctvmrr 1 Volume View Window The Volume View window displays characteristics of the volumes on the disks. To display the Volume View window. select a volume or disk group and select Aetions->Volumc View. Display options in the Volume View window include: Expand: Click the Expand button to display detailed information about volumes. New volume: Click the New Volume button to invoke the New Volume wizard. 4-16 Copyright 'h- 21106 Symantec Coenor.auon All fights reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 111. ,S)111iHllt'(. The Disk View window displays a close-up graphical view of the layout of subdisks in a volume. To display the Disk View window. select a volume or disk group and select Actions->Disk View. Display options in the Disk View window include: Expand: Click the Expand button to display detailed information about all disks in the Disk View window. Vol Details: Click the Vol Details button to include volume names, layout types. and volume status for each subdisk. Projection: Click the Projection button to highlight objects associated with a selected subdisk or volume. Projection shows the relationships between objects by highlighting objects that are related to or part ofa specific object. Caution: You can move subdisks in the Disk View window by dragging subdisk icons to different disks or to gaps within the same disk. Moving subdisks reorganizes volume disk space and must be performed with care. Disk View Window : Highlight a volume and select Actions->Disk View. Volume Overview ISubdisk Details ID(I~ Expand I~ Vol Details Projection ~ @datadgldatadg01:t1t2d6s2 Size: 4.961 G8 Free: 3.461 G8 (70%) datavcln t (Concatenated) I ;,1 av,,102(SI';p,d) I3061GB I1000 Set Volume Usage Select from Based on layouts, Round robin, or Preferred. vxvol rdpol: vxvol -g diskgroup rdpol policy volume name [plexl Examples: To set the read policy to round robin: vxvol -g datadg rdpol round datavol To set the read policy to read from a preferred plex: vxvol -g datadg rdpol prefer datavol datavol-02 To set the read policy to select a plex based on layouts: vxvol -g datadg rdpol select datavol Changing the Volume Read Policy: VEA Select: A volume Navigation path: Actions->Set Volume Usage Input: Volume read policy: Select Basedon layouts (default: the selected plex method). Round robin. Site local read, or Preferred. Iryou select Preferred. then you can also select the preferred plcx from the list of available plexes, Changing the Volume Read Policy: CLI vxvol -9 diskgroup rdpol round volume name vxvol -9 diskgroup rdpol prefer volume name preferred_plex vxvol -9 diskgroup rdpol select volume name I Copyright:~ 2006 Symantec coro.euoo All flqllt~ -eserveo 5-9Lesson 5 Making Basic Configuration Changes 134. symantec Resizing a Volume To resize a volume, you can: Specify a desired new volume size. Add to or subtract from the current volume size. g-Disk space must be available. - VxVM assigns disk space, or you can specify disks. L_ ~t.....__..-J Shrinking a volume enables you to use space elsewhere. VxVM returns space to the free space pool. If a volume is resized, its file system must also be resized. VxFS can be expanded or reduced while mounted. UFS/HFS can be expanded, but not reduced. HFS needs to be unmounted to be expanded. Ensure that the data manager application supports resizing. Resizing a Volume Resizing a Volume If users require more space on a volume. you can increase the size of the volume. Ifa volume contains unused space that you need to use elsewhere, you can shrink the volume. When the volume size is increased. sufficient disk space must be available in the disk group. When increasing the size of a volume. VxVM assigns the necessary new space from available disks. By default, VxVM uses space from any disk in the disk group, unless you define specific disks. Resizing a Volume with a File System Volumes and file systems arc separate virtual objects. When a volume is resized, the size of the raw volume is changed. Ifa tile system exists that uses the volume, the file system must also be resizcd. When you resize a volume using VEA or the vxres i ze command, the tile system is also resized. Resizing Volumes with Other Types of Data For volumes containing data other than file systems. such as raw database data. you must ensure that the data manager application can support the resizing of the data device with which it has been configured. 5-10 Copyright ;: 2006 Svmantec Corporauon AU lights reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 135. , symamec Resizing a Volume: Methods Method What Is Reslzed? VEA Both volume and file system To resize a volume from the command line. you can use either the vxassist command or the vxresize command. Both commands can expand or reduce a volume 10 a specific size or bv a specified amount of space. with one significant difference: vxres i ze automatically resizes a volume's f Ie system. vxassist does not resin? a volume's tile system. When using vxass i s t ,you must resize the tile system separately by using the f sadmcommand. vxresize Both volume and file system IWhen you expand a volume. both commands automatically locate mailable disk space unless you designate specific disks to use. When you shrink a volume, the unused space becomes free space in the disk group. When you resizc a volume. you can specify the length of a new volume in sectors. kilobytes. megabytes. or gigabytes. The unit of measure is added as a suffix to the length (s, k, m, or g). Ifno unit is specified, the default unit is sectors. vxassist Volume only fsadm File system only (VxFS only) Resizing a Volume and File System: Methods Lesson 5 Making Basic Configuration Changes Copyriyhl~' 2006 Symantec Corporation All rights reserved 5-11 136. syruantcc Resizing a Volume: VEA I Highlight a volume, and select Actions->Resize Volume. Volume name: datavoiOI Specify the amount Current volume size: 1500 ~ of space to add or subtract, or specify a Add by: 1 fMB-::J new volume size. 5ubtract by: I fMB-::J New volume size; I fMB-::J Max Size I r. Let VolumeManager decide what disks to use for this volume [If. desired, specify r Manually select disks for use by this volume J disks to be used lfor the additional space. Resizing a Volume and File System: VEA Select: The volume to be resized Navigation path: Actions -->Resize Volume Input: Add by: To increase the volume size by a specific amount of 'pace. input how much space should be added to the volume. Subtract by: To decreasethe volume size by a specific amount of space. input how much 'pace should be removed. New volume size: To specify a new volume size. input the size. Max Size: To determine the largest possible size. click Max Size. Select disks for use by this volume: You can select specific disks to use and specify mirroring and striping options. Force: You can force the rcsize if the size is being reduced and the volume is active. Notes: When you resize a volume. if a YERITAS file system (YxFS) is mounted on the volume. the file system is also rcsized. The tile system is not resized if it is unmounted. VERITAS Storage Foundation 5.0 for UNIX: Fundamentals5-12 137. ,S)111ank'C. Resizing a Volume and File System: vxresize The new_length operand can begin with a plus sign (+) to indicate that the new length is added to the current volume length. ; minus sign ( - ) indicates that thc new length is subtracted. - b runs the process in the background. The ability to expand or shrink a file system depends on the tile system type and whether the tile system is mounted or unmounted. Resizing a Volume: vxresize vxresize [-bJ fs_tlpe -g diskgroup volume narne [+ I-J new_length Original volume size: 10 MB ~ vxresize -g mydg myvol SOm vxresize -g mydg myvol +lOm vxresize -g mydg myvol 40m vxresize -g mydg myvol -10m File System Type Mounted FS Unmounted FS VxFS Expand and shrink '101 allowed UFS (Solaris) Expand only Expand only HFS (llP-UX) /01 allowed Expand only I Example: The size of the volume myvol is 10MB. To extend myvol to 50 MB: vxresize -g mydg myvol 50m To extend myvol by an additional 10 MB: vxresize -g mydg myvol +10m To shrink myvol back to a length 01'40 MB: vxresize -g mydg myvol 40m To shrink myvol by an additional 10MB: vxresize -g mydg myvol -10m Lesson 5 Making Basic Configuration Changes Copyrigtll:E 2006 Syrnantcc Corporation. All rights reserved. 5-13 138. syrnantec Resizing a Volume: vxassist vxassist -g diskgrollp {growtolgrowbylshrinktol shrinkby} volume_name size Original volume size: 20 MB CD vxassist -g datadg growto datavol 40m ~ vxassist -g datadg growby datavol 10m vxassist -g datadg shrinkto datavol 30m vxassist -g datadg shr nkby datavol 10m Resizing a Volume Only: vxassist q rowt o growby shrinkto shrinkby Increases volume (0 specified length Increases volume hi' specified amount Reduces volume (0 specified length Reduces volume 1>.1' specified amount Resizing a File System Only: fsadm You may need to resize a tile system to accommodate a change in use-for example, when there is an increased need for space in the file system. You may also need to resize a tile system as part of a general reorganization of disk usage-for example, when a large tile system is subdivided into several smaller file systems. You can resize a VxFS tile system while the tile system remains mounted by using the f sadm command: fsadm [-b newsizel [-r rawdevl mount point Using fsadm to resizc a tile system does not automatically resize the underlying volume. When you expand a tile system. the underlying device must be large enough to contain the new larger file system. 5-14 CCP'i'flght:, ,nn6 Symantcc Corporation All fights reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 139. S}11liHH.X Resizing a Dynamic LUN If you resize a LUN in the hardware, you should resize the VxVM disk corresponding to that LUN. Disk headers and other VxVM structures are updated to reflect the new size. Intended for devices that are part of an imported disk group. VEA: Select the disk that you want to expand. Select Actions->Resize Disk. ell: vxdisk [-fJ -g diskgrollp resize dm nAme Example: vxdisk -g datadg resize datadgOl Resizing a Dynamic LUN When you resize a LUN in the hardware. you should resize the YxYM disk corresponding to that LUN. You can use vxdi sk res i ze to update disk headers and other VxYM structures to match a new LUN size. This command does not resize the underlying LUN itself. I Lesson 5 Making Basic Configuration Changes 5-15 Copyright tt' 2006 Symantec Corpo-auon All riqhts reserved 140. r: Computer B1, Computer A I ,------;-----, acctdg l'CJJ engdg , Additional Disks Moving Data Between Systems Example: Disk Groups and High Availability The example in the diagram represents a high availability environment. In the example, Computer A and Computer B each have their own bootdg on their own private SCSI bus. The two hosts are also on a shared SCSI bus. On the shared bus, each host has a disk group, and each disk group has a set of VxVM disks and volumes. There are additional disks on the shared SCSI bus that have not been added to a disk group. If Computer A fails. then Computer B. which is on the same SCSI bus as disk group acctdg. can take ownership or control of the disk group and all of its components. 5-16 Copyright - /.u1J6Syruantec Corporation All flghls reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 141. What is a deported disk group? The disk group and its volumes are unavailable. The disks cannot be removed. The disk group cannot be accessed until it is imported. Before deporting a disk group: Unmount file systems. Stop volumes. When you deport a disk group, you can specify: A new host A new disk group name ~lk.."&i ,~wP .)~ Deporting a Disk Group Deporting a Disk Group A deported disk group is a disk group over which management control has been surrendered. The objects within the disk group cannot be accessed. its volumes are unavailable. and the disk group configuration cannot be changed. (You cannot access volumes in a deported disk group because the directory containing the device nodes for the volumes are deleted upon deport.) To resume management of the disk group. it must be imported. A disk group cannot be deported irany volumes in that disk group arc in use. Before you deport a disk group. you must unmount file systems and stop any volumes in the disk group. Deporting and Specifying a New Host I When you deport a disk group using YEA or CLI commands, you have the option to speeify a new host to which the disk group is imported at reboot. Iryou know the name of the host to which the disk group will be imported. then you should specify the new host during the operation. If you do not specify the new host. then the disks could accidentally be added to another disk group. resulting in data loss. You cannot specify a new host using the vxdiskadm utility. Deporting and Renaming When you deport a disk group using YEA or CLI commands. you also hale the option to rename the disk group when you deport it. You cannot rename a disk group when deporting using the vxdiskadm utility. Lesson 5 Making Basic Configuration Changes Copyright G 2006 Svrnantec Corporation. Alilighis reserved 5-17 142. symaruec . Select Actions->Deport Disk Group. : Disk group to be deported datadg lid Dellor! options New name: r+: r- N8/hOst: ~I vxdiskadm: "Remove access to (deport) a disk group" vxdg [-n new_name] [-h hostname] deport diskgroup Deporting a Disk Group: Disks that were in the disk group now have a state of Deported. If the disk group was deported to another host. the disk state is Foreign. Note: If you amine the disks. you must manually online the disks before you import the disk group. To online a disk. use vxdiskadm option "Enable (online) a disk device." Before deporting a disk group. unmount all tile systems used within the disk group that is to be deported. and stop all volumes in the disk group: umount mount po~nt vxvo1 -g diskgroup stopa11 5-18 Copyngt1 C' 21106 Svmautec Corporauon All nqbts rescrveo VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 143. Importing a Disk Group Importing a disk group reenables access to the disk group. When you import a disk group, you can: Specify a new disk group name. Clear host locks. Import as temporary. Force an import. Importing a Deported Disk Group All volumes are stopped by default after importing a disk group and must be started before data can be accessed. Importing and Renaming A deported disk group cannot be imported ifanother disk group with the same name has been created since the disk group was deported. You can import and rename a disk group at the same time. Importing and Clearing Host Locks When a disk group is created. the system writes a lock on all disks in the disk group. The lock ensures that dual-ported disks (disks that can be accessed simultaneously by two systems) are not used by both systems at the same time. If a system crashes. the lucks stored on the disks remain. and if you try to import a disk group containing those disks. the import fails. Importing As Temporary A temporary import does not persist across reboots. A temporary import can be useful, for example. if you need to perform administrative operations on the temporarily imported disk group. VEA docs not support temporary import. Forcing an Import A disk group import fails if the VxVM configuration daemon cannot rind all ofthe disks in the disk group. If the import tails because a disk has failed. you can force the disk group to be imported. Forcing an import should always be performed with caution. Lesson 5 Making Basic ConfigurationChanges Copyright rs 20u6 Symantec Corporation All rights reserved I 5-19 144. symantec Importing a Disk Group , Select Actions->Import Disk Group. Group name: datadg,1155041Sn64.coursedev6 Options blewname: IClalaclg =cc"----- SileName G [] Clear hosllD Options include: Clearing host IDs at import Forcing an import Starting all volumes Importing a Disk Group: By default, when you import a disk group by using VEA, all vol limes in the disk group are started automatically. By default. the vxdiskadm import option starts all volumes in the disk group. When yuu import a disk gruup from the command line, you must manually start all volumes A disk group must be deported from its previous system before it can be imported to the new system. During the import operation. the system checks for host import lucks. Ifany lucks are found. you are prompted to clear the locks. To temporarily rename an imported disk group. you use the - t option. This option imports the disk group temporarily and docs not set the autoimport flag, which means that the import cannot survive a reboot. To display all disk groups, including deported disk groups: [] Eorce ~ Start all ~olumes STATUS online online 5-20 vxdiskadm: "Enable access to (import) a disk group" vxdg [-ftCl [-n nelv_namelimport dJskgroup vxvol -g diskgroup startall VXdlSk -0 alldgs list DEVICE clt2:iOs2 clt2dls2 TYPE auto:cdsdisk auto:cdsdisk DISK datadgOl GROUP datadg (acctdg) CopYrlght'~ 2006 Syruanter Ccrpo.auoo All lights reserved VERITAS Storage Foundation 5,0 for UNIX' Fundamentals 145. Renaming Disks and Disk Groups Changing the Disk Media Name VxVM creates a unique disk media name for a disk when you add a disk to a disk group. Sometimes you may need to change a disk name to reflect changes or ownership or use or the disk. Renaming a disk does not change the physical disk device name. The new disk name must be unique within the disk group. VEA: o Select the disk that you want to rename. o Select Actions->Rename Disk. o Specify the original disk name and the new name. vxedit rename: vxedit -g diskgroup rename old name new name Example: vxedit -g datadg rename datadgOl datadg03 Notes: o The new disk name must be unique within the disk group. o Renaming a disk does not automatically rename subdisks on that disk. IBefore you rename a disk, you should carefully consider the change. VxVM names subdisks based on the disks on which they are located. J disk named datadgOl contains subdisks that are named datadgOl-Ol, datadgOl-02, and so on. Renaming a disk does not automatically rename its subdisks. Volumes are not affected when subdisks arc named differently trom the disks. Before You Rename a Disk Lesson 5 Making Basic ConfigurationChanges Copyrtght ~ 2006 Svrnantec Corporation AII'iqlm. reserved 5-21 146. symantcc. Host A Deport " I In VEA, select Actions-> : Rename Disk Group "~ -------- vxdg -n new~nafile deport vxdg import new name vxdg deport old name vxdg -n new_name import Renaming a Disk Group You cannot import or deport a disk group when the target system already has a disk group of the same name. To avoid name collision or to provide a more appropriate name for a disk group, you can rename a disk group. To rename a disk group when moving it from one system to another, you specify the new name during the deport or during the import operations. To rename a disk group without moving the disk group, you must still deport and reimport the disk group on the same system. The YEA interface has a Rename Disk Group menu option. On the surface, this option appears to be simply renaming the disk group. However, the option works by deporting and rcimporting the disk group with a new name. Using the CLI, for example, 10 rename the disk group datadg to mktdg: vxdg -n mktdg deport datadg vxdg import mktdg vxvol -g mktdg startall or vxdg deport datadg vxdg -n mktdg import datadg vxvol -g mktdg startall From the command line, you must restart all volumes in the disk group: vxvol -9 new name startall 5-22 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Cu~ynyht:; 20l~,':':".panlec Corporauou All r.glils rescr-..eo 147. 'symantt'( All disk groups have a version number based on the Storage Foundation release. Each disk group version supports a set of features. You must upgrade old disk group versions in order to use new features. SF Disk Group Supported Disk Release Version Group Versions 3.2,3.5 90 20-90 4.0 110 20-110 4.1 120 20-120 5.0 140 20-140 To upgrade the disk group version: In VEA, select the disk group to be upgraded then select Actions->Upgrade Disk Group Version. In CLI, type: vxdg [-T version] upgrade diskgroup Managing Old Disk Group Versions Upgrading a Disk Group All disk groups have an associated version number. Each VxVM release supports a specific set of disk group versions and can import and perform tasks on disk groups with those versions. Some new features and tasks only work on disk groups with the current disk group version. so you must upgrade existing disk groups in order to perform those tasks. Once you upgrade a disk group. the disk group becomes incompatible with earlier releases ofVxVM that do not support the new version. Upgrading the disk group version is an online operation. You cannot downgrade a disk group version. IDisplaying the Disk Group Version: In the VEA Disk Group Properties window. if the Current version property is Yes. then the disk group version is current. In CLI. type: vxdg list newdg Group: newdg dgid: 97121640B.1133.cassius version: 140 Lesson 5 MakingBasic ConfigurationChanges 5-23 Copyriglll ', 2006 Symantec Corporation. All righls reserved 148. symantcc CDS Disk Groups CDS disk groups are used for seamless transfer of data between different platforms. For example, for moving copies of data to a backup server that is on a different OS. CDS disk groups are created by default as of VxVM 4.x. Disk groups created before version 4.x are non-CDS. __1CDS attribute: c ds eon II DG version: version=110 (or higher)~~~~ Idatadg I A CDS disk group cannot have non-CDS disks in it. However, a CDS disk can be added to a non-CDS disk group as long as the disk group version supports it. Requirements for CDS Disk Groups Thc CDS attribute indicates that the disk group can be shared across platforms. CDS disk groups have fields indicating which platform-type created the disk group and which platform-type last imported the disk group, in addition to device quotas. 5-24 Ccpynyht ': 200b Symautec Cosporanco. All fights reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 149. 'symanl('( Converting a Non-CDS Disk Group to a CDS Disk Group The disk group must be in good condition . Disk groups can be converted while online or offline. Use the CDS conversion utility vxcdsconvert to convert a VxVM non-CDS disk group to a CDS disk group: vxcdsconvert [-A] [-d defaultsfile] -g diskgroup [-0 novolstop] alignmentlalldisksldisk namelgroup [attribute] For example, to convert the disk group olddg to a CDS disk group while its volumes are still online, type: vxcdsconvert -g olddg -0 novolstop group Converting a Non-CDS Disk Group to a CDS Disk Group Requirements for Converting a Non-CnS Disk Group to a CDS Disk Group The disk group must be in good condition: No dissociated or disabled objects No sparse plexes No volumes requiring recovery or having pending snapshot operations No objects in an error state Disk groups can be converted online or online: Performing the conversion online. while use of the disk group continues. may greatly increase the amount of time required for conversion. Performing the conversion offline requires minimal online time. What Happens When a Disk Group Is Convertcd? The following are some other (actors to consider when converting a disk group: II non-CDS disk group is upgraded (using the vxdg upgrade command). II' the non-CDS disk group has one or more disks that are not CDS disks. these disks are converted to CDS disks. If the non-CDS disk group does not have a CDS-compatible disk group alignment. the objects go through relayout so that they are CDS-compatible. Applications using disks that require format conversion are terminated for the duration of the disk conversion process (unless novol stop is used). Using novolstop may require objects to be evacuated and then unrelocatcd. Lesson 5 Making Basic Configuration Changes COPYright e.2006 Syrnantec Corporation. All rigtw:; reserved. I 5-25 150. symantec 5-26 Lesson Summary Key Points This lesson described how to add a mirror to and remove a mirror from an existing volume, change the volume read policy, and resize an existing volume. You also learned how to rename disks and disk groups, upgrade disk groups, and convert non-CDS disk groups to CDS. Reference Materials - VERITAS Volume Manager Administrator's Guide - VERITAS Storage Foundation Release Notes svmantec Lab 5 Lab 5: Making Basic Configuration Changes This lab provides practice in making basic configuration changes. In this lab, you add mirrors and logs to existing volumes, and change the volume read policy. You also resize volumes, rename disk groups, and move data between systems. [ For Lab Exercises, see Appendix A. For Lab Solutions, see Appendix B. Labs and solutions fur this lesson are located on the following pages: Appendix A provides complete lab instructions. "Lilt>:': fhklllg Basic ('on jl.~Ul ~t!ion changc-, l! pilgC :,= 2 gigabytes (or >= 8 million files) Default: largefiles -0 version-n Specifies layout version Valid values are 4, 5, 6, and 7. Default: Version 7 Using mkfs Command Options YOLI can set a variety of file system properties when you create a V[RIT!S file system by adding VxFS-spccific options to the mkfs command. I 6-7 Copyright if; 2006 Svmantec Corporauon. All rights reserved 158. symantec Other VxFS Commands Mount options: mount -r ... mount -v mount -p Mounts as read only Displays mounted file systems Displays in file system table format (Not on Linux) Mounts all in file system tablemount -a Unmount options: umount Imydata umount -a umount -0 force Irnydata Unmounts a file system Unmounts all mounted file systems Forces an unmount Display file system type: fstyp -v Idev/vx/dsk/datadg/datavol Display free space: df -F vxfs /mydata Identifying File System Type If you do not know the tile system type of a particular tile system. you can determine the tile system type by using the fstyp command. You can use the fstyp command to describe either a mounted or unmounted tile system. In YEA, right-dick a tile system in the object tree, and select Properties. The tile system type is displayed in the File System Properties window. Identifying Free Space To report the number of free disk blocks and inodcs fur a YxFS File System, you use the d f command. The d f command displays the number of free blocks and free inodes in a tile system or directory by examining thc counts kept in the superblocks. Extents smaller than XK may not be usable for all types of allocation, so the df command docs not count tree blocks in extents below 8K when reporting the total number of free blocks. In YEA. right-click a file system. and select Properties to display tree space and usage information. 6-8 COpy light 't: 2006 Svmautnc Corporation All rights reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 159. ,S)ll1 Properties->Statistics % Free blocks in extents smaller than 64 blks: 8.35 % Free blocks in extents smaller than 8 blks: 4.16 % blks allocated to extents 64 blks or larger: 45.81 Output displays percentages of free and allocated blocks per extent size. Running Fragmentation Reports You can monitor fragmentation in a VERITAS file system by running reports that describe fragmentation levels, You use the f sadm command to run reports on both directory and extent fragmentation. The d f command, which reports on tile system tree space. also provides information useful in monitoring fragmentation. Interpreting Fragmentation Reports In general. for optimum performance. the percentage of tree space in a tile system should not fall below 10 percent. A tile system with 10 percent or more free space has less fragmentation and better extent allocation. A badly fragmented file system will have one or more of the following characteristics: Greater than 5 percent of tree space in extents of less than 8 blocks in length More than 50 percent of tree space in extents of less than 64 blocks in length Less than 5 percent of the total tile system size available as free extents ill lengths of 64 or more blocks 6-10 CopYright :;2006 S}'ma!HC Corporation All rights reserved VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 161. symaruec.. (';I1I'.1##J;.....'-'. ~ Defragmenting a File System fsadm I-d] I-D] I-e] I-E] I-t time] I-p passes] mount point During extent reorganization: During directory reorganization: In VEA, highlight a file system, and select Actions->Defrag File System, Small files are made contiguous. Large files are built from large extents. Small, recent files are moved near the Inodes. Large, old files are moved to the end of the allocation unit. Free space Is clustered In the center of the allocation unit. Example: fsadm -e -E -s /mntl Valid entries are moved to the front. Free space is clustered in the center of the allocation unit. Directories are packed Into Inode area. Directories are placed before other files. Entries are sorted by access time. Example: fsadm -d -D /mntl VxFS Defragmentation You can use the oniinc administration utility fsadm to defragment. or reorganize. file system directories and extents. The f sadm utility detragmcnts a file system mounted for read/write access by: Removing unused space from directories Making all small files contiguous Consolidating free blocks for file system use Only a privileged user can reorganize a file system. Defragmenting Extents Entries are sorted by the time of last access. Other f sadm Defragmentation Options If you specify both -d and -e. directory reorganization is always completed before extent reorganization. II'you use the - D and - E with the - d and - e options. fragmentation reports are produced both before and after the reorganization. You can use the - t and - p options to control the amount of work performed by f sadm. either in a specificd time or by a number of passes. By default. f sadm runs five passes. If both - t and - p are specified. f sadm exits if either of the terminating conditions is reached. Lesson 6 Administering File Systems Copynqtn,; 2006 Svrnantcc ccrro.auoo All rights reserved I 6-11 162. symantec Scheduling Defragmentation The frequency of defragmentation depends on usage, activity patterns, and the importance of performance. Run defragmentation on demand or as a cron job: - Daily or weekly for frequently used file systems - Monthly for infrequently used file systems Adjust defragmentation intervals based on reports. To defragment using VEA, highlight a file system and select Actions->Defrag File System. Scheduling Defragmentation The best way to ensure that fragmentation does not become a problem is to defragment the file system on a regular basis. The frequency of dcfragmeruation depends on file system usage. activity patterns. and the importance of file system performance. In general, follow these guidelines: Schedule dctragmeruarion during a time when the file system is relatively idle. For frequently used tile systems. you should schedule dctrugmentauon daily or weekly. For infrequently used file systems. you should schedule dcfragmenration at least monthly, Full tile systems tend to fragment and are difficult to defragment. You should consider expanding the tile system. To determine the dcfragmcniation schedule that is best for your system, select what you think is an appropriate interval for running extent reorganization and run the fragmentation reports both before and after the reorganization, If the degreeof tragmcruation is approaching the bad fragmentation figures. then the interval between fsadm runs should be reduced. If the degree offragmentation is low, then the interval between f sadm runs can be increased. You should schedule directory reorganization for file systems when the extent reorganization is scheduled. The fsadm utility call run on demand and can be scheduled regularly as a cronjob. The dcfragmcutation process can take some time. You receive an alert when the process is complete. 6-12 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 163. vxbench~latform -w workload [options) file name 'synmn1t'C.dl1 Testing Performance Using vxbench Example: Sequential write vxbench_placform -w write -i iosize-8,iocount-131072 , /mnt/testfileOl total: 0.560 Bee 14623.53 KB/s cpu: 0.10 sys 0.01 user The output disptays etapsed time in seconds, throughput in KB/second, and CPU time for the system and the user in seconds. Example: Random write vxbench_platform -w rand_write -i iosize=8,iocount=131072,maxfilesize=1048576/mnt/testfileOl Note: Separate suboptions using commas with no spaces. Benchmarking Using vxbench What Is Benchmarking'! Benchmarking is a testing technique that enables you to measure performance based on a set of standards. or benchmarks. You can use benchmarking techniques to try to predict the performance of a new file system configuration or to analyze the performance of an existing tile system. What Is vxbench'? VERITAS engineering developed a benchmarking tool called vxbench that enables you to create different combinations of I/O workloads. The vxbench program is installed as part of the VRTSspt software installation and exists under the / opt/VRTSspt/ FS/VxBench directory. Notes on Testing Performance The vxbench program applies a workload to a file system and measures performance based on how long file system operations take. II'anything else is using the tile system at the same time. then the vxbench performance reports are affected. For sequential workloads: iosize x iocount = size of the file. The ios ize and maxf ilesi ze parameters are defined in units of I K: therefore. .i os i ze e s defines a size of8K. Lesson 6 Administering File Systems Copynght If' 2006 Symantec Corporation All rights reserved I 6-13 164. The vxbenchyl at form Command In the syntax, you specify the command followed by a type of workload. Valid workloads are: read write rand read rand write rand mixed mmap read mmap_write Performs a sequential read of the test tiles Performs a sequential write of the test tiles Performs a random read of the test files Performs a random write of the test files Performs a mix ofrandom reads and writes Uses mmapto read the test tiles Uses mmapto overwrite the test tiles After specifying the type of workload. you can add specific options that characterize the test that you want to perform. Finally. you specify the name of the tile on which to run the test. If you specify multiple filenames, vxbench_platform runs tests in parallel to each tile, which simulates multiple simultaneous users. If you use the option that specifies multiple threads. then each simulated user runs multiple threads. The total number of 110 threads is the number of users multiplied by the number of threads. Command Options By adding options to the vxbench _pl atform command. you can simulate a wide variety of I/O environments. The following table describes some of these options and their uses. You can display a complete list ofvxbenchylatform command options by typing vxbenchylatform -h. Option Use -h Prints a detailed help message -p Uses processes for users and uses threads for multithreaded 1,'0 (This is the default option.) -p Uses processes lor users and for multithreaded I/O -t Uses threads for users and lor multithreaded 110 -m Locks 1:'0 butlers in memory -s For multiuser tests. only prints summary results -v For multithreaded tests. prints per-thread results -k Prints throughput in kilobytes/second (This is the default option.) -M Print, throughput in megabytes/second -i [suboptions] SPCCitlCSsuboprions describing the test you want to perform vxbench is included in the VRTSspt package. 6-14 Copyright ~ 2006 SYI11~-I!l!eC Corporation All rights reserved VERITAS Storage Foundetion 5.0 for UNIX: Fundamentals 165. ---- -'~)~;~~mlt:; The intent log records pending file system changes before metadata is changed. Structural IntentLo Files Logging in VxFS If the system crashes, the intent log is replayed by VxFS fsck. Role of the Intent Log A file system may be left in an inconsistent state after a system failure. Recovery of structural consistency requires examination of file system metadara structures.VERITAS File System provides fast file system recovery after a system failure by using a tracking feature called ill/em /oggillg or journaling. Intent logging is the process by which intended changes to file system metadata are written to a log before changes are made to the file system structure. Once the intent log has been written. the other updates to the tile system can be written in any order. In the event of a system failure. the VxFS f sck utility replays the intent log to nullify or complete file system operations that were active when the system failed. Traditionally. the length oftime taken for recovery using fsck was proportional to the size of the file system. For large disk configurations. running f sck is a time- consuming process that checks. verities. and corrects the entire file system. The VxFS version of the fsck utility performs an intent log replay to recover a file system without completing a full structural check of the entire tile system. The time required for log replay is proportional to the log size. not the file system size. Therefore. the file system can be recovered and mounted seconds after a system failure. Intent log recovery is not readily apparent to users or administrators. and the intent log can be replayed multiple times with no adverse effects. Note: Replaying the intent log may not completely recover the damaged file system structure if the disk suffers a hardware failure. Such situations may require a complete system check using the VxFS fsck utility. Lesson 6 AdministeringFile Systems Copyright ~i;:2006 Symarrtec Corporation All nqtus reserved I 6-15 166. svmarucc Maintaining VxFS Consistency To check file system consistency by using the intent log for the VxFS on the volume datavol: fsck [fs_type] /dev/vx/rdsk/datadg/datavol To perform a full check without using the intent log: fsck [fs_type] -0 full,nolog/dev/vx/rdsk/datadg/datavol To check two file systems in parallel using the intent log: fsck [fs_type] -0 p /dev/rdsk/clt2dOs4/dev/rdsk/cltOdOs5 To perform a file system check using the VEA GUI, highlight an unmounted file system, and select Actions->Check File System. Maintaining File System Consistency You use the YxFS-specitic version of the fsck command to check the consistency of and repair a Y xFS file system. The f sck utility replays the intent log by default, instead of performing a full structural tile system check. which is usually sufficient to set the tile system state to CLEAN. You can also use the f sck utility to perform a full structural recovery in the unl ikcly event that the log is unusable. The syntax for the f sck command is: fsck [fs_type] [genenc opUons] [-yl-Y] [-nl-N] [-0 full,nolog] special For a complete list of generic options. see the f sck (1m) manual page. Some of the generic options include: Option Description -m Checks. but docs not repair. a tile system before mounting -niN Assumes a responseof no to all prompts by fsck (This option does not replay the intent log and performs a full Isck.) -v Echoesthe expanded command line but does not execute the command -yly Assumes a responseof yes to all prompts by fsck (I r the lile system requires a lull tsck after the log replay. then a full tsck is performed.j - 0 p can only be run with log f sck. not with full f sck. 6-16 Copyright:: 211Ot; Syroante.. Comoraunn All notus rvserveo VERITAS Storage Foundation 5.0 for UNIX: Fundamentals 167. , syrnanrcc. Resizing the Intent Log Intent log size can be changed using fsadm: fsadm [-F vxfsl 0 logaic size [,logvol_vol_namel mount_point Specify a Place log on a naw log alze. separate device. Use the fsadm -L mount poi nt: command to get detailed information on the current intent log Larger log sizes may improve performance for intensive synchronous writes, but may increase: - Recovery time - Memory requirements - Log maintenance time ..--.-... . . Highlight a file system, and select " Actions->Set Intent Log Options. File system Jmnt! Intent logsee: I Not on HP-UX r Resizing the Intent Log The VxFS intent log is allocated when the file system is first created. The size of the intent log is based on the size of the file system-the larger the file system, the larger the intent log. Default log size: Based on file system size: in the range of256K to 64 MB Default maximum log size: 64 !'vIB (Version 6 and 7 layout): 16 MB (Versions 4 and 5 layout) With the Version 6 disk layout. you can dynamically increase or decrease the intent lug size using the log option of the f sadmcommand. The allocation can be directed to a specified intent logging device, as long as the device exists and belongs to the same volume set as the file system. Increasing the size of the intent log (an improve system performance because it reduces the number of times the log wraps around. However, increasing the intent log size can lead to greater times required for a log replay if there is a system failure. / large log provides better performance on metadata-intensive workloads. Memory requirements for log maintenance increase as the log size grows. The log size should not be more than 50 percent of the physical memory size otthc system. / small log uses less space on the disk and leaves more room for file data. For example. selling a log size smaller than the default log size may be appropriate for a small floppy device. On small systems, you should ensure that the log size is not greater than half the available swap space. Note: The Loqvo I. option 10 place the intent log on a separate volume can only be used with multi-volume file systems (file systems on volume sets). Copyright ~ 2006 Svmantec Corporation All nqhts reserveo Lesson 6 Administering File Systems I 6-17 168. symantec Logging mount Options mount -F vxfs [-0 specific_options] Most logging delayed; great All structural performance improvement, changes logged but changes could be lost -0 log -0 tmplog IIntegrity . Performance -0 delaylog Default; some logging delayed; improves performance Controlling Logging Behavior VERITAS File System provides VxFS-spccific logging options that you can use when mounting a file system to alter default logging behavior. By default, when you mount a VERITAS file system, the -0 delaylog option is used with the mount command. With this option, some system calls return before the intent log is written. This logging delay improves the performance of the system, and this mode approximates traditional UNIX guarantees for correctness in case of system failures. You call specify other mount options to change logging behavior to further improve performance at the expense of reliabi lity. Selecting mount Options for Logging You can add VxFS-specific mount options to the standard mount command using - 0 in the syntax: mount [-F vxfs] [generic_options] [-0 specific_options] special mount_point Logging mount options include: - 0 log -0 delaylog -0 tmplog 6-18 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Cr;[JYrlgt1! ,0 :!006 SYJT1W'lec co-ooreuoo All r!gh! SY'ilCIli'." I':;:,:C /-.17 Lesson 6 Administering File Systems Copyright ~ 2006 Symanter. Corporation. All rights reserved 6-21 172. 6-22 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Copyright ': 20()6 Svmantec Corporauon. All f191"1S reRemove Disk From Disk Gruup. 5 Observe all the disks on the system. What is the status of the disk you removed from the disk group') Select the Disks node in the object tree and observe the disks in the right pane view. The disk removed in step 4 shuuld be in Free state. 6 Destroy the namedgl disk group. a Select the Disk Gruups node in the object tree and the namedgl disk group in the right pane view. b Select Actions->Destroy Disk Group. Confirm when prompted. 7 Observe all the disks on the system. What is the status of the disks? Select the Disks node in the object tree and observe the disks in the right pane view. If you have followed all the lab steps, you should have 4 disks in Free state; they are already initialized but nut in a disk group. A-20 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Copyright 20(}6 Symantec Corporation AU ".!t'l~ reserveo 221. I , symaruec Lab 4 Lab 4: Selecting Volume Layouts In this lab, you create simple concatenated volumes, striped volumes, and mirrored volumes. You also practice creating a layered volume and using ordered allocation while creating volumes. For Lab Exercises, see Appendix A. For Lab Solutions, see Appendix B. Lab 4: Selecting Volume Layouts In this lab. you create simple concatenated volumes. striped volumes. and mirrored volumes. You also practice creating a a layered volume and using ordered allocation while creating volumes. The Lab Solution-, tor ihi-, lab arc locakd on the 1()llp ing J1dgc: 'Tab -l SuIUl!PIlS: S,icctlllg volume layouts." pageB-.~. Prerequisite Setup To perform this lab. you need a lab system with Storage Foundation pre-installed. configured and licensed. In addition to this. you also need four empty and unused external disks to be used during the labs. A-21Lab 4: Selecting Volume Layouts Copyng"1 .:; 2006 svroentec Corporation. All fights reserved. 222. Classroom Lab Values In preparation for this lab, you will need the following information about your lab environment. For your reference, you may record the information here, or refer back to the first lab where you initially documented this information. Object Sample Value Your Value_._-- 1'001 password veritas Host name trainl ;Iy Data Disks: Solaris: c It #dO - clt#d5 HP-UX: c-i t odo - c4tOd5 AIX: hdisk21- hdisk26 Linux: sda - sdf Prefix to be used with name object names A-22 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals .:., reserved 223. Creating Volumes with Different Layouts: CLI Add four initialized disks to a disk group called namedg. Verify your action using vxdisk -0 alldgs list. Note: If you are sharing a disk array. make sure that the prefix you are using for the disk group name is unique. I2 Create a 50-MB concatenated volume in namedg disk group called namevoll with one drive. 3 Display the volume layout. What names have been assigned to the plex and subdisks? 4 Remove the volume. 5 Create a 50-MB striped volume on two disks in namedg and specify which two disks to use in creating the volume. Name the volume namevo12. What names have been assigned to the plex and subdisks? 6 Create a 20-MB. two-column striped volume with a mirror in namedg. Set the stripe unit size to 256K. Name the volume namevo13. 7 Create a 20-MB. two-column striped volume with a mirror. Set the stripe unit size to 12RK. Select at least one disk that you should not use. Name the volume namevo14. Was the volume created? 8 Create a 20-MB 3-column striped volume with a mirror. Specify three disks to be used during volume creation. Name the volume namevo14. Was the volume created') 9 Create the same volume specified in the previous step. but without the mirror. What names have been assigned to the plcx and subdisks? 10 Remove the volumes created in this exercise. 11 Remove the disk group that was used in this exercise. Lab 4: Selecting Volume Layouts A-23 Copyright~' 2U06 Symantec Corporation. All rights rcsorveo 224. Creating Volumes with Different Layouts: VEA If you had exited out of VEA, start it and connect back to your system. 2 Add four initialized disks to a disk group called namedg. Verify your action in the main window. 3 Create a 50-MB concatenated volume in namedg disk group called namevoll with one drive. 4 Display the volume layout. Notice the naming convention ofthe plex and subdisk. 5 Remove the volume. 6 Create a 50-MI3 striped volume on two disks in namedg, and specify which two disks to use in creating the volume. Name the volume namevo12. View the volume. 7 Create a 20-MB, two-column striped volume with a mirror in namedg. Set the stripe unit size to 256K. Name the volume namevo13. View the volume. Notice that you now have a second plcx. 8 Create a 20-MI3, two-column striped volume with a mirror. Set the stripe unit size to 128K. Select at least one disk you should not use. Name the volume namevo14. Was the volume created? 9 Create a 20-MI3 3-column striped volume with a mirror. Specify three disks to be used during volume creation. Name the volume namevo14. Was the volume created'! 10 Create the same volume specified in step 9, but without the mirror. Note: If yo II did not cancel out of the previous step, then just uncheck the mirrored option and continue the wizard. Was the volume created') 11 Delete all volumes in the namedg disk group. A-24 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals COPYrighl ,.;: 2(1(1t} Svo-anrec Corporation AIlIlY!1IS reserved 225. 12 View the commands executed by VEA during this section of the lab. Creating Layered Volumes IYou can complete this exercise using either the VEA or the CLI interface. Solutions arc provided lor both. Note: In order to perform the tasks in this exercise. you should have at least four disks in the disk group that you are using. First. ensure that any volumes created in the previous Jabs arc removed from the namedgdisk group. 2 Create a IOO-MB Striped Mirrored volume with 110 logging. Name the volume namevoll. 3 Create a Concatenated Mirrored volume with no logging called namevo12. The size of the volume should be greater than the size of the largest disk in the disk group; lor example. if your largest disk is 4 UB. then create a ()-UB volume. Note: If you arc working in the Virtual Academy (VA) lab environment, your largest disk will have a size 01'2 GB. In this environment. you can use a 3GB volume size. 4 If you are using VEA. view the commands executed by VEA to create the namevo12 volume during this section of the lab. 5 View the volumes and compare the layouts. 6 Remove all of the volumes in the namedgdisk group. Lab 4: Selecting Volume Layouts A-25 Copyright ~ 200(; Swnanter Corporation All rights reserved 226. Using Ordered Allocation While Creating Volumes You can complete this exercise using either the VEA or the CLI interface. Solutions are provided for both. Nute: In order to perform the tasks in this exercise, you should have at least tour disks in the disk group that you are using. Create a 20-I1B. two-column striped volume with a mirror in the namedg disk gruup. Name the volume namevoll. 2 Display the volume layout. How are the disks allocated in the volume'} Which disk devices are used'? 3 Remove the volume you just made. and re-create it by specifying the four disks in an order different from the original layout. Use the command line to create the volume in this step. 4 Display the volume layout. How arc the disks allocated this time') 5 Remove all of the volumes in the namedg disk group. A-26 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals CopynqN ,~,2006 Svmantec corooreuoo All nobts reserved 227. Optional Lab: Creating Volumes with User Defaults: CLI I This optional guided practice illustrates how to use the files: /ete/default/vxassist /ete/default/alt_vxassist to create volumes with defaults specified by the user. Note that some of the default values may nut apply to VEA because VEA uses explicit values for number of columns. stripe unit size. and number of mirrors while creating striped and mirrored volumes. Create two files in lete/default: a lh~ V.1. c'dilOL cTc:lil' ,I iik c'a!b! ''::':cIS,::LE;t 11;,;[ inc'ludl" lill' Ji)!ldw!ng: # when mirroring create three mirrors nmirror=3 bUsing llie vi cduor.crc.uc,; tile called ,,1 v xa s si s r. Ih:1I iurludc- the loll(llllg: # use 256K as the default stripe unit size for # regular volumes stripeunit:256k 2 Use these files when creating the following volumes: a Create a IOO-MB volume called namevoll using Layout em.i r r o r: b Create a IOO-M8. two-column stripe volume called namevol2 using - d al t _ vxassist so that Volume Manager uses the default file: 3 View the layout of these volumes using VEA or by using vxprint -g namedg -htr. What do you notice? 4 Remove any vxassist default files that you created in this optional lab section, The presence of these tiles can impact subsequent labs where default behavior is assumed. 5 Remove all of the volumes in the namedg disk group. Lab 4: Selecting Volume Layouts A-27 Copyright 2006 Sv-nantec Corporation All rights reserved 228. A-28 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Copynght -: 200fi Svmaotec Corpoeauon All fights reserved 229. I 'symant('( Lab 5 Lab 5: Making Basic Configuration Changes This lab provides practice in making basic configuration changes. In this lab, you add mirrors and logs to existing volumes, and change the volume read policy. You also resize volumes, rename disk groups, and move data between systems. For Lab Exercises, see Appendix A. For Lab Solutions, see Appendix B. Lab 5: Making Basic Configuration Changes This lab provides practice in making basic configuration changes. In this lab. you add mirrors and logs to existing volumes. and change the volume read policy. You also resize volumes. rename disk groups. and move data between systems. Tile: Lab Solutiu1ls torthr- lab arc I()c do > cp -r lopt Ifs test/opt$l > done Note: Monitor the file system size using df -k on the Solaris platform and bdf on the I1P-UX platform, and CTRL-C out of the for loop when the file system becomes approximately R5 percent full. 3 Delete all files in the Ifs_test file system over 10 MB in size. 4 Check the level of fragmentation in the Ifs_test tile system. 5 Repeat steps 2 and .j using values 4 5 for i in the loop. Fragmentation of both free space and directories will result. 6 Repeat step 2 using values 6 7 for i. Then delete all files that are smaller than 64K to release a reasonable amount of space. 7 Defragment the file system and display the results. Run fragmentation reports both before and after the detragmentation and display summary statistics after each pass. Compare the f sadmreport from step 4 with the final report from the last pass in this step. 8 Unmount the If s test file system and remove the narnevoll volume used in this lab. Lab 6: Administering File Systems A-45 Copyright Sl 2006 Syrnantec Corporation All right:'> reserved 246. A-46 VERITAS Storage Foundation 5.0 for UNIX Fundamentals Copvnqet ~ 2006 Svmautec Corporation All (l{JI'I1S reserved 247. I 'SY111anttx Lab 7 Lab 7: Resolving Hardware Problems In this lab, you practice recovering from a variety of hardware failure scenarios, resulting in disabled disk groups and failed disks. First you recover a temporarily disabled disk group, and then you use a set of interactive lab scripts to investigate and practice recovery techniques. For Lab Exercises, see Appendix A. For Lab Solutions, see Appendix B. Lab 7: Resolving Hardware Problems In this lab. you practice recovering from a variety of hardware failure scenarios. resulting in disabled disk groups and failed disks. First you recover a temporarily disabled disk group and then you use a set of interactive lab scripts to investigate and practice recovery techniques. Each interactive lab script: Sets up the required volumes Simulates and describes a failure scenario Prompts you to fix the problem Finally. a set of optional labs are provided to enable you to investigate disk failures further and to understand the behavior of spare disks and hot relocation. The l.ab Solutio11' ror 1111'0 Jdb arc Incat,'" ,11 IlL' 1-UX: c4tOdO - c4tOd5 AIX:hdisk21- hdisk26 l.inux: sda - sdf 8-4 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Cccynqnt (:. 2U06 S),Hl31l1CC Corporation All Pyt1tS roservec 267. Location of Storage /student/ Foundation 5.0 software/sf/sf50 Software: Location of Lab Scripts: /student/labs/sf/ sf50 Location of the fp /student/labs/sf/ program: sf50/bin Location or V F:RITAS /student/ Storage Foundation software/license/ license keys: sf50 - entr -lic.txt I Lab 1 Solutions: Introducing the Lab Environment B-5 Copyright ~ 2006 Symantec Corporation All rights reserved 268. Instructor Classroom Setup Perform the following steps to enable zoning configurations for the Storage Foundation 5-day course (not required for High Availability Fundamentals): 1 Use course_setup script: Select Classroom. (Setup scripts are all included in Classroom SAN configuration Version 2). Select Function To Perform: Select Zoning by Zone Name 2 - Select Zoning and Hostgroup Configuration by Course Name 3 - Select/Check Hostgroup Configuration 2 Select option 3 - Select/Check Hostgroup Configuration. Select BostGroup Configuration to be Configured: 1 - Standard Mode: 2 or 4 node sharing, No DMP 2 DMP Mode: 2 node sh~ring, switch~ble between 1 path and 2 pa th access 3 - Check active HDS Hostgroup Configuration 3 Select option 2 - DMI' Mode. Wait and do not respond to prompts. 4 Exit to first level menu. 5 Select option I - Select Zoning by Zonc Name, Select Zoning Configuration Required: 1 - Mode 1: 6 sets of 2 Systems sharing 12 LUNs, no Tape Library available (HDS DMP Mode - 6 x 2 Systems - Single Path to 12 LUNs) 2 - Mode 2: 3 sets of 4 Systems sharing 24 LUNs, no Tape L.ibrary available (HDS DMP Mode 6 x 2 Systems - Dual Paths to 12 LUNs) 6 Select option I - Mode I (single path to 12 LUNs). 7 Select option 4 - Solaris as the OS. S Exit out ofthe course_setup script. 9 Reboot each system using reboot - - - 1". B-6 VERITAS Storage Foundation 5.0 for UNIX: Fundamentals Copyn!-)ht ~ 20()6 Svrnantec copo-auoo. AlillyhlS reserved 269. , symanter I Lab 2 Lab 2: Installation and Interfaces In this lab, you install VERITAS Storage Foundation 5.0 on your lab system. You also explore the Storage Foundation user interfaces, including the VERITAS Enterprise Administrator interface, the vxdiskadm menu interface, and the command-line interface. For Lab Exercises, see Appendix A. Fo.! Lab Solutions, see Appendix B. Lab 2 Solutions: Installation and Interfaces In this exercise. you install V[RITAS Storage Foundation 5.0 on your lab system. You also explore the VxVM user interfaces. including the V[RITAS Enterprise Administrator interface. the vxdiskadm menu interface. and the command line interface. The Lab Exercises for this lab are located on the following page: Prerequisite Setup To perform this lab. you need a lab system with the appropriate operating system and patch sets pre-installed. At this point there should be no Storage Foundation software installed on the lab system. The lab steps assume that the system has access to the Storage Foundation 5.0 software and that you have a Storage Foundation 5.0 Enterprise demo license key that can be used during installation. Lab 2 Solutions Installation and Interfaces B-7 COp)'rigt11 r,;:.2006 Syrnaruec Corporation. All righls reserved 270. Classroom Lab Values In preparation for this lab, you will need the following information about your lab environment. For your reference, you may record the information here, or refer back to the first lab where you initially documented this information. Object Sample Value Your Value root password veritas Host name trainl Domain name classrooml,int Fully qualified hostname trainl,classrooml (FQIII) ,int 1y Boot Disk: Solaris: cOtOdO HP-UX: clt15dO AIX: hdiskO Linux: hda Location of Storage /student/ Foundation 5,0 soft ware/ sf / sf50 Software: Location ofVERITAS /student/ Storage Foundation software/license/ license keys: sf 50 -entr - lic,txt Location of Lah Scripts: /student/labs/sf/ sf50 B-8 VERITAS Storage Foundation 5.0 for UNIX Fundamentals Copyngt11G 2006 Svroaruec COfpOr(lIW'" Ill! "llnts reserved 271. Preinstallation Determine if there are any VRTS or SYMC packages currently installed on your system. Solaris pkginfo I grep -i VRTS pkginfo I grep -i SYMC HP-lJX swlist -1 product I grep VRTS swlist -1 product I grep SYMC Note: If you have chosen to install the VxVM bundle that comes with the IIiv2 operating system software. you will see versions 3.) ofVERITAS Volume Manager software including the VEA packages. f-- AIX lslpp -1 'VRTS* ' lslpp -1 'SYMC*' Linux rpm -qa I grep VRTS rpm -qa I grep SYMC 2 Before installing Storage Foundation. save the following important system files into hackup files named with a '". preVM" extension. Also. save your hoot disk information to a file for later use (do not store the file in /tmp). You may need the boot disk information when you bring the boot disk under VxVM control in a later lab. Solaris ep fete/system /ete/system.preVM ep /ete/vfstab /ete/vfstab.preVM prtvtoe /dev/rdsk/boot - disk device - name >/ete/bootdisk.preVM IW-lJX ep /stand/system /stand/system.preVM ep /ete/fstab /ete/fstab.preVM AIX ep /ete/filesystems /ete/filesystems.preVM ep /ete/vfs /ete/vfs.preVM Linux ep /ete/grub.eonf /ete/grub.eonf.preVM ep /ete/modules.eonf /ete/modules.eonf.preVM 3 Are any VERlTAS license keys installed on your system'? Check for installed licenses. vxlierep Note: The vxlicrep utility may not be available on your system at this point. Lab 2 Solutions: Installation and Interfaces Copyligl1t r; 2006 Symantec Corporation All rigtlls reserved I 8-9 272. 4 To test if DNS is configured in your environment, check if nslookup resolves the hostnamc to a fully qualified hostname by typing nslookup hostname. If there is no DNS or if the host name cannot be resolved to a fully qualified hostname. carry out the following steps: a Ensu