Editing Ploop/readme

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>
 
This document explains how to use user-space <code>ploop</code> utility for typical
 
This document explains how to use user-space <code>ploop</code> utility for typical
 
use-cases.
 
use-cases.
Line 16: Line 17:
  
 
== Load modules ==
 
== Load modules ==
 
  
 
Further ploop commands assume that all necessary modules are loaded:
 
Further ploop commands assume that all necessary modules are loaded:
Line 24: Line 24:
 
  # modprobe pfmt_raw
 
  # modprobe pfmt_raw
 
  # modprobe pio_direct
 
  # modprobe pio_direct
 
  
 
It's not always required to load both <code>pfmt_ploop1</code> (support of ploop1 format) and
 
It's not always required to load both <code>pfmt_ploop1</code> (support of ploop1 format) and
Line 32: Line 31:
  
 
== Initialize image file ==
 
== Initialize image file ==
 
  
 
In-kernel ploop operates on image files of "<code>raw</code>" or "<code>ploop1</code>" format.
 
In-kernel ploop operates on image files of "<code>raw</code>" or "<code>ploop1</code>" format.
Line 109: Line 107:
 
=== Offline merge ===
 
=== Offline merge ===
  
ploop has no heuristic about determining raw/ploop1 format of image file. So,
+
ploop has no heruistic about determining raw/ploop1 format of image file. So,
 
in case of offline merge, user should specify the format of base_delta
 
in case of offline merge, user should specify the format of base_delta
 
explicitly. If it's ploop1, merge command looks like:
 
explicitly. If it's ploop1, merge command looks like:
Line 119: Line 117:
  
 
  # ploop merge /ploop-d2.image /ploop-d1.image /ploop-d.image /ploop.image
 
  # ploop merge /ploop-d2.image /ploop-d1.image /ploop-d.image /ploop.image
 
  
 
This will merge /ploop-d2.image, /ploop-d1.image and /ploop-d.image into
 
This will merge /ploop-d2.image, /ploop-d1.image and /ploop-d.image into
 
/ploop.image.
 
/ploop.image.
 
  
 
When merge completed, source deltas can be deleted because all data that
 
When merge completed, source deltas can be deleted because all data that
 
was present in them has been copied to destination delta.
 
was present in them has been copied to destination delta.
 
  
 
For raw format, "-f raw" should be added as option. E.g.:
 
For raw format, "-f raw" should be added as option. E.g.:
Line 194: Line 189:
 
In this case "ploop copy" on node02 will write data to standard output
 
In this case "ploop copy" on node02 will write data to standard output
 
in some special binary format and "ploop copy" on node01 will read data
 
in some special binary format and "ploop copy" on node01 will read data
from standard input, parse that special format and store data in
+
from stndard input, parse that special format and store data in
 
/home/ploop1.image ("-s" stands for "source", "-d" stands for "destination").
 
/home/ploop1.image ("-s" stands for "source", "-d" stands for "destination").
 
This should work if standard output of node02 and standard input of node01
 
This should work if standard output of node02 and standard input of node01
Line 201: Line 196:
 
== Grow ploop device ==
 
== Grow ploop device ==
  
"ploop grow" command is to extend image file as necessary (offline or online)
+
"ploop grow" command is to extend image file as neccessary (offline or online)
 
and propagate new block-device size to linux kernel (in online case).
 
and propagate new block-device size to linux kernel (in online case).
  
Line 221: Line 216:
 
=== Online grow ===
 
=== Online grow ===
  
Assuming that /dev/ploop0 is running ploop device, the command:
+
Assuming that /dev/ploop0 is runnung ploop device, the command:
  
 
  # ploop grow -s 32g -d /dev/ploop0
 
  # ploop grow -s 32g -d /dev/ploop0
Line 263: Line 258:
 
someone mounted ext4 on ploop device w/o balloon_ino option, then created
 
someone mounted ext4 on ploop device w/o balloon_ino option, then created
 
empty balloon file there, found out its inode number and saved it for the
 
empty balloon file there, found out its inode number and saved it for the
future use).
+
future use)
  
 
Currently, only online ballooning is supported. The following command performs
 
Currently, only online ballooning is supported. The following command performs
Line 288: Line 283:
 
  # ploop balloon status -d /dev/ploop0 -m /mnt_ploop
 
  # ploop balloon status -d /dev/ploop0 -m /mnt_ploop
  
will report current in-kernel status of maintenance like "merge in progress",
+
will report current in-kernel status of maintainance like "merge in progress",
 
"grow in progress", "ballooning started", etc. This is useful because on the
 
"grow in progress", "ballooning started", etc. This is useful because on the
 
one hand balloon operation can't be performed while merge or grow is in
 
one hand balloon operation can't be performed while merge or grow is in
Line 296: Line 291:
 
  # ploop balloon clear -d /dev/ploop0 -m /mnt_ploop
 
  # ploop balloon clear -d /dev/ploop0 -m /mnt_ploop
  
will flush stale in-kernel "BALLOON" state of maintenance. This is useful if
+
will flush stale in-kernel "BALLOON" state of maintainance. This is useful if
 
previous "ploop balloon" died early leaving in-kernel ploop locked.
 
previous "ploop balloon" died early leaving in-kernel ploop locked.
  
Line 304: Line 299:
 
user monitors exit status of ploop commands he/she runs in some way. If
 
user monitors exit status of ploop commands he/she runs in some way. If
 
user issued "ploop balloon change" and it was killed in the middle, the user
 
user issued "ploop balloon change" and it was killed in the middle, the user
knows that it didn't complete with zero exit status. Then user should inquire
+
knows that it didn't complete with zero exit status. Then user shoud inquire
current maintenance state with "ploop balloon status" command, and, if it
+
current maintainance state with "ploop balloon status" command, and, if it
 
reported "FBLOAD" or "RELOC", the user should use "ploop balloon complete"
 
reported "FBLOAD" or "RELOC", the user should use "ploop balloon complete"
before proceeding with any other maintenance operations (snapshot, merge,
+
before proceeding with any other maintainance operations (shanphsot, merge,
 
grow, balloon).
 
grow, balloon).
  
Line 314: Line 309:
 
will check whether existent balloon file was properly processed. This is useful
 
will check whether existent balloon file was properly processed. This is useful
 
if previous "ploop balloon" was interrupted, but "ploop balloon status"
 
if previous "ploop balloon" was interrupted, but "ploop balloon status"
reports "OFF" or "BALLOON" maintenance state. In this case it's possible
+
reports "OFF" or "BALLOON" maintainance state. In this case it's possible
 
that balloon file was inflated but no further processing happened.
 
that balloon file was inflated but no further processing happened.
  
Line 330: Line 325:
 
* [[Ploop]]
 
* [[Ploop]]
 
* {{Man|ploop|8}}
 
* {{Man|ploop|8}}
 +
</translate>
  
 
[[Category: Storage]]
 
[[Category: Storage]]

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)

Templates used on this page: