HP Veritas Volume Manager 5.0 -UX 11i v3 manual

Page 554

vxdisk scandisks rescanning devices 82 scanning devices 82

vxdiskadd

adding disks to disk groups 171 creating disk groups 171

placing disks under VxVM control 101 vxdiskadm

Add or initialize one or more disks 97, 171 adding disks 97

adding disks to disk groups 171 Change/display the default disk layout 97 changing disk-naming scheme 91 changing the disk-naming scheme 91 creating disk groups 171

deporting disk groups 173 Disable (offline) a disk device 118 Enable (online) a disk device 117

Enable access to (import) a disk group 174 Exclude a disk from hot-relocation use 389 excluding free space on disks from hot-

relocation use 389 importing disk groups 174 initializing disks 97

List disk information 121 listing spare disks 386

Make a disk available for hot-relocationuse 389

making free space on disks available for hot- relocation use 389

Mark a disk as a spare for a disk group 387 marking disks as spare 387

Mirror volumes on a disk 272 mirroring volumes 272 Move volumes from a disk 291

moving disk groups between systems 187 moving disks between disk groups 185 moving subdisks after hot-relocation 391 moving subdisks from disks 172 moving volumes from VM disks 291 Remove a disk 110, 172

Remove a disk for replacement 113 Remove access to (deport) a disk group 173 removing disks from pool of hot-relocation

spares 388

Replace a failed or removed disk 115 Turn off the spare flag on a disk 388 Unrelocate subdisks back to a disk 391 unrelocating subdisks after hot-relocation 391

Index

vxdiskunsetup

removing disks from VxVM control 112, 172 vxdmpadm

changing TPD naming scheme 94 configuring an APM 162 configuring I/O throttling 157 configuring response to I/O errors 156 disabling controllers in DMP 136 disabling I/O in DMP 153 discovering disk access names 94 displaying APM information 162 displaying DMP database information 137 displaying DMP node for a path 140 displaying DMP node for an enclosure 140 displaying I/O error recovery settings 159 displaying I/O policy 147

displaying I/O throttling settings 159 displaying information about controllers 141 displaying information about enclosures 142 displaying partition size 147

displaying paths controlled by DMP node 140 displaying status of DMP error handling

thread 162

displaying status of DMP restoration thread 161

displaying TPD information 143 enabling I/O in DMP 154 gathering I/O statistics 144

listing information about array ports 142 removing an APM 163

renaming enclosures 155 setting I/O policy 150, 151 setting path attributes 146 setting restore polling interval 160 specifying DMP path restoration policy 160 stopping DMP restore daemon 161

vxedit

changing plex attributes 234 changing subdisk attributes 221, 222 configuring number of configuration copies for

a disk group 474

excluding free space on disks from hot- relocation use 388

making free space on disks available for hot- relocation use 389

marking disks as spare 387 removing a cache 347

removing disks from pool of hot-relocation spares 388

555

