Re: [pve-devel] use our own format for LXC containers

2015-08-07 Thread Alexandre DERUMIER
In future, we can now also add additional mount entries like:

rootfs: local:101/subvol-101-disk-1.raw,size=4
mount0: faststore:101/subvol-101-disk-1.raw,size=1,mp=/mnt/faststore
mount1: slowbigstore:101/subvol-101-disk-1.raw,size=1024,mp=/mnt/slowbigstore



I wonder if we could use something generic like

hdd0: local:101/subvol-101-disk-1.raw,size=4,mp=/
hdd1: faststore:101/subvol-101-disk-1.raw,size=1,mp=/mnt/faststore
hdd2: slowbigstore:101/subvol-101-disk-1.raw,size=1024,mp=/mnt/slowbigstore


?


- Mail original -
De: dietmar diet...@proxmox.com
À: aderumier aderum...@odiso.com
Cc: pve-devel pve-devel@pve.proxmox.com
Envoyé: Jeudi 6 Août 2015 16:59:00
Objet: Re: [pve-devel] use our own format for LXC containers

 In future, I want to implement 'subvol' for normal directories (maps to 
 simple subdirectories). 
 
 So that we can remove those get_private_dir hacks... 

In future, we can now also add additional mount entries like: 

rootfs: local:101/subvol-101-disk-1.raw,size=4 
mount0: faststore:101/subvol-101-disk-1.raw,size=1,mp=/mnt/faststore 
mount1: slowbigstore:101/subvol-101-disk-1.raw,size=1024,mp=/mnt/slowbigstore 

I assume that is what you requested recently? 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] use our own format for LXC containers

2015-08-07 Thread Dietmar Maurer

 I wonder if we could use something generic like
 
 hdd0: local:101/subvol-101-disk-1.raw,size=4,mp=/

I prefer 'rootfs' instead, because 'rootfs' has fixed mp '/', and is a required
option.

 hdd1: faststore:101/subvol-101-disk-1.raw,size=1,mp=/mnt/faststore
 hdd2: slowbigstore:101/subvol-101-disk-1.raw,size=1024,mp=/mnt/slowbigstore

those are optional, and have a montpoint.

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] use our own format for LXC containers

2015-08-07 Thread Alexandre DERUMIER
Ok.

I'll try to work on mountpoints next week.


- Mail original -
De: dietmar diet...@proxmox.com
À: aderumier aderum...@odiso.com
Cc: pve-devel pve-devel@pve.proxmox.com
Envoyé: Vendredi 7 Août 2015 10:40:22
Objet: Re: [pve-devel] use our own format for LXC containers

 I wonder if we could use something generic like 
 
 hdd0: local:101/subvol-101-disk-1.raw,size=4,mp=/ 

I prefer 'rootfs' instead, because 'rootfs' has fixed mp '/', and is a required 
option. 

 hdd1: faststore:101/subvol-101-disk-1.raw,size=1,mp=/mnt/faststore 
 hdd2: slowbigstore:101/subvol-101-disk-1.raw,size=1024,mp=/mnt/slowbigstore 

those are optional, and have a montpoint. 

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] use our own format for LXC containers

2015-08-06 Thread Alexandre DERUMIER
Do you still write the config file at lxc format for lxc-start ?
(maybe on each ct start ?)

If yes, I'm not sure, but I think it's possible to pass key=values to lxc-start 
command line,


   -s, --define KEY=VAL
  Assign value VAL to configuration variable KEY. This overrides 
any assignment done in config_file.


- Mail original -
De: dietmar diet...@proxmox.com
À: pve-devel pve-devel@pve.proxmox.com
Envoyé: Jeudi 6 Août 2015 12:20:13
Objet: [pve-devel] use our own format for LXC containers

Hi all, 

we finally use our own format for lxc containers. The patch 
touch most parts of the existing code, so it was quite large (sorry). 
To test, you need to update the following packages from git: 

pve-cluster 
lxc 
pve-container 
pve-manager 

We now store LXC configuration as normal files at: 

/etc/pve/lxc/vmid.conf 

Here is an example: 

--- 
arch: amd64 
cpulimit: 1 
cpuunits: 1024 
hostname: CT105 
memory: 512 
net0: name=eth0,hwaddr=0E:18:24:41:2C:43,bridge=vmbr0 
ostype: debian 
rootfs: subpool:subvol-105-rootfs,size=2 
swap: 512 
 

Please test and report bugs ;-) 

Note: The new format is not compatible with the old one, so you will 
loose existing containers when you update. 

- Dietmar 

___ 
pve-devel mailing list 
pve-devel@pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] use our own format for LXC containers

2015-08-06 Thread Dietmar Maurer
 Do you still write the config file at lxc format for lxc-start ?
 (maybe on each ct start ?)

Sure, yes. What problem do you want to solve?

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] use our own format for LXC containers

2015-08-06 Thread Alexandre DERUMIER
Sure, yes. What problem do you want to solve? 
no special problem, just remove a file write at each start



BTW, I have read the new code, I don't have tested it yet,

but


if ($scfg-{type} eq 'dir' || $scfg-{type} eq 'nfs') {
+   if ($size  0) {
+   $volid = PVE::Storage::vdisk_alloc($storage_conf, $storage, 
$vmid, 'raw',
+  vm-$vmid-rootfs.raw, 
$size);
+   } else {
+   $volid = PVE::Storage::vdisk_alloc($storage_conf, $storage, 
$vmid, 'subvol',
+  subvol-$vmid-rootfs, 0);
+   }



I think this is wrong for $size == 0 ? (subvol is related to zfs right ?)

- Mail original -
De: dietmar diet...@proxmox.com
À: aderumier aderum...@odiso.com
Cc: pve-devel pve-devel@pve.proxmox.com
Envoyé: Jeudi 6 Août 2015 15:18:52
Objet: Re: [pve-devel] use our own format for LXC containers

 Do you still write the config file at lxc format for lxc-start ? 
 (maybe on each ct start ?) 

Sure, yes. What problem do you want to solve? 
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] use our own format for LXC containers

2015-08-06 Thread Dietmar Maurer
 In future, I want to implement 'subvol' for normal directories (maps to
 simple subdirectories).
 
 So that we can remove those get_private_dir hacks...

In future, we can now also add additional mount entries like:

rootfs: local:101/subvol-101-disk-1.raw,size=4
mount0: faststore:101/subvol-101-disk-1.raw,size=1,mp=/mnt/faststore
mount1: slowbigstore:101/subvol-101-disk-1.raw,size=1024,mp=/mnt/slowbigstore

I assume that is what you requested recently?

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel