Re: [Lxc-users] lxc-create -B zfs
Quoting Tamas Papp (tom...@martos.bme.hu): On 10/01/2013 07:14 AM, Serge Hallyn wrote: Right now if we say lxc-create -t ubuntu -n u1 -B zfs that means make the rootfs be type zfs. Where/how should it be specified that $lxcpath/$lxcname should be a new zfs, not $lxcpath/$lxcname/rootfs? 'zfs.mounttype = [whole | rootfs]' ? Well, it's good idea. BTW I think it would be the same for lvm, btrfs and so on. Something like that would be ok for me, my main concern is actually that the special casing in lxcapi_create() and lxcapi_destroy() be done cleanly and concisely. But yeah it should be possible. Do you mind sending a patch? It would be great, but I checked and unfortunately it's much more then I can do with my programming skills:( Ok, lemme put out a general call - is there anyone who is using or wants to use lxc with zfs and who would have time to help straighten this out? If/when I get two days where nothing else is likely to come up, I'd like to sit down and address this, but it'll take that time to clear my head to think about this right so that I make it better not worse... (I hope that sometime in december I'll have such a block of time, but hopefully someone beats me to it) thanks, -serge -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-create -B zfs
On 11/20/2013 05:24 PM, Serge Hallyn wrote: Quoting Tamas Papp (tom...@martos.bme.hu): On 10/01/2013 07:14 AM, Serge Hallyn wrote: Right now if we say lxc-create -t ubuntu -n u1 -B zfs that means make the rootfs be type zfs. Where/how should it be specified that $lxcpath/$lxcname should be a new zfs, not $lxcpath/$lxcname/rootfs? 'zfs.mounttype = [whole | rootfs]' ? Well, it's good idea. BTW I think it would be the same for lvm, btrfs and so on. Something like that would be ok for me, my main concern is actually that the special casing in lxcapi_create() and lxcapi_destroy() be done cleanly and concisely. But yeah it should be possible. Do you mind sending a patch? It would be great, but I checked and unfortunately it's much more then I can do with my programming skills:( Ok, lemme put out a general call - is there anyone who is using or wants to use lxc with zfs and who would have time to help straighten this out? If/when I get two days where nothing else is likely to come up, I'd like to sit down and address this, but it'll take that time to clear my head to think about this right so that I make it better not worse... (I hope that sometime in december I'll have such a block of time, but hopefully someone beats me to it) Seeing how busy you are, I'm doubt, it will ever happen:) Anyway, if there is no volunteer, just drop the request. I can live with a workaround (llxc-create container, zfs create/lvcreate dataset, mv container/* dataset/). Though I'm afraid there will be more features in the future, that require the layout compliance (eg. migration tool) and I'll be in trouble.. tamas -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-create -B zfs
On 10/01/2013 07:14 AM, Serge Hallyn wrote: Right now if we say lxc-create -t ubuntu -n u1 -B zfs that means make the rootfs be type zfs. Where/how should it be specified that $lxcpath/$lxcname should be a new zfs, not $lxcpath/$lxcname/rootfs? 'zfs.mounttype = [whole | rootfs]' ? Well, it's good idea. BTW I think it would be the same for lvm, btrfs and so on. Something like that would be ok for me, my main concern is actually that the special casing in lxcapi_create() and lxcapi_destroy() be done cleanly and concisely. But yeah it should be possible. Do you mind sending a patch? It would be great, but I checked and unfortunately it's much more then I can do with my programming skills:( tamas -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-create -B zfs
On 10/01/2013 07:08 AM, Serge Hallyn wrote: Quoting Tamas Papp (tom...@martos.bme.hu): On 06/18/2013 04:14 AM, Serge Hallyn wrote: hi Serge, Quoting Tamas Papp (tom...@martos.bme.hu): On 06/10/2013 03:41 PM, Serge Hallyn wrote: Quoting Tamas Papp (tom...@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 hi, Can zfs pools be any directory hierarchy depth? Examples I had seen Yes, they can. A complete zfs pool acts as a hierarchy set of directories and volumes. For example this one is from a production server: # zfs list NAME USED AVAIL REFER MOUNTPOINT tank1.56T 3.79T 176K /tank tank/eee 136K 3.79T 136K /tank/eee tank/iso11.1G 3.79T 11.1G /tank/iso tank/kvm97.1G 3.79T 136K /tank/kvm tank/kvm/bw139.0G 3.79T 32.5G - tank/kvm/compreg-vmk01 11.4G 3.79T 9.18G - tank/kvm/ipa12 1005M 3.79T 953M - tank/kvm/naming-vmk01 18.7G 3.79T 15.3G - tank/kvm/naming-vmk02 17.5G 3.79T 12.5G - tank/kvm/tpl-kvm-w7 9.49G 3.79T 9.49G - tank/lxc1.46T 3.79T 339M /tank/lxc tank/lxc/cz 136K 3.79T 136K /tank/lxc/cz tank/lxc/dctest 338M 3.79T 338M /tank/lxc/dctest tank/lxc/finance2.97G 3.79T 2.97G /tank/lxc/finance tank/lxc/hammer 1.16T 3.79T 1.16T /tank/lxc/hammer tank/lxc/ijc-cipool 38.5G 3.79T 38.5G /tank/lxc/ijc-cipool tank/lxc/inventory 706M 3.79T 504M /tank/lxc/inventory tank/lxc/jay94.8G 3.79T 94.8G /tank/lxc/jay tank/lxc/jcc-vmc01 1.26G 3.79T 1.26G /tank/lxc/jcc-vmc01 tank/lxc/marvin4jsci6.03G 3.79T 6.03G /tank/lxc/marvin4jsci tank/lxc/marvinci 5.93G 3.79T 5.93G /tank/lxc/marvinci tank/lxc/svntest 149G 3.79T 149G /tank/lxc/svntest tank/lxc/webdev-vmc01767M 3.79T 767M /tank/lxc/webdev-vmc01 tank/tmp 282M 3.79T 136K /tank/tmp There is nothing directly under the pool 'tank', but mostly filesystems. tank/lxc and tank/kvm are like forks of a volume group (though they could be used as simple directories). were always just one (i.e. 'tank'), so I always just used 'lxc'. Terminology: tank - pool tank/lxc - filesystem tank/ - root filesystem of the pool. Differences are in properties: # zpool get all tank NAME PROPERTY VALUE SOURCE tank size 5.44T - tank capacity 28%- tank altroot- default tank health ONLINE - tank guid 14358046246634998549 default tank version- default tank bootfs - default tank delegation on default tank autoreplaceoffdefault tank cachefile - default tank failmode wait default tank listsnapshots offdefault tank autoexpand offdefault tank dedupditto 0 default tank dedupratio 1.00x - tank free 3.87T - tank allocated 1.57T - tank readonly off- tank ashift 12 local tank comment- default tank expandsize 0 - tank freeing0 default tank feature@async_destroy enabledlocal tank feature@empty_bpobjactive local tank feature@lz4_compress active local # zfs get all tank NAME PROPERTY VALUE SOURCE tank type filesystem - tank creation Tue Jul 16 17:23 2013 - tank used 1.57T - tank available 3.79T - tank referenced176K - tank compressratio
Re: [Lxc-users] lxc-create -B zfs
On 06/18/2013 04:14 AM, Serge Hallyn wrote: hi Serge, Quoting Tamas Papp (tom...@martos.bme.hu): On 06/10/2013 03:41 PM, Serge Hallyn wrote: Quoting Tamas Papp (tom...@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=PATHCreate 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 set_robust_list(0x7fd33f156a20, 0x18) = 0 execve(/root/bin/zfs, [zfs, create, -omountpoint=/tank/lxc/eee/rootfs, lxc/eee], [/* 31 vars */]) = -1 ENOENT (No such file or directory) execve(/usr/local/sbin/zfs, [zfs, create, -omountpoint=/tank/lxc/eee/rootfs, lxc/eee], [/* 31 vars */]) = -1 ENOENT (No such file or directory) execve(/usr/local/bin/zfs, [zfs, create, -omountpoint=/tank/lxc/eee/rootfs, lxc/eee], [/* 31 vars */]) = -1 ENOENT (No such file or directory) execve(/usr/sbin/zfs, [zfs, create, -omountpoint=/tank/lxc/eee/rootfs, lxc/eee], [/* 31 vars */]) = -1 ENOENT (No such file or directory) execve(/usr/bin/zfs, [zfs, create, -omountpoint=/tank/lxc/eee/rootfs, lxc/eee], [/* 31 vars */]) = -1 ENOENT (No such file or directory) execve(/sbin/zfs, [zfs, create, -omountpoint=/tank/lxc/eee/rootfs, lxc/eee], [/* 31 vars */]) = 0 brk(0) = 0x174d000 access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5a2b5a8000 access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=25408, ...}) = 0 mmap(NULL, 25408, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5a2b5a close(3)= 0 access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory) open(/lib/libnvpair.so.1, O_RDONLY|O_CLOEXEC) = 3 read(3, \177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\260\0\0\0\0\0\0@\0\0\0\0\0\0\0`\\1\0\0\0\0\0\0\0\0\0@\0008\0\7\0@\0\33\0\32\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,\30\1\0\0\0\0\0,\30\1\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\340\32\1\0\0\0\0\0\340\32!\0\0\0\0\0\340\32!\0\0\0\0\0x\6\0\0\0\0\0\0\210\6\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0\310\35\1\0\0\0\0\0\310\35!\0\0\0\0\0\310\35!\0\0\0\0\0\260\1\0\0\0\0\0\0\260\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0$\0\0\0\0\0\0\0$\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0P\345td\4\0\0\0d\352\0\0\0\0\0\0d\352\0\0\0\0\0\0d\352\0\0\0\0\0\0\244\10\0\0\0\0\0\0\244\10\0\0\0\0\0\0\4\0\0\0\0\0\0\0Q\345td\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\0\0\0\0R\345td\4\0\0\0\340\32\1\0\0\0\0\0\340\32!\0\0\0\0\0\340\32!\0\0\0\0\0 \5\0\0\0\0\0\0 \5\0\0\0\0\0\0\1\0\0\0\0\0\0\0\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\301\274\243#'\205\252\364Z\3069\365\355\f\235\201e\361
Re: [Lxc-users] lxc-create -B zfs
On 06/10/2013 03:41 PM, Serge Hallyn wrote: Quoting Tamas Papp (tom...@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. Thanks, tamas ps.: Can we make at least configurable the mountpoint, so it can be set to the root of the container? -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-create -B zfs
Quoting Tamas Papp (tom...@martos.bme.hu): On 06/10/2013 03:41 PM, Serge Hallyn wrote: Quoting Tamas Papp (tom...@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. Thanks, tamas 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/. -serge -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] lxc-create -B zfs
Quoting Tamas Papp (tom...@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'? -serge -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users