[PVE-User] Some thought about zfs based configurations

Pongrácz István pongracz.istvan at gmail.com
Sat Aug 1 10:29:13 CEST 2015


>> 
>> Is that possible to not use ploop for storing lxc containers?
> 
> We do not use 'ploop' at all (we use normal loop device).
> 
> You can also directly use directories by passing '0' as disk size. 
> But you obviously loose disk quota support that way.
> Note: There is no simfs on newer kernels.
> 
> 

Hi,

Thanks Dietmar, I tested the latest pve 4.0.
It seems, basically every needs are covered, congratulation :)

I created a zfs storage to store virtual disks and containers.

I also created a VM and an LXC container.

I got the following:

root at pve40 :/rpool# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 2.30G 20.0G 140K /rpool
rpool/ROOT 1.08G 20.0G 140K /rpool/ROOT
rpool/ROOT/pve-1 1.08G 20.0G 1.08G /
rpool/subvol-101-rootfs 293M 1.71G 293M /rpool/subvol-101-rootfs
rpool/swap 953M 21.0G 116K -
rpool/vm-100-disk-1 93K 20.0G 93K -

Which is great, because all storages located in their own filesystem/volume by default.

Manual tuning on zfs filesystems/volumes are not a big deal and can be transparent.
At this moment I cannot increase the storage of the lxc container using the GUI when I put it into a zfs storage.

Directory structure
May I recommend to use a layout for storing zfs volumes/containers?
If one creates a new zfs storage and give a name like this: ztank, it could be practical to put things under its name.
Example:
ztank/zvol/vm-100/vm-100-disk-1
ztank/zvol/vm-101/vm-101-disk-1
ztank/zvol/vm-101/vm-101-disk-2
ztank/lxc/vm-102/
ztank/lxc/vm-103/

With this layout, the user have a clear overview about the system and very easy to issue commands recursively.
Example:
zfs set compression=lz4 ztank (set lz4 compression for all storages)
zfs set atime=off ztank/lxc (set atime to off for all lxc containers)
or creating ad-hoc snapshot in one step (recursively).

It is also very easy to copy/replicate the whole system or individual storages to a remote server using simplesnap.

So, I relly like the 4.x version :)

Thanks, István






More information about the pve-user mailing list