Editing Ploop/sparse

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 +
<translate>
 +
<!--T:1-->
 
'''Sparse file''' is a file that contains blocks of zeroes that are not allocated on disk (see [[w:Sparse file]]). By design, ploop images can't contain such non-allocated blocks.
 
'''Sparse file''' is a file that contains blocks of zeroes that are not allocated on disk (see [[w:Sparse file]]). By design, ploop images can't contain such non-allocated blocks.
  
 +
<!--T:2-->
 
While ploop is never creating sparse image files, they can be accidentally made so when tools such as <code>rsync --sparse</code> or <code>cp --sparse=always</code> are used to copy images. So, one should not use backup or copy tools that create sparse files out of non-sparse ones.
 
While ploop is never creating sparse image files, they can be accidentally made so when tools such as <code>rsync --sparse</code> or <code>cp --sparse=always</code> are used to copy images. So, one should not use backup or copy tools that create sparse files out of non-sparse ones.
  
== Kernel warning ==
+
== Kernel warning == <!--T:3-->
  
 +
<!--T:4-->
 
In case sparse file is detected by the kernel, it gives a warning in dmesg, for example:
 
In case sparse file is detected by the kernel, it gives a warning in dmesg, for example:
  
  Nov 21 20:37:27 sun kernel: [43451.057489] ploop(24002): a hole in image file detected (0)
+
  <!--T:5-->
 +
Nov 21 20:37:27 sun kernel: [43451.057489] ploop(24002): a hole in image file detected (0)
  
 +
<!--T:6-->
 
In case there are no other ploop-related warnings or errors immediately after, this one is harmless ({{B|2825}}).
 
In case there are no other ploop-related warnings or errors immediately after, this one is harmless ({{B|2825}}).
  
== Userspace warnings ==
+
== Userspace warnings == <!--T:7-->
  
 +
<!--T:8-->
 
You might see something like this (reported by ploop library) during container start or mount:
 
You might see something like this (reported by ploop library) during container start or mount:
  
  Error in check_and_repair_sparse (check.c:542): Delta file /vz/private/1407/root.hdd/root.hdd contains uninitialized blocks (offset=135573536768 len=1323008) which are not aligned to cluster size
+
  <!--T:9-->
 +
Error in check_and_repair_sparse (check.c:542): Delta file /vz/private/1407/root.hdd/root.hdd contains uninitialized blocks (offset=135573536768 len=1323008) which are not aligned to cluster size
 
  Error in fill_hole (check.c:456): Warning: ploop image '/vz/private/1407/root.hdd/root.hdd' is sparse
 
  Error in fill_hole (check.c:456): Warning: ploop image '/vz/private/1407/root.hdd/root.hdd' is sparse
 
  Reallocating sparse blocks back
 
  Reallocating sparse blocks back
  
 +
<!--T:10-->
 
The last line tells that ploop library is going to fix the problem.
 
The last line tells that ploop library is going to fix the problem.
  
== How to fix ==
+
== How to fix == <!--T:11-->
  
 +
<!--T:12-->
 
Since [[Download/ploop/1.10|ploop-1.10]], ploop images are checked for being sparse and are automatically fixed on mount, in case DiskDescriptor.xml is used. Otherwise, you can use <code>ploop check --repair-sparse</code> to check for and repair such images.
 
Since [[Download/ploop/1.10|ploop-1.10]], ploop images are checked for being sparse and are automatically fixed on mount, in case DiskDescriptor.xml is used. Otherwise, you can use <code>ploop check --repair-sparse</code> to check for and repair such images.
  
Alternatively, you can just do something like this to get rid of holes. Make sure ploop file is not used!
+
<!--T:13-->
 +
Alternatelely, you can just do something like this to get rid of holes. Make sure ploop file is not used!
  
  cat root.hdd > root.hdd2 && mv root.hdd2 root.hdd
+
  <!--T:14-->
 
+
cat root.hdd > root.hdd2 && mv root.hdd2 root.hdd
== See also ==
 
  
 +
== See also == <!--T:15-->
  
 +
<!--T:16-->
 
* [[Ploop]]
 
* [[Ploop]]
 
* [[w:Sparse file]]
 
* [[w:Sparse file]]
 +
</translate>
  
 
[[Category: Storage]]
 
[[Category: Storage]]
 
[[Category: Troubleshooting]]
 
[[Category: Troubleshooting]]

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: