# Shared vDisks for Virtualized Application Clusters

Virtual disks created on HVM cluster HPE Clustered datastores (formerly referred to as GFS2 datastores), may be shared across multiple VMs. Shareable disks are created alongside the first VM provisioned to use the disk. Subsequently, additional VMs can attach the sharable disk at provision time or pre-existing VMs could be reconfigured to attach the shared disk. Shareable disks, once created, continue to exist even after being detached from all VMs.

IMPORTANT

Shared disks are excluded from snapshots

Pre-Requisites

Creating sharable disks at VM provision time requires the following:

- Present shared storage to all HVM Hosts
- HVM cluster with GFS2 mounted across the hosts
- HVM cluster added to and managed by Morpheus
- In the HVM cluster within Morpheus, add the "HPE Clustered Datastore (Shared LUN)" and set the correct block device. This datastore type was formerly referred to as a GFS2 datastore

Creating a Shareable vDisk

1. Navigate to Provisioning > Instances
2. Click + Add
3. Within the Create Instance modal, select the Instance Type "HVM"
4. Click Next
5. Provide a Name, Group, and Cloud configuration for the Instance. Ensure the Group and Cloud selected contains the relevant HVM Cluster you wish to work with
6. Click Next
7. On the Configure tab of the modal, storage configurations are made within the VOLUMES section. Set the desired configuration for the VM root disk and then add at least one more disk to create one that is shareable. To add the second disk, click the small plus button (+) out to the right of the root disk configuration. A new disk configuration will appear. Set the size and then select a pre-configured HPE Clustered Datastore (formerly referred to as a GFS2 datastore). Next, click the small dropdown arrow to the right of the selected datastore. Within this small flyout menu, select Storage Type: Raw. A new SHARED VOLUME configuration appears. Within this configuration, select "Create." Other configurations may be required (network, plan, image, etc) to create a valid Instance depending on the environment
8. Click Next until the final tab of the modal where clicking Complete will begin the provisioning process

![Creating a new shared vdisk](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-D4A5D577-9C5D-40DB-BA62-74EF9C928065-high.png)

Once the new Instance is provisioned, a sharable disk is created and attached to the Instance. In the future, when this process is repeated, this shared volume could be attached to future Instances rather than creating a new shared volume. Additionally, existing Instances could be reconfigured to have the sharable disk attached. The shared disk will persist even after the last VM is deleted or reconfigured to remove the shared disk. Shared disks must be removed from the Infrastructure > Storage section of the UI to be fully removed.

Attaching an Existing Shareable Disk

To attach an existing shareable to a new Instance at provision time, follow the steps above to create a new shared disk. At the point where the SHARED VOLUME configuration is set, select "Attach Existing" rather than "Create." This will cause a new configuration field to appear which is a typeahead field where existing shared disks can be searched and selected.

Additionally, shared disks can be added to pre-existing Instances. Navigate to the Instance detail page, reconfigure the Instance, add a new disk, and make similar configurations as described above to enable the option to select an existing shared disk.
