[Lxc-users] lxc-create -B zfs

Tamas Papp tompos at martos.bme.hu
Tue Sep 10 20:27:44 UTC 2013


On 06/18/2013 04:14 AM, Serge Hallyn wrote:

hi Serge,

> Quoting Tamas Papp (tompos at martos.bme.hu):
>> On 06/10/2013 03:41 PM, Serge Hallyn wrote:
>>> Quoting Tamas Papp (tompos at martos.bme.hu):
>>>> hi,
>>>>
>>>> # lxc-create -n pony -t ubuntu -B zfs --zfsroot=tank/lxc
>>> Hm.  Mine is simply called 'lxc', and that works.  So it sounds like I'm
>>> doing something wrong in parsing the zfsroot, but I can't offhand see
>>> in the code where.
>>>
>>> Could you run this through 'strace -f -odebutfile' and look in debugfile
>>> for the exec of 'zfs create'?
>> hi,
>>
>> Sorry, I could get back to this just now:
>>
>> log.103022:execve("/sbin/zfs", ["zfs", "create",
>> "-omountpoint=/var/lib/lxc/test123/rootfs", "tank/lxc/test123"], [/*
>> 21 vars */]) = 0
>>
>> From cli it works fine.
>>
>> I can send the whole log file, if you want.
> Yes, please do - to me personally depending on the size, to spare the
> list.

Shame on me, I absolutely forgot to answer this email.

This one works fine:

# lxc-create -n eee -t ubuntu -B zfs --zfsroot tank/lxc

But:

# lxc-create -n eee -t ubuntu -B zfs
cannot create 'lxc/eee': no such pool 'lxc'
lxc-create: Failed to create backing store type zfs

lxc-create: Error creating backing store type zfs for eee
lxc-create: Error creating container eee

The problematic command:

execve("/sbin/zfs", ["zfs", "create", "-omountpoint=/tank/lxc/eee/rootfs", "lxc/eee"], [/* 31 vars
*/]) = 0

Of course it's not OK, since the last parameter should be "tank/lxc/eee".

It seems to me, that either "-B zfs" should require "--zfsroot" or the default value for zfsroot
should be "tank/lxc" as it is in the help:

  --zfsroot=PATH    Create zfs under given zfsroot
                    (Default: tank/lxc))


I've attached the strace log.

Sorry for the mess again...

>> ps.: Can we make at least configurable the mountpoint, so it can be set to the root of the container?
> I'd like to call that something different, as it has completely
> different behavior.  We could do the same for btrfs and zfs.
> At container start, we want $rootfs to be treated as a simple dir
> backed container.  At clone time, we want to bypass manual copying
> of files and backing store - but not of the updating of the files -
> in favor clone of all of $lxcpath/$container/.

I'm not sure, I see the problem here. Can you elaborate it?
Even if config, fstab and other files outside of rootfs directory are cloned to a new fs, they can
be overwritten, deleted or anything else.
Is the problem something around this?

Thanks,
tamas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc-create-zfs-strace.log
Type: text/x-log
Size: 37793 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130910/51f5ffdf/attachment.bin>


More information about the lxc-users mailing list