Skip to content
  • Iustin Pop's avatar
    LUCreateInstance: implement disk adoption mode · c3589cf8
    Iustin Pop authored
    
    
    This new mode, valid only for the plain template disk, allows creation
    of an instance based on existing logical volumes (preserving data),
    rather than creation of new volumes and OS creation.
    
    The new mode works as follows:
    
    - instead of size, all disks passed in must have an 'adopt' key, which
      signifies the LV name to be used
    - all disks must have this key, or neither should
    - we check the volume existence, and from the result we fill in the
      actual size
    - online (in-use) volumes are not allowed
    - 'stealing' of another's instance volumes is prevented via reservation
      of the LV names
    - during creation, we rename the logical volumes to the standard Ganeti
      format (based on UUID)
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    c3589cf8