Files

Bestbeast

Well-Known Member
Jul 29, 2016
163
5
58
30
Hello,

Now with lxc where are the files of the containers? before they where on root and private folders, but now I can not find them.

Waiting your answer,
Pedro
 
I have seen that proxmox now creates raw files in images folder, is anyway to change that like before, and store data in private and root folders, to access it on a better way?
If not, if something happens with the SO inside a container, how can I solve the problem if I can not edit the files?
 
This depends on the storage you use. For example, If you use ZFS, you can directly access the files on ZFS subvolume. Most other storage types use raw images, so you need to 'pct mount' that before you can access the content.

# pct mount <VMID>

You can then access the data at: /var/lib/lxc/<VMID>/rootfs

When you are done, simply do;

# pct unmount <VMID>
 
This depends on the storage you use. For example, If you use ZFS, you can directly access the files on ZFS subvolume. Most other storage types use raw images, so you need to 'pct mount' that before you can access the content.

# pct mount <VMID>

You can then access the data at: /var/lib/lxc/<VMID>/rootfs

When you are done, simply do;

# pct unmount <VMID>
Oh, thank you very much, also wondering which option is better, if run it with a .raw or create a ZFS storage and see the exact files, and why?
 
I have seen that all raw files are as big as the storage I assigned to that vps, but currently the SO does not have that space ocupied, is that normal? I mean having like 5 raw files of 10gb everyone, but not taking 50gb of space
 
I have seen that all raw files are as big as the storage I assigned to that vps, but currently the SO does not have that space ocupied, is that normal? I mean having like 5 raw files of 10gb everyone, but not taking 50gb of space

that happens when you use a sparse/thin storage
 

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!