LXC vs OpenVZ - How is shared storage different now?

torontob

Active Member
Oct 18, 2010
40
0
26
Hi everyone,

I used to be able to easily browse to /var/lib/private/vz....and find my container files and it was BEAUTIFUL. Now, when I just created an LXC container under Proxmox 4.2 I get a disk create under local-lvm storage and I have to mount it to get to it. That brings me to two questions:

1- Would mounting and using the disk like I did before will give me issues? (remember this is a production server with many KVM and Containers)
2- Does this new method mean that my container storage is no longer SHARED with other containers since it looks like it has it's own dedicated disk? :eek:
3- Is there another way to do this for Containers at least so that I don't have to go through this mounting process? (like the old way)

Above changes break scripts for me and creates management overhead.
I have jumped from Proxmox 2.2 to 4.2 :( - I know it's a big jump but I hope someone can guide me.

Thanks,
 
Anyone can comment on this? I am sure others are interested as well...
Why even use LVM and loose other abilities?
 
1- Would mounting and using the disk like I did before will give me issues? (remember this is a production server with many KVM and Containers)
you lose a lot of features

2- Does this new method mean that my container storage is no longer SHARED with other containers since it looks like it has it's own dedicated disk? :eek:
unless you use thin-provisioning, yes, each volume will need the full space.

3- Is there another way to do this for Containers at least so that I don't have to go through this mounting process? (like the old way)
you should probably update your scripts/.. to use the following pct commands:
  • "pct mount" to mount a stopped container (for example, to do extensive maintenance or fix unbootable containers)
  • "pct pull" and "pct push" to transfer files from and to running containers
  • "pct exec" and "pct enter" to run individual commands or to spawn a shell inside a running container
if you are worried about unneeded / empty allocated disk space, use a thin-provisioned storage (e.g., the default LVM-thin) or ZFS (with ZFS, dataset sizes of the containers are arbitrarily settable up to the size of the pool, because all the datasets share the space of the pool)
 
I use the old way - shared directory - for video server at home. emby, plex an a few others use their own lxc and do well with a shared directory.

For clusters and most other uses the new storage is better for backups and moving systems to another node. so at work I've eliminated the use of shared directory.
 
I use the old way - shared directory - for video server at home. emby, plex an a few others use their own lxc and do well with a shared directory.

For clusters and most other uses the new storage is better for backups and moving systems to another node. so at work I've eliminated the use of shared directory.

Hi Rob, thanks for weighing in. How do you use the old way? Can I still use openvz on new promox or what?
Thanks,
 
Hi Rob, thanks for weighing in. How do you use the old way? Can I still use openvz on new promox or what?
Thanks,

I added this to the .conf file at /etc/pve/lxc :
Code:
lxc.mount.entry: /ht/Shared  ht/Shared  none bind,create=dir,optional 0 0
The pve wiki may have more information.
root access needed.

will you use turnkey?
 
Last edited:
you lose a lot of features


unless you use thin-provisioning, yes, each volume will need the full space.


you should probably update your scripts/.. to use the following pct commands:
  • "pct mount" to mount a stopped container (for example, to do extensive maintenance or fix unbootable containers)
  • "pct pull" and "pct push" to transfer files from and to running containers
  • "pct exec" and "pct enter" to run individual commands or to spawn a shell inside a running container
if you are worried about unneeded / empty allocated disk space, use a thin-provisioned storage (e.g., the default LVM-thin) or ZFS (with ZFS, dataset sizes of the containers are arbitrarily settable up to the size of the pool, because all the datasets share the space of the pool)
When migrating containers from a server using the old storage method, to a server using the new storage method, are there any more tricks to it than making a dump on the old server, copying it to /var/lib/vz/dump/ of the new server, and running "
pct restore { container number } /path/to/the/dump"? Will it convert to the new storage method by its own?
Thanks.
 
When migrating containers from a server using the old storage method, to a server using the new storage method, are there any more tricks to it than making a dump on the old server, copying it to /var/lib/vz/dump/ of the new server, and running "
pct restore { container number } /path/to/the/dump"? Will it convert to the new storage method by its own?
Thanks.
I do not know the status of a gui for that.

for the ones we had to convert, we used rsync to send from old to new system.

PS: as you probably alread know.
it is good to have data on a separate partition then operating system. two lxc disks are good for that.

are you going to use all zfs storage ?
 
Our system was partitioned by the proxmox installation by default, and all new containers we create are lvm thin partitions using data of a lvm thin pool.
As for the migration, it doesn't have to be a gui way. How do we do we move the containers from the old server(which has them on the same partition, as simple directories), to the new one, which has all new containers created as lvm thin partitions?
 
Our system was partitioned by the proxmox installation by default, and all new containers we create are lvm thin partitions using data of a lvm thin pool.
As for the migration, it doesn't have to be a gui way. How do we do we move the containers from the old server(which has them on the same partition, as simple directories), to the new one, which has all new containers created as lvm thin partitions?

I'm in the middle of some sysadmin work, so excuse the short responses.

for going from pve3 to pve4 and vz to lxc:
we used backup vz then restore that as lxc .
 

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!