Create Vertica Volumes in MapR Filesystem

Each Vertica node is configured with two MapR volumes for Vertica data and temp space. Create these Vertica volumes as a MapR administrative user, typically, the user mapr.
Warning: In this configuration, the data space will host both the data and catalog for Vertica.
  1. On any MapR node, create a volume for Vertica, and give full control to the dbadmin user.
    This guide uses a mount point of /vertica both in the Hadoop filesystem namespace and the Linux filesystem namespace for the NFS mount:
    maprcli volume create -­name vertica -­path /vertica 
    maprcli acl edit -­type volume ­-name vertica -­user dbadmin:fc 
  2. Create an individual volume, one per node, where Vertica will run.

    This step results in a separate volume for Vertica temp space. This volume uses a replication factor of 1 to reduce network traffic. In addition, for the Vertica data volume, the replication factor is set to 2 which increases high availability. The MapR default replication factor is typically set to 3.

    Since Vertica also provides redundancy through the use of their K–Safety protection, the replication factor is set to a lower level. The built in Vertica protection provides complete database node redundancy, which includes the storage provided for that node. MapR Filesystem only protects against disk failure.

    1. Specify the localvolumehost option so that MapR keeps a local replica of all file data on the host. Doing so provides data locality for Vertica data access.
    2. Use vertica.<hostname>.data as a naming convention for the MapR volumes that will store the data and the catalog.
    3. Use vertica.<hostname>.tmp as a naming convention for the MapR volumes storing the temp data.
    4. For each node, give full control of its volumes to the dbadmin user.
    5. The following script performs all of the above actions:
      MAPR_HOSTNAMES=`maprcli node list ­-columns hostname -­noheader | awk '{print $1}'`
      # create the data volume
      maprcli volume create ­-name vertica.$ -­path /vertica/$MAPR_HOSTNAME/data 
      -­createparent true -­localvolumehost $MAPR_HOSTNAME ­-replication 2
      # create the temp volume
      maprcli volume create -­name vertica.$MAPR_HOSTNAME.tmp -path /vertica/$MAPR_HOSTNAME/tmp
      ­-createparent true -­localvolumehost $MAPR_HOSTNAME ­-replication 1
      # set permissions on the data volume
      maprcli acl edit -­type volume -­name vertica.$ ­-user dbadmin:fc
      maprcli acl edit -­type volume -­name vertica.$MAPR_HOSTNAME.tmp -­user dbadmin:fc
      # disable MapR compression
      hadoop mfs -­setcompression off /vertica/$MAPR_HOSTNAME/data
      hadoop mfs ­-setcompression off /vertica/$MAPR_HOSTNAME/tmp
  3. From any MapR node, recursively set ownership to the Vertica administrative user and group.
    hadoop fs ­-chown ­-R dbadmin:verticadba /vertica