Configure storage

Use a dedicated Azure storage account for node storage.

Use a dedicated Azure storage account for node storage.

When configuring your storage, make sure to use a supported file system. For details, see File system.

Attach disk containers to virtual machines (VMs)

Using your previously created storage account, attach disk containers to your VMs that are appropriate to your needs.

For best performance, combine multiple storage volumes into RAID-0. For most RAID-0 implementations, attach 6 storage disk containers per VM.

Combine disk containers for storage

If you are using RAID, follow these steps to create a RAID-0 drive on your VMs. The following example shows how you can create a RAID-0 volume named md10 from 6 individual volumes named:

  • sdc

  • sdd

  • sde

  • sdf

  • sdg

  • sdh

  1. Form a RAID-0 volume using the mdadm utility:

    $ mdadm --create /dev/md10 --level 0 --raid-devices=6 \
      /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
  2. Format the file system to be one that Vertica supports:

    $ mkfs.ext4 /dev/md10
  3. Find the UUID on the newly-formed RAID volume using the blkid command. In the output, look for the device you assigned to the RAID volume:

    $ blkid
     . . .
     /dev/md10 : UUID="e7510a6f-2922-4413-b5fa-9dcd725967fd" TYPE="ext4" PARTUUID="fb9b7449-08c3-4231-9ee5-086f7b0c9001"
     . . .
  4. The RAID device can be renamed after a reboot. To ensure the filesystem is mounted in a predictable location on your VM, create a directory to use as the mount point to mount the filesystem. For example, you can choose to create a mount point named /data that you will use to store your database's catalog and data (or depot, if you are running Vertica in Eon Mode).

    $ mkdir /data
  5. Using a text editor, add an entry to the /etc/fstab file for the UUID of the filesystem and your mount point so it is mounted when the system boots:

    UUID=RAID_UUID mountpoint      ext4    defaults,nofail,nobarrier    0   2

    For example, if you have the UUID shown in the previous example and the mount point /data, add the following line to the /etc/fstab file:

    UUID=e7510a6f-2922-4413-b5fa-9dcd725967fd  /data      ext4    defaults,nofail,nobarrier    0   2
  6. Mount the RAID filesystem you added to the fstab file. For example, to mount a mount point named /data use the command:

    $ mount /data
  7. Create folders for your Vertica data and catalog under your mount point.

    $ mkdir /data/vertica
    $ mkdir /data/vertica/data

    If you are planning to run Vertica in Eon Mode, create a directory for the depot instead of data:

    $ mkdir /data/vertica/depot

Create a swap file

In addition to storage volumes to store your data, Vertica requires a swap volume or swap file to operate.

Create a swap file or swap volume of at least 2 GB. The following steps show how to create a swap file within Vertica on Azure:

  1. Install devnull and swapfile:

    $ install -o root -g root -m 0600 /dev/null /swapfile
  2. Create the swap file:

    $ dd if=/dev/zero of=/swapfile bs=1024 count=2048k
  3. Prepare the swap file using mkswap:

    $ mkswap /swapfile
  4. Use swapon to instruct Linux to swap on the swap file:

    $ swapon /swapfile
  5. Persist the swapfile in FSTAB:

    $ echo "/swapfile       swap    swap    auto      0       0" >> /etc/fstab

Repeat the volume attachment, combination, and swap file creation procedures for each VM in your cluster.

For more information