Hi, Lets say I have exported a full physical disk to a guest domain as a virtual disk over VDS.
Now, given the guest device name say c0d2, how will I get to know what is the corresponding back end, (in this case physical device name, say /dev/dsk/c2t4d0s2) ? I found a way to do this. [b](1) In Guest Domain:[/b] --------------------------------------------------------------------------------- bash-3.00# ls -al /dev/dsk/c0d2s2 lrwxrwxrwx 1 root root 62 Dec 2 17:42 /dev/dsk/c0d2s2 ->../../devices/virtual-devices at 100/channel-devices at 200/disk at 2:c Note down the disk name "disk at 2" from "/devices/virtual-devices at 100/channel devices at 200/disk at 2:c" [b](2) In Control Domain:[/b] ---------------------------------------------------------------------------------- (i). Use ldm command to know the volume-name and VDS-name corresponding to the guest dev-name "disk at 2" obtained in step 1. -bash-3.00# ldm list-bindings -p guest1 | egrep -e 'VDISK' VDISK|name=lun444_vdisk|vol=lun444_vol at primaryvds1|dev=disk at 2|server=primary >From the above output: volume-name = lun444_vol VDS-name= primaryvds1 (ii). Use volume name and service names to find the corresponding backend. -bash-3.00# ldm list-bindings -p primary | egrep -e 'VDS|vol' VDS|name=primary-vds1 |vol=lun444_vol|opts=slice|dev=/dev/dsk/c2t0d0s2 |client=lun444_vdisk at guest1|vol=lun444_vol Hence, /dev/dsk/c2t0d0s2 is the backend of guest domain device c0d2. ------------------------------------------------------------------------------------------ I need this information for writing an application that does automated creation of luns and exporting them to the specified guest domain. Please let me know whether the above approach is proper or not? If there is any better way, please do let me know. -- This message posted from opensolaris.org
