Previous  |  Next  >  
Product: Storage Foundation Guides   
Manual: Storage Foundation 4.1 Cross-Platform Data Sharing Administrator's Guide   

Disk Group Tasks

The following disk group tasks are supported:

Changing the Alignment of a Disk Group by Encapsulation

If you use the vxdiskadm command to encapsulate a disk into a disk group with an alignment of 8K, the disk group alignment must be reduced to 1. As part of the encapsulation process, you are asked to confirm that this reduction of the disk group alignment is acceptable.


Note   Note    If you are using the vxencap command to perform the encapsulation, the alignment is carried out automatically without a confirmation prompt.

Object Alignment During Volume Creation

For CDS disk groups, VxVM objects that are used in volume creation are automatically aligned to 8K. For non-CDS disk groups, the vxassist attribute, dgalign_checking, controls how the command handles attributes that are subject to disk group alignment restrictions. If set to strict, the volume length and values of attributes must be integer multiples of the disk group alignment value, or the command fails and an error message is displayed. If set to round (default), attribute values are rounded up as required. If this attribute is not specified on the command-line or in a defaults file, the default value of round is used.

The diskalign and nodiskalign attributes of vxassist, which control whether subdisks are aligned on cylinder boundaries, is honored only for non-CDS disk groups whose alignment value is set to 1.

Changing the Alignment of a Non-CDS Disk Group

Use the alignment attribute (align) with the vxdg set command to change the alignment value of a version 110 disk group to 1 or to 8KB, as shown here:


vxdg -g diskgroup set align=1
vxdg -g diskgroup set align=8k
Note   Note    For a CDS disk group, alignment can only take a value of 8k. Attempts to set the alignment of a CDS disk group to 1 fail unless you first change it to a non-CDS disk group.

Increasing the alignment may require vxcdsconvert to be run to change the layout of the objects in the disk group.

To display the current alignment value, use the vxprint command as described in Displaying the Disk Group Alignment.

The operation to increase the alignment to 8K fails if objects exist in the disk group that do not conform to the new alignment restrictions. In that case, use the vxcdsconvert alignment command to change the layout of the objects as described in Converting a Non-CDS Disk Group to a CDS Disk Group:


# vxcdsconvert -g diskgroup [-A] [-d defaults_file] \
[-o novolstop] alignment [
attribute=value] ...

This command increases the alignment value of a disk group and its objects to 8K, without converting the disks.

The sequence 8K -> 1 -> 8K is possible only using vxdg set as long as the configuration does not change after the 8K -> 1 transition.

Determining the Setting of the CDS Attribute

You can use the vxdg list or vxprint commands to determine the state of the CDS attribute, as follows:


vxdg list
NAME         STATE         ID
dgTestSol2         enabled,cds         1063238039.206.vmesc1
vxdg list dgTestSol2
Group:     dgTestSol2
dgid:      1063238039.206.vmesc1
import-id: 1024.205
flags:     cds
version:   110
alignment: 8192 (bytes)
...
vxprint -F %cds -G -g dgTestSol2
on

In these examples, the disk group, dgTestSol2, is shown as having the CDS flag set.

Joining Disk Groups

Use the vxdg join command to join two disk groups. Joining two CDS disk groups or joining two non-CDS disk groups is permitted, but you cannot join a CDS disk group to a non-CDS disk group. If two non-CDS disk groups have different alignment values, the alignment of the resulting joined disk group is set to 1, and an informational message is displayed. Refer to the VERITAS Volume Manager Adminstrator's Guide for examples of using this command.


Note   Note    This command is not supported for the Solaris OS on the x64 platform.

Moving Objects Between CDS and Non-CDS Disk Groups

Use the vxdg move command to move objects between CDS and non-CDS disk groups. The alignment of a source non-CDS disk group must be 8K to allow objects to be moved to a target CDS disk group. If objects are moved from a CDS disk group to a target non-CDS disk group with an alignment of 1, the alignment of the target disk group remains unchanged. Refer to the VERITAS Volume Manager Adminstrator's Guide for examples of using this command.


Note   Note    This command is not supported for the Solaris OS on the x64 platform.

Moving Objects Between CDS Disk Groups

Use the vxdg move command to move objects between CDS disk groups. The disk group alignment does not change. Refer to the VERITAS Volume Manager Adminstrator's Guide for examples of using this command.


Note   Note    This command is not supported for the Solaris OS on the x64 platform.

Changing Default CDS Setting for Disk Group Creation

You can change the default CDS attribute setting used in creating disk groups by modifying the /etc/default/vxdg file.

Creating Non-CDS Disk Groups

Use the vxdg command to create a non-CDS pre-version 110 disk group:


vxdg -T vers init dg disk_name=device_name

A pre-version 110 DG is given an alignment value equal to 1.


Note   Note    For a pre-version 110 DG, since the dg_align value is not stored in the configuration database, it is set to 1 when the disk group is imported.

