1. 05 2月, 2016 3 次提交
  2. 04 2月, 2016 9 次提交
  3. 03 2月, 2016 20 次提交
  4. 01 2月, 2016 3 次提交
  5. 30 1月, 2016 5 次提交
    • J
      logical: Create helper virStorageBackendLogicalParseVolExtents · 63e15ad5
      John Ferlan 提交于
      Create a helper routine in order to parse any extents information
      including the extent size, length, and the device string contained
      within the generated 'lvs' output string.
      
      A future patch would then be able to avoid the code more cleanly
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      63e15ad5
    • W
      rbd: Open in Read-Only mode when refreshing a volume · 84678267
      Wido den Hollander 提交于
      By opening a RBD volume in Read-Only we do not register a
      watcher on the header object inside the Ceph cluster.
      
      Refreshing a volume only calls rbd_stat() which is a operation
      which does not write to a RBD image.
      
      This allows us to use a cephx user which has no write
      permissions if we would want to use the libvirt storage pool
      for informational purposes only.
      
      It also saves us a write into the Ceph cluster which should
      speed up refreshing a RBD pool.
      
      rbd_open_read_only() is available in all librbd versions which
      also support rbd_open().
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      84678267
    • W
      rbd: Implement buildVolFrom using RBD cloning · 0b15f920
      Wido den Hollander 提交于
      RBD supports cloning by creating a snapshot, protecting it and create
      a child image based on that snapshot afterwards.
      
      The RBD storage driver will try to find a snapshot with zero deltas between
      the current state of the original volume and the snapshot.
      
      If such a snapshot is found a clone/child image will be created using
      the rbd_clone2() function from librbd.
      
      rbd_clone2() is available in librbd since Ceph version Dumpling (0.67) which
      dates back to August 2013.
      
      It will use the same features, strip size and stripe count as the parent image.
      
      This implementation will only create a single snapshot on the parent image if
      never changes. This reduces the amount of snapshots created for that RBD image
      which benefits the performance of the Ceph cluster.
      
      During build the decision will be made to use either rbd_diff_iterate() or
      rbd_diff_iterate2().
      
      The latter is faster, but only available on Ceph versions after 0.94 (Hammer).
      
      Cloning is only supported if RBD format 2 is used. All images created by libvirt
      are already format 2.
      
      If a RBD format 1 image is used as the original volume the backend will report
      a VIR_ERR_OPERATION_UNSUPPORTED error.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      0b15f920
    • W
      rbd: Add support for wiping RBD volumes using TRIM. · 34872ca4
      Wido den Hollander 提交于
      Using VIR_STORAGE_VOL_WIPE_ALG_TRIM a RBD volume can be trimmed down
      to 0 bytes using rbd_discard()
      
      Effectively all the data on the volume will be lost/gone, but the volume
      remains available for use afterwards.
      
      Starting at offset 0 the storage pool will call rbd_discard() in stripe
      size * count increments which is usually 4MB. Stripe size being 4MB and
      count 1.
      
      rbd_discard() is available since Ceph version Dumpling (0.67) which dates
      back to August 2013.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      34872ca4
    • W
      storage: Add TRIM algorithm to storage volume API · 63cdc92f
      Wido den Hollander 提交于
      This new algorithm adds support for wiping volumes using TRIM.
      
      It does not overwrite all the data in a volume, but it tells the
      backing storage pool/driver that all bytes in a volume can be
      discarded.
      
      It depends on the backing storage pool how this is handled.
      
      A SCSI backend might send UNMAP commands to remove all data present
      on a LUN.
      
      A Ceph backend might use rbd_discard() to instruct the Ceph cluster
      that all data on that RBD volume can be discarded.
      Signed-off-by: NWido den Hollander <wido@widodh.nl>
      63cdc92f