Veritas Storage Foundation™ Portable Data Containers: Cross-Platform Data Sharing 5.0.1 Administrator's Guide HP-UX 11i v3 HP Part Number: 5900-0083 Published: November 2009 Edition: 1.
© Copyright 2009 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Contents Technical Support ............................................................................................... 4 Chapter 1 Overview of CDS .................................................................. 11 General concepts ......................................................................... Shared data across platforms ................................................... Disk drive sector size .............................................................. Block size issues .............
8 Contents Chapter 3 Maintaining your system ................................................... 31 Disk tasks ................................................................................... Changing the default disk format .............................................. Restoring CDS disk labels ........................................................ Disk group tasks ..........................................................................
Contents Checking that the metadata limits are not exceeded ..................... Maintaining the list of target operating systems .......................... Enforcing the established CDS limits on a file system ................... Ignoring the established CDS limits on a file system ..................... Validating the operating system targets for a file system ............... Displaying the CDS status of a file system ................................... Migrating a file system one time ..................
10 Contents
Chapter 1 Overview of CDS This chapter includes the following topics: ■ General concepts ■ CDS disk access and format ■ Non-CDS disk groups ■ Disk group alignment General concepts This section presents an overview of the Cross-Platform Data Sharing (CDS) feature of Symantec’s Veritas Storage Foundation™ software. CDS provides you with a foundation for moving data between different systems within a heterogeneous environment.
12 Overview of CDS General concepts Operating system Device level. CDS is a license-enabled feature that is supported at the disk group level by VxVM and at the file system level by VxFS. CDS utilizes a new disk type (auto:cdsdisk). To effect data sharing, VxVM supports a new disk group attribute (cds) and also supports different OS block sizes. Note: CDS allows data volumes and their contents to be easily migrated between heterogeneous systems.
Overview of CDS CDS disk access and format of storage on the drive, and are the units in which the device performs I/O. The sector size is significant because it defines the atomic I/O size at the device level. Any multi-sector writes which VxVM submits to the device driver are not guaranteed to be atomic (by the SCSI subsystem) in the case of system failure. Block size issues The block size is a platform-dependent value that is greater than or equal to the sector size.
14 Overview of CDS CDS disk access and format ■ Only one volume manager (such as VxVM) can manage a physical disk (LUN) ■ There can be no disk partition (slice) which is defined, but which is not configured on the disk ■ Cannot contain a volume whose use-type is either root or swap (for example, it cannot be a boot disk) The CDS conversion utility, vxcdsconvert, is provided to convert non-CDS VM disk formats to CDS disks, and disk groups with a version number less than 110 to disk groups that suppor
Overview of CDS CDS disk access and format Note: With other (non-CDS) VxVM disk formats, the private and public regions are aligned to the platform-specific OS block size. Disk access type auto The disk access (DA) disk type auto supports multiple disk formats, including cdsdisk, which is supported across all platforms. It is associated with the DA records created by the VxVM auto-configuration mode. Disk type auto automatically determines which format is on the disk.
16 Overview of CDS CDS disk access and format See “Converting non-CDS disks to CDS disks” on page 24. All VxVM objects in a CDS disk group are aligned and sized so that any system can access the object using its own representation of an I/O block. The CDS disk group uses a platform-independent alignment value to support system block sizes of up to 8K. See “Disk group alignment” on page 17.
Overview of CDS Non-CDS disk groups Minor device numbers Importing a disk group will fail if it will exceed the maximum devices for that platform. Note: There is a large disparity between the maximum number of devices allowed for devices on the Linux platform with a pre-2.6 kernel, and that for other supported platforms. Non-CDS disk groups Any version 110 (or greater) disk group (DG) can contain both CDS and non-CDS disks.
18 Overview of CDS Disk group alignment Alignment values The disk group block alignment has two values: 1 block or 8k (8 kilobytes). All CDS disk groups must have an alignment value of 8k. All disk group versions before version 110 have an alignment value of 1 block, and they retain this value if they are upgraded to version 110 or later. A disk group that is not a CDS disk group, and which has a version of 110 and later, can have an alignment value of either 1 block or 8k.
Overview of CDS Disk group alignment Note: The map layout within a Data Change Object (DCO) volume changed with the release of VxVM 4.0 to version 20. This can accommodate both FastResync and DRL maps within the DCO volume. The original version 0 layout for DCO volumes only accommodates FastResync maps. Object alignment during volume creation For CDS disk groups, VxVM objects that are used in volume creation are automatically aligned to 8K.
20 Overview of CDS Disk group alignment
Chapter 2 Setting up your system This chapter includes the following topics: ■ Creating CDS disks from uninitialized disks ■ Creating CDS disks from initialized VxVM disks ■ Creating CDS disk groups ■ Converting non-CDS disks to CDS disks ■ Converting a non-CDS disk group to a CDS disk group ■ Verifying licensing ■ Defaults files Creating CDS disks from uninitialized disks You can create a CDS disk from an uninitialized disk by using one of the following methods: ■ Creating CDS disks by usi
22 Setting up your system Creating CDS disks from initialized VxVM disks The format defaults to cdsdisk unless this is overridden by the /etc/default/vxdisk file, or by specifying the disk format as an argument to the format attribute. See “Defaults files” on page 28. See the vxdisksetup(1M) manual page. Creating CDS disks by using vxdiskadm To create a CDS disk by using the vxdiskadm command ■ Run the vxdiskadm command, and select the “Add or initialize one or more disks” item from the main menu.
Setting up your system Creating CDS disk groups 3 Rescan for the disk using this command: # vxdisk scandisks 4 Type this command to set up the disk: # vxdisksetup -i disk Creating a CDS disk from a disk that is already in a disk group To create a CDS disk from a disk that is already in a disk group ■ Run the vxcdsconvert command. See “Converting non-CDS disks to CDS disks” on page 24.
24 Setting up your system Converting non-CDS disks to CDS disks group is a non-CDS disk group, the disk can be initialized as either a CDS disk or a non-CDS disk. If you use the vxdiskadm command to initialize a disk into an existing CDS disk group, the disk must have be added with the cdsdisk format. The CDS attribute for the disk group remains unchanged by this procedure.
Setting up your system Converting a non-CDS disk group to a CDS disk group The conversion involves evacuating objects from the disk, reinitializing the disk, and relocating objects back to disk. You can specify the -o novolstop option to perform the conversion on-line (that is, while access to the disk continues). If the -o novolstop option is not specified, stop any applications that are accessing the disks, and perform the conversion off-line.
26 Setting up your system Converting a non-CDS disk group to a CDS disk group # vxcdsconvert -g diskgroup [-A] [-d defaults_file] \ [-o novolstop] alignment [attribute=value] ... # vxcdsconvert -g diskgroup [-A] [-d defaults_file] \ [-o novolstop] group [attribute=value] ... The alignment and group keywords have the following effect: alignment Specifies alignment conversion where disks are not converted, and an object relayout is performed on the disk group.
Setting up your system Verifying licensing In the following example, the disk group, anodg, and all its disks are converted to CDS while keeping its volumes are still online: # vxcdsconvert -g anodg -o novolstop group \ move_subdisks_ok=yes evac_subdisks_ok=yes \ evac_disk_list=anodg11,anodg12,anodg13,anodg14 The evac_disk_list attrinute specifies a list of disks (nodg11 through anodg14) to which subdisks can be evacuated to disks if required.
28 Setting up your system Defaults files Defaults files The following system defaults files in the /etc/default directory are used to specify the alignment of VxVM objects, the initialization or encapsulation of VM disks, the conversion of LVM disks, and the conversion of disk groups and their disks to the CDS-compatible format vxassist Specifies default values for the following parameters to the vxcdsconvert command that have an effect on the alignment of VxVM objects: dgalign_checking, diskalign, and n
Setting up your system Defaults files vxdisk Specifies default values for the format and privlen parameters to the vxdisk and vxdisksetup commands. These commands are used when disks are initialized by VxVM for the first time.They are also called implicitly by the vxdiskadm command and the Veritas Enterprise Administrator (VEA) GUI. The following is a sample vxdisk defaults file: format=cdsdisk privlen=2048 See the vxdisk(1M) manual page. See the vxdisksetup(1M) manual page.
30 Setting up your system Defaults files
Chapter 3 Maintaining your system This chapter includes the following topics: ■ Disk tasks ■ Disk group tasks ■ Displaying information ■ Default activation mode of shared disk groups ■ Additional considerations when importing CDS disk groups Disk tasks The following disk tasks are supported: ■ Changing the default disk format ■ Restoring CDS disk labels Changing the default disk format When disks are put under VxVM control, they are formatted with the default cdsdisk layout.
32 Maintaining your system Disk tasks initialization by modifying the definition of the format attribute in the /etc/default/vxdisk defaults file. To change the default format for disk encapsulation or LVM disk conversion ■ Edit the /etc/default/vxencap defaults file, and change the definition of the format attribute. See “Defaults files” on page 28.
Maintaining your system Disk group tasks ■ Type the following command: # vxdg flush diskgroup This rewrites all labels except sectors 7 and 16. To forcibly rewrite the AIX coexistence label in sector 7 and the HP-UX coexistence label or VxVM ID block in sector 16 ■ Type the following command: # vxdisk -f flush disk_access_name This command rewrites all labels if there exists a valid VxVM ID block that points to a valid private region.
34 Maintaining your system Disk group tasks If you use the vxencap command to perform the encapsulation, the alignment is carried out automatically without a confirmation prompt. To change the alignment of a disk group during disk encapsulation ■ Run the vxdiskadm command, and select the “Add or initialize one or more disks” item from the main menu. As part of the encapsulation process, you are asked to confirm that a reduction of the disk group alignment from 8K to 1 is acceptable.
Maintaining your system Disk group tasks Splitting a CDS disk group You can use the vxdg split command to create a CDS disk group from an existing CDS disk group. The new (target) disk group preserves the setting of the CDS attribuet and alignment in the original (source) disk group. Note: The command to split disk groups is not supported for the Solaris OS on the x64 platform. To split a CDS disk group ■ Use the vxdg split command to split CDS disk groups.
36 Maintaining your system Disk group tasks Joining 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. Note: The command to join disk groups is not supported for the Solaris OS on the x64 platform.
Maintaining your system Disk group tasks Note: You must also perform a disk group conversion (using the vxcdsconvert utility) to use the CDS feature. To upgrade the non-CDS pre-version 110 disk group ■ Type the following vxdg command: # vxdg upgrade diskgroup Replacing a disk in a CDS disk group Note: When replacing a disk in a CDS disk group, you cannot use a non-CDS disk as the replacement.
38 Maintaining your system Disk group tasks Changing the DRL map 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.
Maintaining your system Disk group tasks If neither logmap_len nor loglen is specified ■ If only loglen is specified ■ For pre-version 110 disk groups, maplen is set to zero. ■ For version 110 and greater disk groups, maplen is set to use all the bytes available in the on-disk map. ■ For pre-version 110 disk groups, logmap_len is not applicable. ■ For version 110 and greater disk groups, maplen must be less than the number of available bytes in the on-disk map for the default log length.
40 Maintaining your system Displaying information If logmap_len is specified ■ The value is constrained by size of the log, and cannot exceed the size of the on-disk map.Thesize of the on-disk map in blocks can be calculated from the following formula: round(loglen/nmaps) - 24 where nmaps is 2 for a private disk group, or 33 for a shared disk group. ■ The value of logmap_len cannot exceed the number of bytes in the on-disk map.
Maintaining your system Displaying information # vxdg list dgTestSol2 Group: dgid: import-id: flags: version: alignment: . . . dgTestSol2 1063238039.206.vmesc1 1024.205 cds 110 8192 (bytes) # vxprint -F %cds -G -g dgTestSol2 on The disk group, dgTestSol2, is shown as having the CDS flag set.
42 Maintaining your system Displaying information Utilities such as vxprint and vxdg list that print information about disk group records also output the disk group alignment.
Maintaining your system Default activation mode of shared disk groups Displaying offset and length information in units of 512 bytes To display offset and length information in units of 512 bytes ■ Specify the -b option to the vxprint and vxdisk commands, as shown in these examples: # vxprint -bm # vxdisk -b list Specifying the -b option enables consistent output to be obtained on different platforms. Without the -b option, the information is output in units of sectors.
44 Maintaining your system Additional considerations when importing CDS disk groups Does the target system know about the disks? For example, the disks may not have been connected to the system either physically (not cabled) or logically (using FC zoning or LUN masking) when the system was booted up, but they have subsequently been connected without rebooting the system. This can happen when bringing new storage on-line, or when adding an additional DMP path to existing storage.
Chapter 4 File system considerations This chapter includes the following topics: ■ Considerations about data in the file system ■ File system migration ■ Specifying the migration target ■ Using the fscdsadm command ■ Migrating a file system one time ■ Migrating a file system on an ongoing basis ■ When to convert a file system ■ Converting the byte order of a file system Considerations about data in the file system Data within a file system might not be in the appropriate format to be acces
46 File system considerations File system migration Note that the CDS facilities do not convert the end user data. The data is uninterpreted by the file system. Only individual applications have knowledge of the data formats, and thus those applications and end users must deal with this issue. This issue is not CDS-specific, but is true whenever data is moved between different types of systems.
File system considerations Specifying the migration target os_name=name[,os_rel=release][,arch=arch_name] [,vxfs_version=version][bits=nbits] The CDS commands require the following target specifiers: os_name=name Specifies the name of the target operating system to which the file system is planned to be migrated. Possible values are HP-UX, AIX, SunOS, or Linux. The os_name field must be specified if the target is specified. os_rel=release Specifies the operating system release version of the target.
48 File system considerations Using the fscdsadm command os_name=HP-UX, os_rel=11.23, arch=pa, vxfs_version=5.0, bits=64 Specifies the operating system, operating system release version, architecture, VxFS version, and kernel bits of the target. os_name=HP-UX, arch=ia Specifies the operating system and architecture of the target. os_name=HP-UX, bits=64 Specifies the operating system and kernel bits of the target.
File system considerations Using the fscdsadm command Adding an entry to the list of target operating systems To add an entry to the list of target operating systems ■ Type the following command: # fscdsadm -o add -t target mount_point See “Specifying the migration target” on page 46.
50 File system considerations Migrating a file system one time Ignoring the established CDS limits on a file system By default, CDS ignores the limits that are implied by the operating system targets that are listed in the target_list file.
File system considerations Migrating a file system on an ongoing basis To perform a one-time migration 1 If the underlying Volume Manager storage is not contained in a CDS disk group, it must first be upgraded to be a CDS disk group, and all other physical considerations related to migrating the storage physically between systems must first be addressed. See “Converting a non-CDS disk group to a CDS disk group” on page 25.
52 File system considerations Migrating a file system on an ongoing basis To perform an ongoing migration 1 Use the following command to ensure that there are no files in the file system that will be inaccessible after migrating the data due to large file size or to differences in user or group ID between platforms: # fscdsadm -v -t target mount_point If such files exist, move the files to another file system or reduce the size of the files.
File system considerations When to convert a file system Stopping ongoing migration To stop performing ongoing migration ◆ Type the following commands: # fscdsadm -l ignore mount_point # fscdsadm -o none mount_point The file system is left on the current system. When to convert a file system When moving a file system between two systems, it is essential to run the fscdsconv command to perform all of the file system migration tasks.
54 File system considerations Converting the byte order of a file system To convert the byte order of a file system 1 Determine the disk layout version of the file system that you will migrate: # fstyp -v /dev/vx/dsk/filesystem | grep version magic a501fcf5 version 7 ctime Thu Jun 1 16:16:53 2006 Only file systems with Version 6 or later disk layout can be converted. If the file system has an earlier disk layout version, convert the file system to Version 6 or Version 7 disk layout before proceeding.
File system considerations Converting the byte order of a file system 5 Use the fscdsconv command to export the file system to the required target: # fscdsconv -f recovery_file -t target -e special_device target specifies the system to which you are migrating the file system. See “Specifying the migration target” on page 46. recovery_file is the name of the recovery file to be created by the fscdsconv command. special_device is the raw device or volume that contains the file system to be converted.
56 File system considerations Converting the byte order of a file system 8 If the byte order of the file system must be converted to migrate the file system to the specified target, fscdsconv prompts you to confirm the migration. Enter y to convert the byte order of the file system. If the byte order does not need to be converted, a message displays indicating this fact.
File system considerations Converting the byte order of a file system Importing and mounting a file system from another system The fscdsconv command can be used to import and mount a file system that was previously used on another system. To import and mount a file system from another system ◆ Convert the file system: # fscdsconv -f recovery_file -i special_device If the byte order of the file system needs to be converted Enter y to convert the byte order of the file system when prompted by fscdsconv.
58 File system considerations Converting the byte order of a file system
Appendix A Transferring data between platforms This appendix includes the following topics: ■ Alignment value and block size ■ Default activation mode of shared disk groups ■ Disk group alignment and encapsulated disks ■ Disk group import between Linux and non-Linux machines ■ Moving disk groups between HP-UX and Linux systems ■ Migrating a snapshot volume Alignment value and block size On the AIX, Linux and Solaris operating systems, an alignment value of 1 is equivalent to a block size of 51
60 Transferring data between platforms Disk group alignment and encapsulated disks HP-UX, importing a shared disk group will result in the volumes being active and enabled for shared-write. In the case of HP-UX, the shared volumes will be inactive and require other actions to activate them for shared-write operations. Disk group alignment and encapsulated disks On the Solaris OS, all native file systems are cylinder aligned. Encapsulating such a disk results in subdisks that are also cylinder aligned.
Transferring data between platforms Moving disk groups between HP-UX and Linux systems Moving disk groups between HP-UX and Linux systems A disk group created on an HP-UX system typically has device numbers greater than 1000. When that disk group is imported on a Linux machine with a pre-2.6 kernel, the devices are reassigned minor numbers less than 256. If a disk group on a Linux system is imported to an HP-UX system, all device numbers will be less than 256.
62 Transferring data between platforms Migrating a snapshot volume 3 Refresh the plexes of the snapshot volume using the following command: # vxsnap -g datadg refresh snapvol source=yes syncing=yes 4 The applications can now be unquiesced. If you temporarily suspended updates to the volume by a database in 2, release all the tables from hot backup mode.
Transferring data between platforms Migrating a snapshot volume 12 Use the following commands to recover and restart the snapshot volume: # vxrecover -g migdg -m snapvol # vxvol -g migdg start snapvol 13 Check the integrity of the file system, and then mount it on a suitable mount point: # fsck -t vxfs /dev/vx/dsk/migdg/snapvol # mount -t vxfs /dev/vx/dsk/migdg/snapvol /mnt 63
64 Transferring data between platforms Migrating a snapshot volume
Appendix B Recovering from CDS errors This appendix includes the following topics: ■ CDS error codes and recovery actions CDS error codes and recovery actions Table B-1 lists the CDS error codes and the action that is required. Table B-1 Error codes and required actions Error number Message Action 329 Cannot join a non-CDS disk group Change the non-CDS disk group and a CDS disk group into a CDS disk group (or vice versa), then retry the join operation.
66 Recovering from CDS errors CDS error codes and recovery actions Table B-1 Error codes and required actions (continued) Error number Message Action 333 Non-CDS disk cannot be placed in Do one of the following: a CDS disk group ■ Add the disk to another disk group that is a non-CDS disk group. ■ Re-initialize the disk as a CDS disk so that it can be added to the CDS disk group. ■ Change the CDS disk group into a non-CDS disk group and then add the disk.
Recovering from CDS errors CDS error codes and recovery actions Table B-1 Error codes and required actions (continued) Error number Message Action 341 Too many device nodes in disk group Increase the number of device nodes allowed in the disk group, if not already at the maximum. Otherwise, you need to remove volumes from the disk group, possibly by splitting the disk group.
68 Recovering from CDS errors CDS error codes and recovery actions
Glossary AIX coexistence label Data on disk which identifies the disk to the AIX volume manager (LVM) as being controlled by VxVM. The contents has no relation to VxVM ID Blocks. back-rev disk group A disk group created using a version of VxVM released prior to the release of CDS. Adding CDS functionality rolls over to the latest disk group version number; see also current-rev disk group.
70 Glossary DCO volume A special volume that is used to hold Persistent FastResync change maps, and dirty region logs. The map layout within the DCO volume changed with the release of VxVM 4.0, although the original format is still available. The old layout is available in DCO Version 0 objects, and the new layout is available in DCO Version 20 objects. device name The physical disk device name (or disk access name). dirty region logging See DRL.
Glossary object group A group of objects of the same type. Each object group has a group icon and a group name. In VxVM, object groups include disk groups, disks, volumes, controllers, free disk pool disks, uninitialized disks, and file systems. object tree A dynamic hierarchical display of Veritas Volume Manager objects and other objects on the system. Each node in the tree represents a group of objects of the same type.
72 Glossary
Index Symbols /etc/default/vxassist defaults file 28 /etc/default/vxcdsconvert defaults file 28 /etc/default/vxdg defaults file 28 /etc/default/vxdisk defaults file 29 /etc/default/vxencap defaults file 29 /etc/vx/darecs file 22 A access type 15 activation default 41 AIX coexistence label 15 alignment 17 changing 34 attribute CDS 40 auto disk type 15 B block size 13 blockdev --rereadpt 44 C CDS attribute 40 changing setting 36 creating DGs 23 creating disks 22 disk group alignment 13 disk group device q
74 Index disk quotas setting 37 disk types 14 disks effects of formatting or partitioning 43 displaying device quotas 41 displaying disk group alignment 41 displaying DRL log size 41 displaying DRL map size 41 displaying log map values 41 displaying log size 41 displaying v_logmap values 41–42 displaying volume log map values 41 DRL log size displaying 41 setting 38 DRL logs creating 38 DRL map length 39 DRL map size displaying 41 setting 38 LVM disks 31 E recovery file, cross-platform data sharing 54
Index vxdisk scandisks 44 vxdiskadm 22–23 vxdisksetup 21 VxVM devices 12 vxvol 39 75