Logical Domains 1.2 Administration Guide

ProcedureExport a Virtual Disk Backend Multiple Times

A virtual disk backend can be exported multiple times either through the same or different virtual disk servers. Each exported instance of the virtual disk backend can then be assigned to either the same or different guest domains.

When a virtual disk backend is exported multiple times, it should not be exported with the exclusive (excl) option. Specifying the excl option will only allow exporting the backend once. The backend can be safely exported multiple times as a read-only device with the ro option.


Caution – Caution –

When a virtual disk backend is exported multiple times, applications running on guest domains and using that virtual disk are responsible for coordinating and synchronizing concurrent write access to ensure data coherency.


The following example describes how to add the same virtual disk to two different guest domains through the same virtual disk service.

  1. Export the virtual disk backend two times from a service domain by using the following commands.


    # ldm add-vdsdev [options={ro,slice}] backend volume1@service-name
    # ldm add-vdsdev -f [options={ro,slice}] backend volume2@service-name
    

    Note that the second ldm add-vdsdev command uses the -f option to force the second export of the backend. Use this option when using the same backend path for both commands and when the virtual disk servers are located on the same service domain.

  2. Assign the exported backend to each guest domain by using the following commands.

    The disk-name can be different for ldom1 and ldom2.


    # ldm add-vdisk [timeout=seconds] disk-name volume1@service-name ldom1
    # ldm add-vdisk [timeout=seconds] disk-name volume2@service-name ldom2