share virtual disks between guests

Latest response

Is it possible to share virtual disk between two  guests ?

 

I'd like to  check if this  scenario  may be impelemted  :

 

  • run two rh5 guests
  • each guest has  one system disk
  • add second  virtual disk on one of these guests
  • defince some database on this extra  disk
  • in a case of the db failure unmount/detach this  virtual disk from original  guest and  mount/attach it on the second guest  using API .

 

/Vlad .

 

Responses

This is not exactly a shared disk feature, more of an option to detach a disk from one VM and move to a different VM.

 

An alternative would indeed be a shared disk however in shared disk your BD disk would be attached at the same time on both VMs. Shared disks are planned for upcoming releases. In the meanwhile you can use VDSM hooks to directly attach any disk external to RHEV to the VM.

You would still need a file system that understands the shared disk model/concept right?  RHEV-H would not handle the concurrent access to the disk, nor implement a peer locking methodology as such?  And, when duing backup/snapshots, RHEV-H would not, unless designed with the logic in mind, understand which VM owns the disk at the time the snapshot was done.

We need access to   virtual disk  only   from one  guest at given time . More os less it would remind RH cluster behavior . Having own mechanizm which  monitors app status and  unmount/detach this  vd   based on  monitoring result :  if  app  fails  on one guest it would be rerun on another guest  with remounting the same vd .

I'll  check if VDSM hooks will do the job .

Simon , you've  got the point  - is  it possible to move disk ( not with OS , data  only  ) between  guest within the same storage domain ?

 

Apart  from Admin  guide - is there howto doc  describes VDSM  hooks ?

My lab setup if offline at the moment so I can't confirm this, but as I recall, I could not move a virtual disk from VM to VM via the RHEV-M GUI, but I don't see any thing blocking it from being done via the REST API.  As long as the VM disk is not being accessed?  Of course, if either VM being changed is power-ed up?  It would make sense to block moving the VM disk association.

Let's say we have Oracle gust with two vds - system and database . It doesn't  sound good  that having huge database second disk  may be impacted by system  crash  disk . It would take less time to restore the whole system just  restoring  system disk and attach to it existing ( good ) data one .How  to attache/detach  second vd from system disk ?

 

Within API  output  for my guest with 2 vds  I  do not see any actions like this .

 

/Vlad