OpenVZ Forum

Home » Mailing lists » Users » ploop and trim/ discard support
Re: ploop and trim/ discard support [message #47823 is a reply to message #47822] Wed, 12 September 2012 22:36 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

On 09/13/2012 01:38 AM, Corin Langosch wrote:
> On 12.09.2012 at 21:34 +0200, Kir Kolyshkin <> wrote:
>> On Sep 12, 2012 11:20 PM, "Corin Langosch" <
>> <>> wrote:
>> >
>> > Hi,
>> >
>> > it seems that when creating & deleting files inside a ploop backed
>> container the backing image file doesn't shrink. So the image file is
>> still consuming around 400 GB, while in the container df shows only
>> 100 GB in use.
>> >
>> > ll on host: -rw------- 1 root root 384G Sep 12 21:06 root.hdd
>> > df on container: /dev/ploop1 493G 103G 390G 21% /
>> We have online shrink. It's "ploop balloon discard" or just "vzctl
>> compact". You'd better have ploop and vzctl from git (both are really
>> close to be released).
> The system's still working heavily but the image is already reduced by
> around 60 GB so it seems to work well. :)
> Would you suggest putting some script into crontab to compact all
> ploop images ex. once a week? Or probably do something like ctid%7 and
> compact a few of them every night?

You can use ploop balloon discard --stat to find out how much space
could be compacted, and decide if you need it.

Any contribution in that area is welcome :)

> BTW: the man of vzctl contains the "compact" command. But the usage
> output of vzctl doesn't. Shall I file a bug report for it?

NP, I have just fixed it;a=commitdiff;h=60e4b4

But the big problem here is vzctl --help output is too heavy.
I would like to have something that is done for ploop -- you get basic
help and if you specify a command you get a command-specific help.

Good patches for that are welcome :)

Kir Kolyshkin
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 64/32 guests
Next Topic: vzmigrate as backup
Goto Forum:

Current Time: Fri Jun 02 19:43:34 GMT 2023

Total time taken to generate the page: 0.01398 seconds