Setting up VxVM and VxFS for IBM® Db2 Warehouse

If you will be using a multi-node deployment for Db2® Warehouse, you must set up a POSIX-compliant clustered file system, such as Veritas File System (VxFS). To use VxFS, you must configure Veritas Volume Manager (VxVM).

About this task

The following procedure was tested with VxVM 6.0.2.

Procedure

  1. List the disks that VxVM detects by issuing the following command:
    vxdisk -eoalldgs list
    Sample output follows:
    
    DEVICE        TYPE           DISK    GROUP   STATUS           OS_NATIVE_NAME   ATTR 
    staassjc0_0   auto:none      -       -       online invalid   sda              lun          
    staassjc0_1   auto:none      -       -       online invalid   sdc              lun          
    xen-vd0_1     auto:none      -       -       online invalid   xvdb             -            
    xen-vd0_2     auto:none      -       -       online invalid   xvdc             -            
    xvda          auto:none      -       -       online invalid   xvda             -            
    Any disk with a status of online invalid is not under VxVM control.
  2. Initialize the disk that you will use for disk group creation (put the disk under VxVM control):
    1. Issue the vxdisksetup -i command. A sample command follows:
      vxdisksetup -i staassjc0_0
    2. Confirm that the disk is now under VxVM control by issuing the vxdisk -eoalldgs list command. The following sample output shows the status of the staassjc0_0 disk as online, which indicates that the disk is now under VxVM control:
      
      DEVICE        TYPE           DISK    GROUP   STATUS           OS_NATIVE_NAME   ATTR 
      staassjc0_0   auto:cdsdisk   disk01          online           sda              lun         
      staassjc0_1   auto:none      -       -       online invalid   sdc              lun          
      xen-vd0_1     auto:none      -       -       online invalid   xvdb             -            
      xen-vd0_2     auto:none      -       -       online invalid   xvdc             -            
      xvda          auto:none      -       -       online invalid   xvda             -            
  3. Create the disk group:
    1. Issue the vxdg init command, specifying the disk that you initialized in the previous step. The following command creates the mydg group by using the staassjc0_0 disk:
      vxdg init mydg disk01=staassjc0_0 
    2. Confirm that the state of the disk group is enabled, cds by issuing the vxdg list command. Sample output follows:
      
      NAME   STATE         ID
      mydg   enabled,cds   1486362182.16.ibm.com
    3. Confirm that the disk that you initialized is part of the new disk group by issuing the vxdisk -eoalldgs list command. Sample output follows:
      
      DEVICE        TYPE           DISK    GROUP   STATUS           OS_NATIVE_NAME   ATTR 
      staassjc0_0   auto:cdsdisk   disk01  mydg    online           sda              lun         
      staassjc0_1   auto:none      -       -       online invalid   sdc              lun          
      xen-vd0_1     auto:none      -       -       online invalid   xvdb             -            
      xen-vd0_2     auto:none      -       -       online invalid   xvdc             -            
      xvda          auto:none      -       -       online invalid   xvda             - 
  4. Create a volume in the disk group that you created by using the vxassist -g diskgroup make volume size command.
    For example, the following command creates a volume of 50000 MB called myvol in the mydg disk group:
    vxassist -g mydg make myvol 50000m
  5. Create a VxFS file system on the volume that you created and a directory for mounting this volume by issuing the mkfs -t vxfs command.
    An example follows:
    mkfs -t vxfs /dev/vx/rdsk/mydg/myvol
  6. Mount the volume:
    1. Issue the mount -t vxfs command. An example follows:
      mount -t vxfs /dev/vx/dsk/mydg/myvol /mnt/clusterfs   
    2. Confirm that the mount was successful by issuing the df -h command. An example follows:
      
      df -h |grep clusterfs
      
      /dev/vx/dsk/mydg/myvol   49G   82M   46G   1% /mnt/clusterfs

Results

The VxVM volume is now ready to use.