Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

5.9.3. Configuring shared storage

If you are using shared storage, export the instance directory for the Compute service to the two nodes, and ensure that the nodes have access. The directory path is set in the state_path and instances_path parameters in your Compute environment file. This procedure uses the default value, which is /var/lib/nova/instances. Only users with root access can set up shared storage. The Compute service user in the following procedure must be the same across Controller and Compute nodes.


  1. Perform the following steps on the Controller node:

    1. Ensure that the /var/lib/nova/instances directory has read-write access by the Compute service user, as shown in the following example:

      drwxr-xr-x.  9 nova nova 4096 Nov  5 20:37 instances
    2. Add the following lines to the /etc/exports file:

      /var/lib/nova/instances node1_IP(rw,sync,fsid=0,no_root_squash)
      /var/lib/nova/instances node2_IP(rw,sync,fsid=0,no_root_squash)

      Replace node1_IP and node2_IP for the IP addresses of the two Compute nodes, for example:

    3. Export the /var/lib/nova/instances directory to the Compute nodes:

      # exportfs -avr
    4. Restart the NFS server:

      # systemctl restart nfs-server
  2. Perform the following steps on each Compute node:

    1. Ensure that the /var/lib/nova/instances directory exists locally.
    2. Add the following line to the /etc/fstab file:

      NFS_SHARE_PATH:/var/lib/nova/instances /var/lib/nova/instances nfs4 defaults 0 0
    3. Mount the controller’s instance directory to mount all the devices listed in /etc/fstab:

      # mount -a -v
    4. Ensure that QEMU can access the directory’s images:

      # ls -ld /var/lib/nova/instances
      drwxr-xr-x. 9 nova nova 4096 Nov  5 20:37 /var/lib/nova/instances
    5. Ensure that the node can see the instances directory with:

      drwxr-xr-x. 9 nova nova 4096 Nov  5 20:37 /var/lib/nova/instances

You can also run the following to view all mounted devices:

# df -k