Why zfs filesystem are not support LXC container ? (PVE4 Beta 2)

tukiyo3

Well-Known Member
Sep 13, 2015
30
1
48
Why zfs filesystem are not support LXC container ?
 
Last edited:
zfs is fully supported with our LXC containers. Did you create a zfs type storage on the GUI?
 
Last edited:
> Did you create a zfs type storage on the GUI?

* HDD: /var/lib/vz/ is zfs partition. it was created by Installer (ZFS RAID0).
* SSD: used to that's cache(L2ARC) and log(ZIL).

It occured restore from openvz dump,
and create a lxc container from GUI.


When I created a zfs type storage on the GUI, only "KVM Image" could handle.
I founded add zfs's directory path can handle all type of archives.

## error message.

~~~
root@:/var/lib/vz/dump# pct restore 307 `pwd`/vzdump-openvz-307-2015_09_13-07_52_37.tar
Formatting '/var/lib/vz/images/307/vm-307-disk-1.raw', fmt=raw size=4294967296
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: done
Creating filesystem with 1048576 4k blocks and 262144 inodes
Filesystem UUID: 21d3724c-f71e-4a8e-b123-fba4e7a4a76e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Multiple mount protection is enabled with update interval 5 seconds.
Writing superblocks and filesystem accounting information:
Warning, had trouble writing out superblocks.TASK ERROR: command 'mkfs.ext4 -O mmp /var/lib/vz/images/307/vm-307-disk-1.raw' failed: exit code 144
~~~
 
Last edited:
How to do this exactly? I could not find any storage option to create CT in Web GUI though I have created the ZFS storage. The Proxmox VE 4.0 is on ZFS RAID1 right from the start.

/chrone
 

Attachments

  • proxmox lxc on zfs raid1 part 2.png
    proxmox lxc on zfs raid1 part 2.png
    4.3 KB · Views: 106
  • proxmox lxc on zfs raid1.png
    proxmox lxc on zfs raid1.png
    5.9 KB · Views: 114
  • proxmox lxc create no storage option.png
    proxmox lxc create no storage option.png
    7.4 KB · Views: 107
How to do this exactly? I could not find any storage option to create CT in Web GUI though I have created the ZFS storage. The Proxmox VE 4.0 is on ZFS RAID1 right from the start.

/chrone

looks ok, you just have to follow the wizard, your screenshot just shows the first step.
 
looks ok, you just have to follow the wizard, your screenshot just shows the first step.

Hi Tom,

The next button is not working. The same as with Proxmox on ext4. How to proceed from here? :)

/chrone
 

Attachments

  • proxmox lxc create no storage option 2.png
    proxmox lxc create no storage option 2.png
    15.4 KB · Views: 93
Last edited:
Hi Tom,

The next button is not working. The same as with Proxmox on ext4. How to proceed from here? :)

/chrone

your screenshot shows that you did not enter the root password. as soon as you entered the password, the next step is possible.
 
your screenshot shows that you did not enter the root password. as soon as you entered the password, the next step is possible.

Oh okay, so the password is for the Proxmox root password. Silly me. I thought it was for the LXC CT password. Thanks, it works now! Woohoo! :D

/chrone
 
Oh okay, so the password is for the Proxmox root password. Silly me. I thought it was for the LXC CT password. Thanks, it works now! Woohoo! :D

/chrone

On the LXC creation wizard, you define the root password of the LXC container.
 
On the LXC creation wizard, you define the root password of the LXC container.

Oh my bad, it was just that I set simple password for this LXC test it would not activate the next button.

It's all working now with LCX root disk on RPOOL. :)

Much appreciated for the great support.

/chrone
 
Hello,

i have same issue, i try to create it with gui, is there any screen shot how to do it ? i cannot use container on ZFS
 
Hi,

have you set in Datacenter -> Storage tab on the ZFSPoolPlugin the content "container"?
 
Hi,
i do not see it ...

i have zfs like this :
NAME USED AVAIL REFER MOUNTPOINT
pool 781G 2.75T 96K none
pool/ct 96K 2.75T 96K /ct

i create storage zfs on this pool/ct and try to add CT and i get

mount: special device /pool/ct/subvol-102-disk-1 does not exist
mounting container failed
TASK ERROR: command 'mount -o bind -o '' /pool/ct/subvol-102-disk-1 /var/lib/lxc/102/rootfs/' failed: exit code 32

Best Regards
 

Attachments

  • upload_2016-3-30_10-21-36.gif
    upload_2016-3-30_10-21-36.gif
    43 bytes · Views: 11
  • upload_2016-3-30_10-21-36.gif
    upload_2016-3-30_10-21-36.gif
    43 bytes · Views: 8
If you set the mountpoint for your pool, it will work as expected:

mount the zfs pool "pool" to /pool
mount "ct" to /pool/ct
 
Hi,

so not possible to set other mountpoint to pool/ct and use it yes ?

it's working on pool/ct .

Best Regards
 
So I've the same problem: When I want to create a LXC I get an error with superblocks....

I've created a second storage: ZFS but I've no rights to add templates or upload something. And I can only select this options for the pool:

-rpool
-rpool/ROOT
-rpool/ROOTt/pve-1
-rpool/data

What sould I do?
 

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!