nerdexam
LPI

305-300 · Question #29

Which of the following statements are true about sparse images in the context of virtual machine storage? (Choose two.)

The correct answer is B. Sparse images may consume an amount of space different from their nominal size. D. Sparse images allocate backend storage at the first usage of a block. Sparse images are a type of virtual disk images that grow in size as data is written to them, but do not shrink when data is deleted from them. Sparse images may consume an amount of space different from their nominal size, which is the maximum size that the image can grow to…

Virtualization

Question

Which of the following statements are true about sparse images in the context of virtual machine storage? (Choose two.)

Options

  • ASparse images are automatically shrunk when files within the image are deleted.
  • BSparse images may consume an amount of space different from their nominal size.
  • CSparse images can only be used in conjunction with paravirtualization.
  • DSparse images allocate backend storage at the first usage of a block.
  • ESparse images are automatically resized when their maximum capacity is about to be exceeded.

How the community answered

(29 responses)
  • A
    17% (5)
  • B
    69% (20)
  • C
    10% (3)
  • E
    3% (1)

Explanation

Sparse images are a type of virtual disk images that grow in size as data is written to them, but do not shrink when data is deleted from them. Sparse images may consume an amount of space different from their nominal size, which is the maximum size that the image can grow to. For example, a sparse image with a nominal size of 100 GB may only take up 20 GB of physical storage if only 20 GB of data is written to it. Sparse images allocate backend storage at the first usage of a block, which means that the physical storage is only used when the virtual machine actually writes data to a block. This can save storage space and improve performance, as the image does not need to be pre-allocated or zeroed out. Sparse images are not automatically shrunk when files within the image are deleted, because the virtual machine does not inform the host system about the freed blocks. To reclaim the unused space, a special tool such as virt-sparsify1 or qemu-img2 must be used to compact the image. Sparse images can be used with both full virtualization and paravirtualization, as the type of virtualization does not affect the format of the disk image. Sparse images are not automatically resized when their maximum capacity is about to be exceeded, because this would require changing the partition table and the filesystem of the image, which is not a trivial task. To resize a sparse image, a tool such as virt-resize3 or qemu-img2 must be used to increase the nominal size and the filesystem size of the image.

Topics

#sparse images#thin provisioning#disk image formats#storage allocation

Community Discussion

No community discussion yet for this question.

Full 305-300 Practice