Veritas Storage Foundation Cross-Platform Data Sharing 5.
Legal Notices © Copyright 2008 Hewlett-Packard Development Company, L.P. Publication Date: 2008 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 Chapter 1 Overview of CDS General concepts .................................................................................................... 9 Shared data across platforms ....................................................................10 Disk drive sector size ...................................................................................10 Block size issues ...........................................................................................11 Operating system data ............
6 Contents Changing the alignment of a non-CDS disk group ................................. 29 Splitting a CDS disk group ......................................................................... 30 Moving objects between CDS disk groups and non-CDS disk groups .. 30 Moving objects between CDS disk groups ................................................ 31 Joining disk groups ......................................................................................
Contents Alignment value and block size .........................................................................53 Default activation mode of shared disk groups ..............................................53 Moving disk groups between HP-UX and Linux systems ..............................54 Migrating a snapshot volume ............................................................................
8 Contents
Chapter 1 Overview of CDS General concepts CDS provides you with a foundation for moving data between different systems within a heterogeneous environment. The machines may be running HP-UX, AIX, Linux or the SolarisTM operating system (OS), and they may all have direct access to physical devices holding data. CDS allows Symantec’s Veritas products and applications to access data storage independently of the operating system platform, enabling them to work transparently in heterogeneous environments.
10 Overview of CDS General concepts Shared data across platforms While volumes can be exported across platforms, the data on the volumes can be shared only if data sharing is supported at the application level. That is, to make data sharing across platforms possible, it must be supported throughout the entire software stack.
Overview of CDS CDS disk access and format Block size issues The block size is a platform-dependent value that is greater than or equal to the sector size. Each platform accesses the disk on block boundaries and in quantities that are multiples of the block size.
12 Overview of CDS CDS disk access and format ■ 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 support CDS disks. See “Converting non-CDS disks to CDS disks” on page 22. CDS disk types The CDS disk format, cdsdisk, is recognized by all VxVM platforms (including Windows).
Overview of CDS CDS disk access and format records created by the VxVM auto-configuration mode. Disk type auto automatically determines which format is on the disk. Platform block The platform block resides on disk sector 0, and contains data specific to the operating system for the platforms. It is necessary for proper interaction with each of those platforms. The platform block allows a disk to perform as if it was initialized by each of the specific platforms.
14 Overview of CDS CDS disk access and format CDS disk groups can be used in the following ways: ■ Initialized on one system and then used “as-is” by VxVM on a system employing a different type of platform. ■ Imported (in a serial fashion) by Linux, Solaris, AIX, and HP-UX systems. ■ Imported as private disk groups, shared disk groups (by CVM), or distributed disk groups (by a volume server).
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.
16 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.
18 Overview of CDS Disk group alignment
Chapter 2 Setting up your system 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 using vxdisksetup ■ Creating CDS disks by using vxdiskadm Creating CDS disks by using vxdisksetup To create a CDS disk by using the vxdisksetup command ◆ Type the following command: # vxdisksetup -i disk [format=disk_format] The format defaults to cdsdisk unless this is overridden by the /etc/default/vxdisk fi
20 Setting up your system Creating CDS disks from initialized VxVM disks Warning: On CDS disks, the CDS information occupies the first sector of that disk, and there is no fdisk partition information. Attempting to create an fdisk partition (for example, by using the fdisk or format commands) erases the CDS information, and can cause data corruption..
Setting up your system Creating CDS disk groups ■ Creating a CDS disk group by using vxdg init ■ Creating a CDS disk group by using vxdiskadm Creating a CDS disk group by using vxdg init To create a CDS disk group by using the vxdg init command Note: The disk group version must be 110 or greater.
22 Setting up your system Converting non-CDS disks to CDS disks Converting non-CDS disks to CDS disks To convert non-CDS disks to CDS disks Note: The disks must be of type of auto in order to be re-initialized as CDS disks. 1 If the conversion is not going to performed on-line (that is, while access to the disk group continues), stop any applications that are accessing the disks. 2 Type one of the following forms of the CDS conversion utility (vxcdsconvert) to convert non-CDS disks to CDS disks.
Setting up your system Converting a non-CDS disk group to a CDS disk group See the vxcdsconvert(1M) manual page. Converting a non-CDS disk group to a CDS disk group To convert a non-CDS disk group to a CDS disk group 1 If the disk group contains one or more disks that you do not want to convert to CDS disks, use the vxdg move or vxdg split command to move the disks out of the disk group. 2 The disk group to be converted must have the following characteristics: ■ No dissociated or disabled objects.
24 Setting up your system Converting a non-CDS disk group to a CDS disk group 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. A successful completion results in an 8K-aligned disk group. You might consider this option, rather than converting the entire disk group, if you want to reduce the amount of work to be done for a later full conversion to CDS disk group.
Setting up your system Defaults files ■ Stopped, but startable, volumes are started for the duration of the conversion. ■ Any volumes or other objects in the disk group that were created with the layout=diskalign attribute specified can no longer be disk aligned. ■ Encapsulated disks may lose the ability to be unencapsulated. ■ Performance may be degraded because data may have migrated to different regions of a disk, or to different disks.
26 Setting up your system Defaults files vxdg Specifies default values for the cds, default_activation_mode and enable_activation parameters to the vxdg command. The default_activation_mode and enable_activation parameters are only used with shared disk groups in a cluster. The following is a sample vxdg defaults file: cds=on See the vxdg(1M) manual page. vxdisk Specifies default values for the format and privlen parameters to the vxdisk and vxdisksetup commands.
Chapter 3 Maintaining your system 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.
28 Maintaining your system Disk tasks ■ AIX coexistence label ■ HP-UX coexistence or VxVM ID block There are also backup copies of each. If any of the primary labels become corrupted, VxVM will not bring the disk online and user intervention is required. If two labels are intact, the disk is still recognized as a cdsdisk (though in the error state) and vxdisk flush can be used to restore the CDS disk labels from their backup copies.
Maintaining your system Disk group tasks 7 and 16 when a disk is taken offline due to label corruption (possibly by a Windows system on the same fabric).
30 Maintaining your system Disk group tasks 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 of a disk group, use the vxprint command. See “Displaying the disk group alignment” on page 36.
Maintaining your system Disk group tasks To move objects between a CDS disk group and a non-CDS disk group ◆ Use the vxdg move command to move objects between a CDS disk group and a non-CDS disk groups. See the Veritas Volume Manager Adminstrator’s Guide. Moving objects between CDS disk groups The disk group alignment does not change as a result of moving objects between CDS disk groups. To move objects between CDS disk groups ◆ Use the vxdg move command to move objects between CDS disk groups.
32 Maintaining your system Disk group tasks Upgrading an older version non-CDS disk group You may want to upgrade a non-CDS disk group with a version lower than 110 in order to use new features othe rthan CDS. After upgrading the disk group, the cds attribute is set to off, and the disk group has an alignment of 1. Note: You must also perform a disk group conversion (using the vxcdsconvert utility) to use the CDS feature.
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.
34 Maintaining your system Disk group tasks Note the following restrictions : If neither logmap_len nor loglen is specified If only loglen is specified ■ loglen is set to a default value that is based on disk group alignment. ■ maplen is set to a reasonable value. ■ 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.
Maintaining your system Displaying information If logmap_len is specified If loglen 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.
36 Maintaining your system Displaying information ... # vxprint -F %cds -G -g dgTestSol2 on The disk group, dgTestSol2, is shown as having the CDS flag set.
Maintaining your system Default activation mode of shared disk groups # vxprint -lv drlvol Disk group: dgTestSol Volume: drlvol info: len=20480 type: usetype=fsgen state: state=ACTIVE kernel=ENABLED cdsrecovery=0/0 (clean) assoc: plexes=drlvol-01,drlvol-02,drlvol-03 policies: read=SELECT (round-robin) exceptions=GEN_DET_SPARSE flags: closed writecopy writeback logging: type=REGION loglen=528 serial=0/0 mapalign=16 maplen=512 (enabled) apprecov: seqno=0/0 recovery: mode=default recov_id=0 device: minor=4600
38 Maintaining your system Additional considerations when importing CDS disk groups Additional considerations when importing CDS disk groups Before you attempt to use CDS to move disk groups between different operating systems, and if the configuration of the disks has changed since the target system was last rebooted, you should consider the following points : 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 l
Maintaining your system Additional considerations when importing CDS disk groups Has the format of any of the disks For example, if you use the vxdisksetup -i command to format a disk for VxVM on one system, changed since the target system the vxdisk list command on the target system may was last booted? still show the format as being auto:none.
40 Maintaining your system Additional considerations when importing CDS disk groups
Chapter 4 File system data sharing Considerations about data in the file system Data within a file system might not be in the appropriate format to be accessed if moved between different types of systems. For example, files stored in proprietary binary formats often require conversion for use on the target platform. Files containing databases might not be in a standard format that allows their access when moving a file system between various systems, even if those systems use the same byte order.
42 File system data sharing File system migration only accessible or understood by software running on PCs and the file server is UNIX or Linux-based. File system migration File system migration refers to the system management operations related to stopping access to a file system, and then restarting these operations to access the file system from a different computer system.
File system data sharing Specifying the migration target While os_name must be specified for all fscdsadm invocations that permit the target to be specified, all other target specifiers are optional and are available for the user to fine tune the migration target specification. The CDS commands use the limits information available in the default CDS limits file, /etc/vx/cdslimitstab.
44 File system data sharing Using the fscdsadm command Using the fscdsadm command The fscdsadm command can be used to perform the following CDS tasks: ■ 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 Checking that the metadata l
File system data sharing Using the fscdsadm command Removing an entry from the list of target operating systems To remove an entry from the list of target operating systems ◆ Type the following command: # fscdsadm -o remove -t target mount_point See “Specifying the migration target” on page 42.
46 File system data sharing Migrating a file system one time Validating the operating system targets for a file system To validate the operating system targets for a file system ◆ Type the following command: # fscdsadm -v mount_point Displaying the CDS status of a file system The CDS status that is maintained for a file system includes the following information: ■ the target_list file ■ the limits implied by the target_list file ■ whether the limits are being enforced or ignored ■ whether all file
File system data sharing Migrating a file system on an ongoing basis If such files exist, move the files to another file system or reduce the size of the files. 4 Unmount the file system: # umount mount_point 5 Use the fscdsconv command to convert the file system to the opposite endian. See “Converting the byte order of a file system” on page 48.
48 File system data sharing When to convert a file system 5 Make the file system suitable for use on the specified target. See “Converting the byte order of a file system” on page 48. 6 Make the physical storage and Volume Manager logical storage accessible on the target system by exporting the disk group from the source system and importing the disk group on the target system after resolving any other physical storage attachment issues. See “Maintaining your system” on page 27.
File system data sharing 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.
50 File system data sharing Converting the byte order of a file system should be located in a directory that is not subject to system or local scripts will remove the file after a system reboot, such as that which occurs with the /tmp and /var/tmp directories on the Solaris operating system. The recovery file is almost always a sparse file.
File system data sharing Converting the byte order of a file system utilities. To recover the file system, invoke the fscdsconv command with the recovery flag, -r: # fscdsconv -r -f recovery_file special_device When the -r flag is specified, fscdsconv expects the recovery file to exist and that the file system being converted is the same file system specified in this second invocation of fscdsconv.
52 File system data sharing Converting the byte order of a file system
Appendix A Transferring data between platforms This appendix contains notes on considerations for data transfer between operating system platforms with different inherent characteristics. 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 512 bytes. On the HP-UX operating system, it is equivalent to a block size of 1024 bytes. The block size on HP-UX is different from that on other supported platforms.
54 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.
Transferring data between platforms Migrating a snapshot volume # 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 step 2, release all the tables from hot backup mode.
56 Transferring data between platforms Migrating a snapshot volume
Appendix B Error codes and error recovery Table B-1 lists the CDS error codes and the action that is required. Table B-1 Error codes and required actions Error Message number Action 329 Cannot join a non-CDS disk group and Change the non-CDS disk group into a a CDS disk group CDS disk group (or vice versa), then retry the join operation. 330 Disk group is for a different platform Import the disk group on the correct platform. It cannot be imported on this platform.
58 Error codes and error recovery Table B-1 Error codes and required actions Error Message number 333 Non-CDS disk cannot be placed in a CDS disk group Action Do one of the following: ■ 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.
Error codes and error recovery Table B-1 Error codes and required actions Error Message number Action 342 Map length too large for current log length Use a smaller map length for the DRL/DCM log, or increase the log length and retry. 343 Volume log map alignment violates disk group alignment Remove the DRL/DCM log, then add it back after changing the alignment of the disk group.
60 Error codes and error recovery
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.
62 Glossary data change object See DCO. DCO (Data Change Object) A VxVM object that is used to manage information about the FastResync maps in the DCO volume. Both a DCO object and a DCO volume must be associated with a volume to implement Persistent FastResync on that volume. 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.
Glossary gap A disk region that does not contain Veritas Volume Manager objects (subdisks). HP-UX coexistence label Data on disk which identifies the disk to the HP volume manager (LVM) as being controlled by VxVM. The contents of this label are identical to the contents of the VxVM ID block. mirror A copy of a volume and its data. There can be several mirrors per volume. The terms mirror and plex are used synonymously. node In the VxVM tree, a node is an element attached to the tree.
64 Glossary volume A virtual disk or entity that is made up of portions of one or more physical disks. VxFS Veritas File System. VxVM Veritas Volume Manager. VxVM ID block Data on disk that indicates the disk is under VxVM control. The VxVM ID Block provides dynamic VxVM private region location, GUID, and other information.
Index Symbols /etc/default/vxassist defaults file 25 /etc/default/vxcdsconvert defaults file 25 /etc/default/vxdg defaults file 26 /etc/default/vxdisk defaults file 26 /etc/default/vxencap defaults file 26 /etc/vx/darecs file 20 A access type 12 activation default 36 AIX coexistence label 13 alignment 15 changing 29 attribute CDS 35 auto disk type 12 B block size 11 C CDS attribute 35 changing setting 31 creating DGs 20 creating disks 20 disk group alignment 11 disk group device quotas 14 disks 11 CDS d
66 Index setting 32 disk types 12 disks effects of formatting or partitioning 38 displaying device quotas 36 displaying disk group alignment 36 displaying DRL log size 36 displaying DRL map size 36 displaying log map values 36 displaying log size 36 displaying v_logmap values 36 displaying volume log map values 36 DRL log size displaying 36 setting 33 DRL logs creating 33 DRL map length 34 DRL map size displaying 36 setting 33 E encapsulation 27 F fscdsadm 44 fscdsconv 48 I I/O block size 11 ID block 13
Index vxdiskadm 19, 21 vxdisksetup 19 VxVM devices 10 vxvol 34 67
68 Index