Disk groups with version numbers less than 110 are not supported for the Solaris OS on the x64 platform.

Upgrading an Older Version Non-CDS Disk Group

You might want to upgrade a non-CDS pre-version 110 disk group in order to use new features (excluding CDS).


Note   Note    You must always perform a disk group conversion (using the vxcdsconvert utility) to use the CDS feature.

Use the vxdg command to upgrade the non-CDS pre-version 110 disk group:


vxdg upgrade dg
Note   Note    After upgrading, the cds attribute is set to off, and the disk group retains an alignment of 1.

Replacing a Disk in a CDS Disk Group

To replace a disk in a CDS disk group, use the command sequence:


vxdg -k rmdisk disk_name
vxdg -k adddisk

Refer to the VERITAS Volume Manager Administrator's Guide for an explanation of the -k option.

For example:


vxdg -k rmdisk disk1
vxdg -k adddisk disk1=c1t0d1

where c1t0d1 is the device name of a Solaris disk that is currently being reassigned to disk disk1. For other operating systems, use the appropriate device name format, for example, hdisk# on AIX, and sdx on Linux.


Note   Note    When replacing a disk in a CDS disk group, you cannot use a non-CDS disk as the replacement.

Setting Device Quotas for CDS Disk Groups

Use the vxdg set command to limit the number of devices that can be created in a given CDS disk group:


vxdg set maxdev=max-devices

maxdev can have any positive integer value greater than the number of devices currently in the disk group. For example:


vxdg -g dg set maxdev=1000

Setting DRL Map Size and Log Size

If DRL is enabled on a newly created volume without specifying a log or map size, default values are used. You can use the command line attributes logmap_len and loglen in conjunction with the vxassist, vxvol, and vxmake commands to set the DRL map and DRL log sizes. The attributes can be used independently, or they can be combined.

You can change the DRL map size and DRL log size only when the volume is disabled and the DRL maps are not in use. Changes can be made to the DRL map size only for volumes in a CDS disk group.

The logmap_len attribute specifies the required size, in bytes, for the DRL log. It cannot be greater than the number of bytes available in the map on the disk.

If you need to change the size after creating, you need to remove and rebuild the logs, using the following commands:


  # vxassist -g diskgroup remove log volume nlog=0
# vxassist -g diskgroup addlog volume nlog=nlogs logtype=drl \
logmap_len=
len-bytes [drlloglen=len]

Note the following restrictions:

  • If only logmap_len is specified, the DRL log size is set to the default value (33*DG alignment).
  • If logmap_len is greater than (DRL log size)/2, the command fails, and you need to either provide a sufficiently large loglen value or reduce logmap_len.
  • For CDS disk groups, the DRL map and log sizes are set to a minimum of 2*(DG alignment).

Creating a DRL Log

You can create a DRL log using one of the following commands:

  • vxassist
  • vxvol

Using vxassist to Create a DRL Log

When using the vxassist command to create a DRL log, it creates logging subdisks equal to the size of the DRL log.


# vxassist -g dgTestSol2 make drlvol 100m mirror=2 logtype=drl \
loglen=264k logmap_len=2048

If neither logmap_len nor loglen is specified, then:

  • loglen is set to a default value based on disk group alignment.
  • maplen is set to a reasonable value.

If only loglen is specified, then:

  • For pre-version 110 disk groups, maplen is set to zero.
  • For version 110 and greater disk groups, maplen set to use all the bytes available in on-disk map.

If only logmap_len is specified (this applies only to disk groups with a version of 110 or greater), maplen must be less than number of available bytes in on-disk map for the default log length.

Using vxvol to Set a DRL Map Length

You can use vxvol only if the volume is stopped (that is, the DRL is inactive).


vxvol -g dgTestSol2 set logmap_len=512 drlvol

The vxvol set command does not change the existing DRL map size.


Note   Note    When specifying a loglen attribute, specifying a value less than the minimum required (twice the disk group alignment value) results in an error message.

The value of loglen is constrained by size of the logging subdisk.

The value of logmap_len is constrained by the log length.

If both logmap_len and loglen are specified, then, if logmap_len is greater than loglen/2, vxvol fails with an error message, and you then have to either increase loglen to a sufficiently large value or decrease logmap_len to a sufficiently small value.

The value of logmap_len is in units of bytes, and the value of loglen is in units of blocks. logmap_len cannot exceed the number of bytes in the on-disk map. The number of bytes in the on-disk map can be calculated as follows:


[ROUND_DOWN(loglen/nmaps) - VOLDRL_HEADER_SIZE]

where nmaps is 2 for a private disk group or 33 for a shared disk group, ROUND_DOWN() represents rounding down to a log map alignment boundary, and the value of VOLDRL_HEADER_SIZE is 24.

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation Guides  
Manual: Storage Foundation 4.1 Cross-Platform Data Sharing Administrator's Guide  
VERITAS Software Corporation
www.veritas.com