How can I mount a Virtual Server disk to the server directly, I need to recover files or perform other tasks.
OnApp 2.x and up, Virtual Servers running on KVM and XEN Compute Resources using LVM or Integrated Storage.
First - get the identifier for the VS disk - this can be found by going to Storage->Disks tab in the UI pages for the VS, and then adding /<disk #> to the URL for the disk you are interested in ( as example, assume the VM page is https://demo.onapp.com/virtual_machines/a1nisp85fqd9zz , then https://demo.onapp.com/virtual_machines/a1nisp85fqd9zz/disks/ to see the disks, and then in this case it is disk #3, so https://demo.onapp.com/virtual_machines/a1nisp85fqd9zz/disks/3 will show the identifier )
Then identify the type of storage - Integrated Storage or LVM (if using SolidFire please contact their support)
The type of storage can be identified by checking settings -> datastores page and either selecting 'edit' on a datastore or noting the identifier - identifiers starting with "onapp-" tend to be LVM datastore.
Now, on the server you are wanting to mount the disk, you need to activate the disk.
For LVM, run command like -
lvchange -a y /dev/onapp-xxxxxx/yyyyy
Where onapp-xxxx is the datastore identifier and the yyyy is the disk identifier from before.
Device /dev/onapp-xxxxxx/yyyyy is your VS disk now.
For Integrated Storage, run command like -
onappstore online uuid=<yyyyyyy> frontend_uuid=<server's uuid from previous command>
Device /dev/xxxxxxxx/yyyyyy is your VM disk now, where xxxxx is the datastore identifier
For KVM Compute Resource, need to map partitions before mounting-
kpartx -a -v -p X <disk device>
Then mount the resulting /dev/mapper/......X1 device
To undo these steps, first umount the disk, then unmap partitions if needed -
kpartx -d -v -p X <disk device>
then deactivate the disk -
lvchange -a n /dev/onapp-xxxxxx/yyyyyy
Integrated storage -
onappstore offline uuid=yyyyyy