Data copied to CT taking up large space

dvdwsn

Member
Jul 29, 2022
20
1
8
I have a TurnKey Debian container, fresh install with Docker and Portainer. I copied the /var/lib/docker folder from an old server to this CT data volume.
The folder when originally copied to Windows was 32GB in size. When copied to the container it is taking up over 114GB.

Any ideas why?
 
Snapshots preventing freeing up space?
Underlaying storage is thin-provisioned but discard/TRIM is not setup so no space can be freed up?
 
I have 1 snapshot, I can delete that and try. But I'm not sure that's the root cause. I'd expect that to only increase by the size of the data being copied in.
It's a container, so am I able to enable discard/TRIM?
 
On LVM-Thin I need to run pct fstrim <VMID> so deleted stuff actually gets deleted.
If there is a snapshot nothing will be deleted. Not just newly added data, also all old data that gets overwritten. Lets say you got a 1GB file and edit that file 10 times by changing 500MB. Then that file consumed 6GB on the storage. 1GB of actual data + 5GB of snapshots. So you don't want to keep your snapshots for too long as it will grow over time.

You also didn't told us what underlaying storage you are using.
 
Last edited:
  • Like
Reactions: dvdwsn
Ah that's good to know, I wasn't aware.
For this CT, there are no edited files. Fresh install w/ 64GB data drive, added Docker, Portainer, then created a backup. I then tried to transfer in the old Docker info. No deletes, no edits, just a file/folder copy using WinSCP.
The underlying drive is an SSD formatted LVM-Thin. Is that what you mean? I don't see any options for enabling TRIM/discard on this drive/volume. Even when I try to add an additional Mount Point, there aren't options for those.

Now, one thing to note, the first transfer ended up hitting an error. Looked it up and it was due to lack of storage space, so I increased the disk size to 128GB. Restarted the transfer, opting to not overwrite existing files, but again it said it ran out of space... So I upped the size by another 64GB. The transfer completed, but when I checked, it said the directory was 114GB, 350% larger than expected.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!