OpenVZ Forum


Home » Mailing lists » Users » ploop and trim/ discard support
ploop and trim/ discard support [message #47818] Wed, 12 September 2012 19:12
Corin Langosch is currently offline  Corin Langosch
Messages: 18
Registered: March 2012
Junior Member
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% /

I assume this is because ploop doesn't get informed by the ext4 fs when
blocks are no longer in use. Should it help to to mount the ext4 on the
ploop device with the "discard" option? I didn't test if it helps yet,
but at least I was able to pass the mount option (thanks to kir's recent
enhancements) and it started the container without any problems.

/dev/ploop1 on / type ext4 (rw,relatime,barrier=0,data=ordered,discard)

To free all "free" existing blocks I also tried to do a batch cleanup/
trim from inside the container using "fstrim /" but it doesn't work:

root@test:~# fstrim /
fstrim: /: FITRIM ioctl failed: Operation not permitted

Should this be working or is it not supported yet? Am I on the right
path at all? Any better solutions? :)

Corin
 
Read Message
Previous Topic: ploop and mount options
Next Topic: Kernel NFS Server in VE
Goto Forum:
  


Current Time: Sun Nov 03 23:18:00 GMT 2024

Total time taken to generate the page: 0.03528 seconds