Image 554
Contents Veritas Volume Manager Administrator’s Guide Legal Notices Page Contents Booting root volumes Using vxdiskadd to place a disk under control of VxVMVxVM root disk volume restrictions Setting up a VxVM root disk and mirror133 Taking a disk offline 118119 136207 167185 Displaying subdisk information 216 Setting default values for vxassist 241215 217275 252274 289 Moving volumes from a VM disk 290288 290Chapter Creating and administering volume sets 356388 386387 390434 441507 Setup tasks after installation 511463 512521 531 Understanding Veritas Volume Manager Veritas Enterprise Administrator User’s Guide VxVM and the operating system How data is storedHow VxVM handles storage management Physical objects-physical disksDisk arrays Operating system Multipathed disk arraysDevice discovery Enclosure-based naming Fibre Channel hub or switch Provide redundant loop access C2t99d0Virtual objects in VxVM include the following Virtual objectsCombining virtual objects in VxVM Connection between objects in VxVM Disk groups VM disksSubdisks Plexes Volumes How VxVM handles storage management Disk01-01 vol06-01 Implementation of layered volumes Volume layouts in VxVMImplementation of non-layered volumes Following sections describe each layout method Layout methodsConcatenation and spanning 12 Example of concatenation Data Disk01-01 Example of spanning Data +1 n+2Striping RAID-0 Su1 Su2 Su3 Devname3 Devname2 Mirroring RAID-1 Striping plus mirroring mirrored-stripe or RAID-0+117 Mirrored-stripe volume laid out on six disks Mirroring plus striping striped-mirror, RAID-1+0 or RAID-10Column Mirror Striped plex RAID-5 striping with parity Mirror volumesYou need a full license to use this feature Data Parity Traditional RAID-5 arraysVeritas Volume Manager RAID-5 arrays 22 Veritas Volume Manager RAID-5 array Stripe Left-symmetric layoutUnderstanding Veritas Volume Manager RAID-5 logging Layered volumes Example of a striped-mirror layered volume Understanding Veritas Volume Manager Online relayout How online relayout worksThree columns of length 5L/3 Striped volume Limitations of online relayout Transformation characteristics Transformations and volume lengthResynchronization process Volume resynchronizationDirty flags Dirty region logging Dirty region logsLog subdisks and plexes Sequential DRLSmartSync recovery accelerator Data volume configurationVolume snapshots Redo log volume configurationOriginal Use on creation Requires less storage Comparison of snapshot featuresSpace than original Volume FastResync FastResync enhancements Non-persistent FastResyncHow non-persistent FastResync works with snapshots DCO volume versioningPersistent FastResync Version 0 DCO volume layout Version 20 DCO volume layoutWhere the size of each map in bytes is How persistent FastResync works with snapshotsDCO FastResync Effect of growing a volume on the FastResync map FastResync limitations Volume sets Hot-relocationVolume sets Administering disks Disk devicesThere are two different methods of naming disk devices Disk device naming in VxVMOperating system-based naming # vxdisk path egrep diskname Private and public disk regions Configured as this disk type. However, it is not a suitable Configures disk access records for them automaticallyTo boot the system.Typically, most disks on a system are Format for boot, root or swap disks, for mirrors orPartial device discovery Discovering and configuring newly added disk devicesFollowing command scans for the devices c1t1d0 and c2t2d0 Next example discovers fabric devicesFor more information, see the vxdisk1M manual Discovering disks and dynamically adding disk arraysDisk categories Enabling discovery of new devices Third-party driver coexistenceAdding support for a new disk array Removing support for a disk array# vxddladm listsupport all Administering the Device Discovery LayerListing details of supported disk arrays # vxddladm listsupport libname=libraryname.slListing excluded disk arrays Excluding support for a disk array libraryRe-including support for an excluded disk array library Listing supported disks in the Disks category Adding unsupported disk arrays to the Disks category# vxdmpadm listenclosure all Length=serialnolength policy=ap# vxddladm addjbod vid=SEAGATE pid=ST318404LSUN18G # vxdisk list# vxddladm rmjbod vid=SEAGATE Removing disks from the Disks categoryAdding foreign devices Placing disks under VxVM control See Migrating between DMP and HP-UX native multipathing onChanging the disk-naming scheme Mode Format of output from VxVM commandDefault LegacyVxVM vxdmpadm Error V-5-1-10910 Invalid da-name # vxdmpadm getlungroup dmpnodename=disk25This regenerates the persistent name database Restart the VxVM configuration demonRegenerating persistent device names # vxdmpadm getsubpaths dmpnodename=enclosure-basedname Changing device naming for TPD-controlled enclosures# vxdmpadm setattr enclosure enclosure tpdmode=nativepseudo Persistent simple or nopriv disks in the boot disk group # vxconfigd -kr resetRe-import the disk group using the following command Installing and formatting disksPersistent simple or nopriv disks in non-boot disk groups Adding a disk to VxVM Displaying and changing default disk layout attributesAdd or initialize disks Menu VolumeManager/Disk/AddDisks C3t0d0 c3t1d0 c3t2d0 c3t3d0 Exclude disks from hot-relocation use? y,n,q,? default n n Continue operation? y,n,q,? default y yUse default disk names for the disks? y,n,q,? default y Add site tag to disks? y,n,q,? default nEnter desired private region length privlen,q,? default Continue with operation? y,n,q,? default y yEnter the desired format cdsdisk,hpdisk,q,? default cdsdisk Following disksReinitializing a disk Using vxdiskadd to place a disk under control of VxVMAdd or initialize other disks? y,n,q,? default n Vxdiskadm then proceeds to add the disksRootability VxVM root disk volume restrictions Root disk mirrors# /etc/vx/bin/vxcplvmroot -b c0t4d0 Booting root volumesSetting up a VxVM root disk and mirror # /etc/vx/bin/vxcplvmroot -R 30 -v -b c0t4d0 # /etc/vx/bin/vxcplvmroot -m c1t1d0 -R 30 -v -b c0t4d0Creating an LVM root disk from a VxVM root disk View the changed swap configuration Adding swap volumes to a VxVM rootable systemAdding persistent dump volumes to a VxVM rootable system Display the initial crash dump configuration# crashconf -ds /dev/vx/dsk/bootdg/dumpvol Removing a persistent dump volumeYou can now remove the volume if required Dynamic LUN expansion109 # vxvol -g diskgroup stop volume1 volume2 Removing disksRemoving a disk with subdisks Continue with operation? y,n,q,? default yRemove another disk? y,n,q,? default n VxVM Info V-5-2-268 Removal of disk mydg01 is completeRemoving and replacing disks # /usr/lib/vxvm/bin/vxdiskunsetup c#t#d#Removing a disk from VxVM control Removing a disk with no subdisks# vxassist move mkting !mydg02 Are you sure you want do this? y,n,q,? default nTo replace a disk Following devices are available as replacements c0t1d0 Removing and replacing disksFollowing devices are available as replacements Replacing a failed or removed diskReplace another disk? y,n,q,? default n Enabling a disk Then run the following command on the master nodeSelect a disk device to enable address,list,q,? c0t2d0 # vxreattach -r accesnameTaking a disk offline Enable another device? y,n,q,? default nDisable another device? y,n,q,? default n Reserving disks You would use the following command to rename the diskRenaming a disk VxVM returns a display similar to the following Displaying disk informationSee the vxedit1M manual page for more information Displaying disk information with vxdiskadm List disk information Menu VolumeManager/Disk/ListDiskEnter disk device or all address,all,q,? default all To set the Pfto value on a disk, use the following command Controlling Powerfail TimeoutSetting the Pfto values Displaying the Pfto valuesFor example, to disable Pfto on the disk c5t0d6 Enabling or disabling PftoControlling Powerfail Timeout Administering dynamic multipathing DMP How DMP worksHow DMP works Enc00 How DMP monitors I/O on paths Path failover mechanismLoad balancing ThrottlingMigrating between DMP and HP-UX native multipathing Use the following commands to initiate the migrationDMP coexistence with HP-UX native multipathing # vxvol -g diskgroup stopallRestart all the volumes in each disk group # vxvol -g diskgroup startallDMP in a clustered environment Under the new naming scheme asEnabling or disabling controllers with shared disk groups Disabling and enabling multipathing for specific devicesDisabling multipathing and making devices invisible to VxVM Enabling multipathing and making devices visible to VxVM 135 Administering dynamic multipathing DMP Displaying the paths to a disk Typical output from the vxdisk list command is as followsDisplaying DMP database information Disabled Lockrgn Disabled ConfigDisabled Log C1t0d3 state=enabled Type=secondary# vxdmpadm getdmpnode nodename=c3t2d1 Administering DMP using vxdmpadmRetrieving information about a DMP node # vxdmpadm getlungroup dmpnodename=c11t0d10 Displaying the members of a LUN group# vxdmpadm getdmpnode enclosure=enc0 # vxdmpadm getsubpaths dmpnodename=c2t66d0Displaying information about controllers # vxdmpadm listctlr allDisplaying information about array ports Following is example output from this commandDisplaying information about enclosures # vxdmpadm gettpdnode nodename=c7t0d10 # vxdmpadm getsubpaths tpdnodename=emcpower10Displaying information about TPD-controlled devices Gathering and displaying I/O statistics Examples of using the vxdmpadm iostat commandTo reset the I/O counters to zero, use this command # vxdmpadm iostat show dmpnodename=c0t0d0 # vxdmpadm iostat start memory=4096# vxdmpadm iostat show pathname=c3t115d0 # vxdmpadm iostat show enclosure=Disk# vxdmpadm setattr path c3t10d0 pathtype=nomanual Setting the attributes of the paths to an enclosure# vxdmpadm setattr path c2t10d0 pathtype=active # vxdmpadm setattr path c1t20d0 pathtype=nopreferredDisplaying the I/O policy Specifying the I/O policy# vxdmpadm setattr enclosure enc1 iopolicy=adaptive Following policies may be setAdaptive Adaptiveminq048 # vxdmpadm setattr arrayname Sena iopolicy=priority This is the default I/O policy for Active/Active A/A arrays# vxdmpadm setattr enclosure Disk iopolicy=minimumq # vxdmpadm setattr arraytype A/A iopolicy=round-robin# vxdmpadm setattr arrayname Disk iopolicy=singleactive Default setting for this attribute is useallpaths=noExample of applying load balancing in a SAN # vxdisk list c3t2d15# vxdmpadm getattr enclosure ENC0 iopolicy DMP statistics are now reset# dd if=/dev/vx/rdsk/mydg/myvol1 of=/dev/null Disabling I/O for paths, controllers or array ports # vxdmpadm -c-fdisable path=pathname# vxdmpadm -c-fdisable ctlr=ctlrname # vxdmpadm setattr enclosure ENC0 iopolicy=singleactiveEnabling I/O for paths, controllers or array ports # vxdmpadm enable path=pathname# vxdmpadm enable ctlr=ctlrname Upgrading disk controller firmwareStop I/O to all disks through one controller of the HBA Re-enable the plex associated with the deviceRenaming an enclosure For the other controller on the HBA, enter# vxdmpadm setattr \ Configuring the response to I/O failures# vxdmpadm getattr enclosure enc0 recoveryoption Configuring the I/O throttling mechanism # vxdmpadm setattr arraytype A/A recoveryoption=default# vxdmpadm setattr enclosure enc0 recoveryoption=nothrottle HDS9500-ALUA0 Error-Retry Displaying recoveryoption values# vxdmpadm getattr enclosure HDS9500-ALUA0 recoveryoption Configuring DMP path restoration policies # vxdmpadm start restore interval=seconds policy=checkallThis produces output such as the following Stopping the DMP path restoration threadDisplaying the status of the DMP path restoration thread To add and configure an APM, use the following command Displaying information about the DMP error-handling threadConfiguring array policy modules One daemon should be shown as running# vxdmpadm -r cfgapm modulename Administering DMP using vxdmpadm Creating and administering disk groups Creating and administering disk groups System-wide reserved disk groups Specifying a disk group to commandsBlock special device corresponding to this volume is To nodg# vxdg bootdg Rules for determining the default disk groupDisplaying the system-wide boot disk group See the vxdg1M manual page for more information# vxdg list diskgroup Displaying disk group information# vxdg list # vxdisk -s list devicenameFollowing is example output Creating a disk groupDisplaying free space in a disk group # vxdg init mktdg mktdg01=c1t0d0 Adding a disk to a disk group# vxdiskadd c1t0d0 # vxdg -g diskgroup set cds=onoffRemoving a disk from a disk group # vxdiskunsetup devicename# vxdiskunsetup c1t0d0 # vxdg -g diskgroup rmdisk disknameDeporting a disk group # vxdisk -s list Importing a disk groupNewdg Handling disks with duplicated identifiers Select disk group to import group,list,q,? default listSelect another disk group? y,n,q,? default n VxVM Info V-5-2-374 The import of newdg was successful# vxdisk updateudid c2t66d0 c2t67d0 Option to the vxdg import command, as shown in this# vxdisk -f-g diskgroup updateudid disk Writing a new Udid to a disk# vxdisk settag mytaggeddisks c2t66d0 c2t67d0 # vxdg -o useclonedev=on -o updateid import mydg# vxdisk -g diskgroup settag tagname disk # vxdisk listtag# vxdg -q listmeta diskgroup Enabling configuration database copies on tagged disksSample cases of operations on cloned disks # vxdg -o useclonedev=on -o tag=mytaggeddisks import mydg# vxdisk -o alldgs list # vxdg -g mydg set tagmeta=on tag=t1 nconfig=all nlog=allImporting cloned disks without tags # /usr/symcli/bin/symmir -g mydg split DEV001 Symmir command is used to split off the BCV deviceTo import only the cloned disks into the mydg disk group State of the cloned disk is now shown as online clonedisk # vxdg -n newdg -o useclonedev=on -o updateid import mydgImporting cloned disks with tags Disks are tagged as follows# vxdisk set EMC08 clone=off # vxdisk -o alldgs list This command results in output such as the following Renaming a disk group# vxdg -tC -n newdg import diskgroup Moving disks between disk groupsDgid 774226267.1025.tweety # vxrecover -g diskgroup -sb Moving disk groups between systems# vxdisk clearimport devicename Handling errors when importing disksTo clear the locks during import, use the following command # vxdg -C import diskgroup# vxdg -f import diskgroup Following error message indicates a recoverable errorReserving minor numbers for disk groups # xvdg init newdg minor=30000 c1d0t0 c1t1d0 # vxprint -g mydg reminorCompatibility of disk groups between platforms # vxdg -g diskgroup set maxdev=4079Handling conflicting configuration copies Example of a serial split brain condition in a cluster191 Typical arrangement of a 2-node campus cluster Automatically Expected a = Expected B =Imported on host Y Correcting conflicting configuration information # vxsplitlines -g newdgReorganizing the contents of disk groups Reorganizing the contents of disk groups 197 Disk group join operation Limitations of disk group split and join Moving DCO volumes between disk groups Listing objects potentially affected by a move201 Split Snapshot Moving objects between disk groups # vxprint # vxdg -o expand move mydg rootdg mydg01# vxdg -o expand split rootdg mydg rootdg07 rootdg08 Following commands would also achieve the same resultSplitting disk groups Joining disk groups # vxdg -o overrideverify join sourcedg targetdgMydg Mydg05 C1t96d0 Following command joins disk group mydg to rootdgDisabling a disk group Mydg06 C1t98d0Upgrading a disk group Recovering a destroyed disk groupDestroying a disk group Use the disk group ID to import the disk groupUpgrading a disk group Features supported by disk group versions # vxdg list dgname To list the version of a disk group, use this command# vxdg upgrade dgname Managing the configuration daemon in VxVM # vxdg -T 120 init newdg newdg01=c0t3d0# vxnotify -f Backing up and restoring disk group configuration dataUsing vxnotify to monitor configuration changes # vxnotify -sUsing vxnotify to monitor configuration changes Creating subdisks # vxmake -g mydg sd mydg02-01 mydg02,0,8000# vxprint -st This command provides the following outputDisplaying subdisk information # vxprint -g diskgroup -l subdisk# vxsd -g mydg mv mydg03-01 mydg12-01 mydg12-02 Moving subdisksSplitting subdisks # vxmake -g diskgroup plex plex sd=subdisk Joining subdisksAssociating subdisks with plexes # vxsd -g mydg -l 1 assoc vol02-01 mydg11-01 # vxsd -g mydg assoc home-1 mydg02-01 mydg02-00 mydg02-01# vxsd -g mydg -l 4096b assoc vol10-01 mydg15-01 # vxsd -g diskgroup assoc plex subdisk10 ... subdiskMN-1# vxsd -g diskgroup aslog plex subdisk # vxassist -g diskgroup addlog volume diskAssociating log subdisks # vxsd -g mydg aslog vol01-02 mydg02-01Removing subdisks To remove a subdisk, use the following commandDissociating subdisks from plexes Changing subdisk attributes# vxedit -g mydg set comment=subdisk comment mydg02-01 # vxedit -g mydg set putil0=DO-NOT-USE mydg02-01Creating plexes # vxmake -g mydg plex vol01-02 sd=mydg02-01,mydg02-02Plex states Creating a striped plexDisplaying plex information Dcosnp plex state Clean plex stateActive plex state LOG plex state Empty plex stateIofail plex state Offline plex stateTemp plex state Snaptmp plex stateStale plex state Temprm plex statePlex condition flags Attaching and associating plexes Disabled plex kernel stateEnabled plex kernel state Plex kernel states# vxmend -g mydg off vol01-02 vol02-02 Taking plexes offline# vxmend -g diskgroup off plex Detaching plexes Reattaching plexes# vxvol -g diskgroup start volume Start the volume using the following command# vxmend -g diskgroup fix clean plex Moving plexesDissociating and removing plexes Copying volumes to plexes# vxplex -g diskgroup cp volume newplex # vxplex -g diskgroup -o rm dis plex# vxedit -g mydg set comment=plex comment tutil2=u vol01-02 Changing plex attributes# vxedit -g diskgroup set attribute=value ... plex # vxedit -g mydg set putil0=DO-NOT-USE vol01-02Creating volumes Types of volume layouts RAID-5Supported volume logs and maps Mirror and concatenated-mirror volumesCreating a volume Advanced approachUsing vxassist Assisted approach# vxassist options make volume length attributes VxassistSetting default values for vxassist Following is a sample vxassist defaults file# vxassist -g diskgroup maxsize layout=layout attributes Discovering the maximum size of a volumeDisk group alignment constraints on volumes # vxassist -g dgrp maxsize layout=raid5 nlog=2# vxassist -b make voldefault 10g Creating a volume on any disk# vxassist -b -g diskgroup make volume length # vxprint -g diskgroup -G -F %align# vxassist -b -g mydg make volspec 5g ctlrc1 !targetc1t5 Creating a volume on specific disks# vxassist -b -g mydg make volspec 5g mydg03 mydg04 Specifying ordered allocation of storage to volumes Mydg01 mydg02 mydg03 mydg04 mydg05 mydg06 mydg07 mydg08 Stripe volume Volume across controllers Creating a concatenated-mirror volume Creating a mirrored volumeCreating a mirrored-concatenated volume # vxassist -b -g mydg make volmir 5g layout=mirrorCreating a volume with a version 0 DCO volume For more information, see Upgrading a disk group on # vxdg -T 90 upgrade diskgroup# vxvol -g diskgroup set logtype=drldrlseq volume # vxdg upgrade diskgroup Creating a volume with a version 20 DCO volumeCreating a volume with dirty region logging enabled # vxassist -b -g mydg make volzebra 10g layout=stripe Creating a striped volume# vxassist -b -g diskgroup make volume length layout=stripe Creating a mirrored-stripe volume Creating a striped-mirror volumeMirroring across targets, controllers or enclosures Creating a RAID-5 volume # vxassist -b -g mydg make volraid 10g layout=raid5 nlog=2# vxassist -g diskgroup list tag=tagname volume Creating tagged volumes# vxassist -g diskgroup listtag volume Creating a volume using vxmake Creating a volume using a vxmake description file # vxmake -g diskgroup -d descriptionfileMydg04-021/8000,mydg04-031/16000 Initializing and starting a volume# vxassist -b -g diskgroup make volume length layout=mirror # vxvol -g diskgroup init active volume Initializing and starting a volume created using vxmake# vxvol -g diskgroup init enable volume # vxvol -g diskgroup init zero volumeAccessing a volume Administering volumes This is example output from this command Displaying volume informationVxprint command can also be applied to a single disk group Clean volume state Volume statesActive volume state Empty volume stateNeedsync volume state Volume kernel statesInvalid volume state Replay volume stateEnabled volume kernel state Detached volume kernel stateDisabled volume kernel state Monitoring and controlling tasksManaging tasks with vxtask Vxtask operationsUsing the vxtask command Stopping a volume Putting a volume in maintenance modeTo start all Disabled volumes, enter Starting a volumeAdding a mirror to a volume # /etc/vx/bin/vxmirror -g diskgroup -a Mirroring all volumesMirroring volumes on a VM disk # /etc/vx/bin/vxmirror -d yesRemoving a mirror Mirror volumes on another disk? y,n,q,? default n# vxassist -gdiskgroup remove mirror volume At the following prompt, press Return to make the mirrorAdding logs and maps to volumes Preparing a volume for DRL and instant snapshots Specifying storage for version 20 DCO plexes Determining the DCO version number Using a DCO and DCO volume with a RAID-5 volume# DCONAME=‘vxprint -g diskgroup -F%dconame volume‘ # vxprint -g diskgroup -F%version $DCONAMEThis command returns on if DRL logging is enabled Determining if DRL is enabled on a volumeDetermining if DRL logging is active on a volume Disabling and re-enabling DRLTo re-enable sequential DRL on a volume, enter Upgrading existing volumes to use version 20 DCOsTo re-enable DRL on a volume, enter this command Use the following command on the volume to upgrade it Adding traditional DRL logging to a mirrored volume Removing a traditional DRL log To remove a DRL log, use the vxassist command as follows# vxassist -g mydg addlog volume logtype=drlseq nlog=n # vxassist -g mydg addlog vol03 logtype=drlAdding a RAID-5 log Adding a RAID-5 log using vxplex# vxassist -b -g diskgroup addlog volume loglen=length # vxassist -g mydg addlog volraid# vxassist -g diskgroup maxgrow volume Resizing a volume# vxprint -g diskgroup -ht volume Removing a RAID-5 logVxFS Mounted File System Resizing volumes using vxresizeOnline JFS Full Base JFS Lite Unmounted File SystemExtending by a given length Resizing volumes using vxassistExtending to a given length Shrinking by a given length Resizing volumes using vxvolShrinking to a given length Setting tags on volumes # vxassist -g diskgroup removetag volume tagnameChanging the read policy for mirrored volumes To set the read policy to select, use the following command Removing a volumeMoving volumes from a VM disk VxVM vxevac Info To move volumes from a diskMove volumes from another disk? y,n,q,? default n VxVM Info V-5-2-188 Evacuation of disk mydg02 is completeEnabling FastResync on a volume # vxvol -g diskgroup set fastresync=on volume# vxprint -g diskgroup -F%hasdcolog volume Checking whether FastResync is enabled on a volume# vxprint -g diskgroup -F%fastresync volume Disabling FastResyncPerforming online relayout # vxassist -g mydg relayout vol02 layout=stripePermitted relayout transformations Relayout to From mirror-concat Concat Supported relayout transformations for RAID-5 volumesRelayout to From raid5 Concat Mirror-concat Mirror-stripeSupported relayout transformations for unmirrored stripe Layered striped-mirror volumesRelayout to From mirror-stripe Concat Relayout to From stripe or stripe-mirror ConcatTagging a relayout operation Specifying a non-default layoutSpecifying a plex for relayout # vxassist -g fsgrp relayout vol04 layout=raid5 ncol=4Controlling the progress of a relayout To resume the operation, use the vxtask commandViewing the status of a relayout # vxrelayout -g mydg -o bg reverse vol04 Converting between layered and non-layered volumes# vxrelayout -g mydg -o bg,slow=1000,iosize=10m start vol04 # vxassist -g mydg relayout vol1 ncol=5# vxassist -g mydg convert vol1 layout=mirror-stripe Converting between layered and non-layered volumes Administering volume snapshots Administering volume snapshots Independent Volume Vxassist snapclear Traditional third-mirror break-off snapshotsTraditional third-mirror break-off snapshots Full-sized instant snapshots 308 Administering volume snapshots Space-optimized instant snapshots Cycle Start Vxsnap make Vxsnap refresh Vxsnap prepareEmulation of third-mirror break-off snapshots Linked break-off snapshot volumes Cascaded snapshots Cascaded snapshotsCreating a snapshot of a snapshot Creating a snapshot of a snapshot Create instant snapshot S2 of S1 Vxsnap make source=S1 Vxsnap dis S2 Restoring the original volume from a snapshot Creating multiple snapshotsRestoring the original volume from a snapshot Creating instant snapshots Creating instant snapshots Preparing to create instant and break-off snapshots Creating a shared cache object # vxcache -g mydg start cobjmydg # LEN=‘vxprint -g diskgroup -F%len volume‘For example to start the cache object, cobjmydg # RSZ=‘vxprint -g diskgroup -F%regionsz $DCONAME‘Creating and managing space-optimized instant snapshots Creating instant snapshots # fsck -F vxfs /dev/vx/rdsk/diskgroup/snapshot # vxsnap -g diskgroup syncwait snapvol Creating and managing full-sized instant snapshots# vxsnap -g mydg make source=myvol/snapvol=snap1myvol # vxsnap -g mydg syncwait snap2myvol# vxprint -gdiskgroup -F%incompletesnapvol Creating and managing third-mirror break-off snapshots # vxsnap -g mydg addmir vol1 nmirror=2 alloc=mydg10,mydg11# vxsnap -g mydg snapwait vol1 nmirror=2 Creating and managing linked break-off snapshot volumes # vxsnap -g diskgroup -b addmir volume mirvol=snapvol \Mirdg=snapdg # vxsnap -g diskgroup make \ Reattach the snapshot volume with the original volume. SeeCreating multiple instant snapshots # vxsnap -g diskgroup make source=vol1/snapvol=snapvol1 \# vxvset -g mydg list snapvset1 Creating instant snapshots of volume sets# vxvset -g mydg list vset1 Svol2 614400 Svol0 204800Svol1 409600 # vxsnap -g mydg rmmir vol1 Adding snapshot mirrors to a volumeRemoving a snapshot mirror Refreshing an instant snapshot Removing a linked break-off snapshot volumeAdding a snapshot to a cascaded snapshot hierarchy # vxsnap -g mydg rmmir vol1 mirvol=prepsnap mirdg=mysnapdgReattaching an instant snapshot # vxsnap -g mydg reattach snapmyvol source=myvol nmirror=1Reattaching a linked break-off snapshot volume # vxsnap -g mydg snapwait myvol nmirror=1Dissociating an instant snapshot Restoring a volume from an instant snapshot# vxsnap -g mydg restore myvol source=snap3myvol # vxsnap -g snapdg snapwait myvol mirvol=prepsnap# vxsnap -g mydg dis snap2myvol Removing an instant snapshotSplitting an instant snapshot hierarchy # vxedit -g mydg -r rm snap2myvol# vxsnap -g diskgroup print vol Displaying instant snapshot information# vxsnap -g mydg split snap2myvol # vxsnap -g mydg print# vxsnap -g diskgroup -l -v -x list vol # vxsnap -g dg -vx listVxsnap -b -g diskgroup syncstart \ Controlling instant snapshot synchronizationVxsnap -g diskgroup syncresume \ Vxsnap -g diskgroup syncstop vol volset# vxcache -g diskgroup listvol cacheobject Listing the snapshots created on a cacheImproving the performance of snapshot synchronization Tuning the autogrow attributes of a cache # vxcache -g mydg set highwatermark=60 cobjmydgRemoving a cache Finally, remove the cache object and its cache volumeGrowing and shrinking a cache Creating traditional third-mirror break-off snapshots # vxassist -g diskgroup snapstart voldef # vxassist -b -g diskgroup snapstart nmirror=N volume# vxassist -g diskgroup snapwait volume # vxassist -g diskgroup snapshot voldef snapvol Create a snapshot volume using the following command# vxassist -g diskgroup snapshot nmirror=N volume snapshot # vxedit -g diskgroup -rf rm snapshotConverting a plex into a snapshot plex # vxplex -g diskgroup convert state=SNAPDONE plex Reattaching a snapshot volumeCreating multiple snapshots # vxassist -g diskgroup -o allvols snapshot# vxassist -g diskgroup snapback nmirror=number snapshot Adding plexes to a snapshot volume# vxassist -g diskgroup -o allplexes snapback snapshot # vxassist snapclear snapshot Dissociating a snapshot volume# vxprint -g diskgroup -F%rid $DCOVOL Displaying snapshot information Output from this command is shown in the following examples# vxassist snapprint volume # vxassist -g mydg snapprintAdding a version 0 DCO and DCO volume Specifying storage for version 0 DCO plexes # vxdco -g mydg dis myvoldco Removing a version 0 DCO and DCO volume# vxdco -g diskgroup -o rm dis dcoobj # vxdco -g mydg att myvol myvoldco Reattaching a version 0 DCO and DCO volumeFor more information, see the vxdco1M manual Adding a version 0 DCO and DCO volume Creating and administering volume sets Creating a volume set Adding a volume to a volume setListing details of volume sets Stopping and starting volume sets# vxvset -g diskgroup -f rmvol volset volume Removing a volume from a volume setRaw device node access to component volumes # vxvset -g mydg start set1 # vxvset -g mydg list set1Enabling raw device access when creating a volume set # vxvset -g diskgroup -fset makedev=onoff vset Displaying the raw device access settings for a volume setControlling raw device access for an existing volume set # vxvset -g mydg set makedev=off myvset2 # vxvset -g mydg set compvolaccess=read-write myvset2# vxvset -g mydg set makedev=on myvset2 Raw device node access to component volumes Configuring off-host processing Implementing off-host processing solutions Example implementation of off-host processingImplementing off-host online backup # vxprint -g volumedg -F%instant volume# vxvol -g volumedg set fastresync=on volume # fsck -F vxfs /dev/vx/rdsk/snapvoldg/snapvol # vxdg deport snapvoldg# vxdg import snapvoldg Implementing decision support # vxsnap -g volumedg snapwait volume mirvol=snapvol# vxprint -g volumedg -F%instantvolume 375 # mount -F vxfs /dev/vx/dsk/snapvoldg/snapvol \ mountpoint You can then resume the procedure from on Implementing off-host processing solutions Administering hot-relocation How hot-relocation works 381 Mydg05 # vxstat -g mydg -s -ff home-02 src-02 # vxrecover -b -g mydg home srcPartial disk failure mail messages Sd mydg01-04 Sd mydg01-06 Sd mydg02-03 Sd mydg02-04Failing disks mydg02 Complete disk failure mail messagesHow space is chosen for relocation Configuring a system for hot-relocation Mydg mydg02 C0t2d0 658007 Displaying spare disk information# vxdg -g diskgroup spare # vxedit -g mydg set spare=on mydg01 Mark another disk as a spare? y,n,q,? default nMarking a disk as a hot-relocation spare Excluding a disk from hot-relocation use Where diskname is the disk media nameRemoving a disk from use as a hot-relocation spare Following confirmation is displayed# vxedit -g diskgroup set nohotuse=off diskname Making a disk available for hot-relocation useTo use vxdiskadm to exclude a disk from hot-relocation use Spare=only Configuring hot-relocation to use only spare disksMoving and unrelocating subdisks To root Subject Attempting VxVM relocation on host tealStatus message is displayed at the end of the operation Moving and unrelocating subdisks using vxdiskadmUnrelocate to a new disk y,n,q,? default n Enter the original disk name disk,list,q,?# vxassist -g mydg move home !mydg05 mydg02 Moving and unrelocating subdisks using vxassistMoving and unrelocating subdisks using vxunreloc Forcing hot-relocated subdisks to accept different offsets Moving hot-relocated subdisks back to their original diskMoving hot-relocated subdisks back to a different disk # vxprint -g mydg -se sdorigdmname=mydg01 Restarting vxunreloc after errorsExamining which subdisks were hot-relocated from a disk # nohup vxrelocd root Nohup vxrelocd -o slow=IOdelay rootModifying the behavior of hot-relocation Nohup vxrelocd root user1 user2# nohup /etc/vx/bin/vxrelocd root user1 user2 Alternatively, you can use the following commandSee the vxrelocd1M manual page for more information Administering cluster functionality Overview of cluster volume management 399 Example of a 4-node cluster Private and shared disk groups Two types of disk groups are definedReadonly ro Activation modes of shared disk groupsExclusivewrite ew Sharedread srActivation modes for shared disk groups Activation mode DescriptionEnableactivation=true Defaultactivationmode=activation-mode Sharedwrite swConnectivity policy of shared disk groups Global detach policy Local detach policy Disk group failure policy Guidelines for choosing detach and failure policies Effect of disk connectivity on cluster reconfiguration Limitations of shared disk groupsCluster initialization and configuration Cluster reconfiguration# /etc/vx/bin/vxclustadm nodestate state out of cluster Vxclustadm utilityVarious reasons that may be given are shown in Table Reason user initiated stopNode abort messages Reason DescriptionVolume reconfiguration Vxconfigd daemon Vxconfigd daemon recovery# hagrp -freeze group # hagrp -unfreeze groupNode shutdown Cluster shutdown Multiple host failover configurationsNode abort Import lock FailoverCorruption of disk group configuration Where the reason can describe errors such asRequesting node status and discovering the master node Administering VxVM in cluster environments# vxdctl -c mode See the vxdctl1M manual page for more informationDetermining if a disk is shareable Example output from this command is displayed hereExample output from this command is as follows Listing shared disk groupsCreating a shared disk group # vxdg -s init diskgroup diskname=devicename# vxdg -s import diskgroup Importing disk groups as sharedForcibly importing a disk group # vxdg -s -f import diskgroupConverting a disk group from shared to private Default disk detach policy is global Changing the activation mode on a shared disk groupSetting the disk detach policy on a shared disk group # vxdg -g diskgroup set activation=mode# vxdg -g diskgroup set dgfailpolicy=dgdisableleave Creating volumes with exclusive open access by a nodeSetting exclusive open access to a volume by a node # vxvol -g dskgrp set exclusive=on volmirDisplaying the cluster protocol version This command produces output similar to the followingThis command produces out put similar to the following Displaying the supported cluster protocol version rangeObtaining cluster performance statistics Recovering volumes in shared disk groupsUpgrading the cluster protocol version Vol Vol1 2421 600000 99.0 # vxstat -bAdministering VxVM in cluster environments Administering Sites and remote mirrors Site-consistent volume with two plexes at each of two sites Example of a two-site configuration with remote storage only To remove the site name from a host, use this command Configuring sites for hosts and disksConfiguring site-based allocation on a disk group # vxdg -g diskgroup set siteconsistent=on Configuring site consistency on a disk groupConfiguring site consistency on a volume # vxdg -g diskgroup set siteconsistent=offRAID-5 volumes in a site-consistent disk group Setting the siteread policy on a volumeSite-based allocation of storage to volumes # vxassist -g diskgroup make volume size mirror=site Examples of storage allocation using sites Command DescriptionRegister a site record for each site with the disk group Turn on site consistency for each volume in the disk groupMaking an existing disk group site consistent Turn on site consistency for the disk groupAutomatic site reattachment Fire drill testing the configurationRecovery from simulated site failure Simulating site failure# kill -9 PID Failure scenarios and recovery procedures# ps -afe Recovery from storage failure Recovery from a loss of site connectivityRecovery from host failure Failure scenario Recovery techniqueRecovery from site failure Failure scenarios and recovery procedures About Storage Expert See the vxse1M manualRunning Storage Expert Before using Storage ExpertHow Storage Expert works One of the following keywords must be specifiedRunning a rule Displaying rule attributes and their default valuesDiscovering what a rule does # vxsestripes2 infoSetting rule attributes Rule result typesIdentifying configuration problems using Storage Expert Recovery timeVxseraid5log1 Checking minimum and maximum RAID-5 log sizes vxseraid5log2Checking for non-mirrored RAID-5 logs vxseraid5log3 Disk groups Checking disk group configuration copies and logs vxsedg2Checking on disk config size vxsedg3 Checking the version number of disk groups vxsedg4Checking for non-imported disk groups vxsedg6 Checking volume redundancy vxseredundancyChecking states of plexes and volumes vxsevolplex Disk striping Checking the number of columns in RAID-5 volumes vxseraid5Volumes needing recovery Rootability Disk sparing and relocation managementHardware failures System nameChecking the system name vxsehost Rule definitions and attributes Rule Description See Running a rule onRule Attribute Default Description Value Toowideraid5 NsdthresholdVxseraid5 Toonarrowraid5 R5maxsizeVxserootmir Vxseredundancy VolumeredundancyVxsestripes1 Default stripeunit VxsesparesVxsevolplex Rule definitions and attributes Performance guidelines Data assignmentStriping MirroringCombining mirroring and striping RAID-5Volume read policies Obtaining performance data Setting performance prioritiesPerformance monitoring By vxtrace Tracing volume operationsPrinting volume statistics Using performance data Using I/O statisticsMydg03-03 Archive-01 40960 C1t2d0 Following is an extract from typical output# vxprint -g mydg -tvh archive # vxassist -g mydg move archive !mydg03 destdisk471 Using I/O tracing Tuning VxVMGeneral tuning guidelines Tuning guidelines for large systems Number of configuration copies for a disk group# vxdmpadm settune dmptunable=value # vxedit set nconfig=5 bigdgChanging the values of tunables # vxdmpadm gettune dmptunableTunable parameters Dmploglevel DmppathswitchblksshiftDmphealthtime DmppathageDmpprobeidlelun DmprestorecyclesDmprestoreinterval DmpqueuedepthDmpscsitimeout DmprestorepolicyDmpretrytimeout DmpretrycountDmpstatinterval VolcheckptdefaultVoldefaultiodelay VolfmrlogszVolmaxioctl VolmaxvolVolmaxio Volsubdisknum VolmaxparallelioVolmaxspecialio Voldrlmaxseqdirty VolcvmsmartsyncVoldrlmaxdrtregs VoldrlminregionszVolioterrbufdflt VoliotiobufdefaultVoliomemmaxpoolsz VoliotiobuflimitVolpagemodmaxmemsz VoliotiobufmaxVoliotmaxopen Volraidminpoolsz VolraidrsrtransmaxTuning VxVM Commands summary If you are using a C shell csh or tcsh, use the commandsVxdg list diskgroup Vxdisk -g diskgroup list diskname# vxdisk -g mydg list # vxdg list mydgTable A-2 Administering disks Command Description # vxedit -g mydg set \ # vxedit -g mydg rename \Mydg03 mydg02 Reserve=on mydg02Spare=off mydg04 # vxdiskunsetup c0t3d0Spare=on mydg04 # vxdisk offline c0t1d0# vxsplitlines -g mydg # vxdg init mydg \Mydg01=c0t1d0 # vxdg -n newdg deport mydgNewdg myvol1 # vxdg -o expand listmove \Mydg newdg myvol1 Newdg myvol2 myvol3# vxmake -g mydg sd \ # vxrecover -g mydg -sb# vxdg destroy mydg Mydg02-01 mydg02,0,8000Mydg11-011 mydg12-012 # vxsd -g mydg assoc \Vol01-01 mydg10-010 \ Mydg02-01Vol01-02 \ # vxsd -g mydg -o rm dis \# vxmake -g mydg plex \ Sd=mydg02-01,mydg02-02Vol02-02 vol02-03 Vol01-02# vxplex -g mydg mv \ Vol03-01 Table A-6 Creating volumes Command Description# vxplex -g mydg cp vol02 \ Vol02-02Stripeunit=W ncol=N attributes Volume length layout=striperaid5 \Vxassist -b -g diskgroup make \ Mysvol 20g layout=stripe \Plex=raidplex,raidlog1,\ # vxmake -g mydg -Uraid5\Vol r5vol \ Raidlog2Table A-7 Administering volumes Command Description Drl=onsequentialoff # vxsnap -gmydg prepare \ myvol drl=onInit=active mydg16 mydg17 # vxassist -g mydg make \Cvol 1g layout=mirror \ Cachevolname=cvolVol3 layout=raid5 \ # vxsnap -g mydg unprepare \ myvol# vxassist -gmydg relayout \ vol2 layout=stripe Stripeunit=16 ncol=4Mytask -b mydg05 # vxrecover -g mydg \# vxassist -g mydg remove \ myvol # vxtask -h -g mydg list# vxtask resume mytask # vxtask pause mytask# vxtask -p -g mydg list # vxtask abort mytaskAdministrative commands Online manual pagesTable A-9 Manual pages Name Description Vxmirror VxrecoverVxmend VxnotifyFile formats Device driver interfacesConfiguring Veritas Volume Manager Setup tasks after installationAdding disks to disk groups Adding unsupported disk arrays as JBODsAdding foreign devices Guidelines for configuring storage Mirroring guidelines Dirty region logging guidelines Striping guidelinesRAID-5 guidelines Hot-relocation guidelines517 Controlling VxVM’s view of multipathed devices Configuring cluster supportAccessing volume devices Configuring shared disk groups Converting existing VxVM disk groups to shared disk groupsReconfiguration tasks Glossary Single copy of a configuration database Page See disk enclosure Jbod Page RAID Page Page Page Index CDS Page CVM Page Page DMP Empty Page Page Page Page Iofail 228 Nodarec 228 Nodevice 228 Recover 228 Removed Page Page Page Page Page TPD Page Detached Disabled Enabled Page Page Page Page Page