{"action":"created","issue":{"url":"https://api.github.com/repos/lxc/lxd/issues/1972","repository_url":"https://api.github.com/repos/lxc/lxd","labels_url":"https://api.github.com/repos/lxc/lxd/issues/1972/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/1972/comments","events_url":"https://api.github.com/repos/lxc/lxd/issues/1972/events","html_url":"https://github.com/lxc/lxd/issues/1972","id":151838126,"number":1972,"title":"Trouble when exporting a copying image (with lvm)","user":{"login":"aguytech","id":10972633,"avatar_url":"https://avatars.githubusercontent.com/u/10972633?v=3","gravatar_id":"","url":"https://api.github.com/users/aguytech","html_url":"https://github.com/aguytech","followers_url":"https://api.github.com/users/aguytech/followers","following_url":"https://api.github.com/users/aguytech/following{/other_user}","gists_url":"https://api.github.com/users/aguytech/gists{/gist_id}","starred_url":"https://api.github.com/users/aguytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguytech/subscriptions","organizations_url":"https://api.github.com/users/aguytech/orgs","repos_url":"https://api.github.com/users/aguytech/repos","events_url":"https://api.github.com/users/aguytech/events{/privacy}","received_events_url":"https://api.github.com/users/aguytech/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lxc/lxd/labels/Incomplete","name":"Incomplete","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-29T10:36:18Z","updated_at":"2016-05-01T20:58:05Z","closed_at":null,"body":"# Required information\r\n\r\n * Distribution: Ubuntu\r\n * Distribution version: 14.04\r\n * \"lxc info\"\r\n```\r\napicompat: 0\r\nauth: trusted\r\nenvironment:\r\n  addresses: []\r\n  architectures:\r\n  - x86_64\r\n  - i686\r\n  certificate: |\r\n  driver: lxc\r\n  driverversion: 1.1.5\r\n  kernel: Linux\r\n  kernelarchitecture: x86_64\r\n  kernelversion: 4.2.0-35-generic\r\n  server: lxd\r\n  serverpid: 1499\r\n  serverversion: 2.0.0\r\n  storage: lvm\r\n  storageversion: 2.02.98(2) (2012-10-15) / 1.02.77 (2012-10-15) / 4.33.0\r\nconfig:\r\n  images.auto_update_cached: \"true\"\r\n  images.auto_update_interval: \"24\"\r\n  images.remote_cache_expiry: \"10\"\r\n  storage.lvm_thinpool_name: LXDPool\r\n  storage.lvm_vg_name: ssd\r\n  storage.lvm_volume_size: 2G\r\npublic: false\r\n```\r\n# Issue description\r\nWhen I copy an image from images: and I export it I get just a file of meta data, no rootfs file.\r\nInstead if I create a container and publish it, When I export the image I get a correct unified file with meta & rootfs file\r\n\r\n**The export of image are made from lvm lv or file in /var/lib/lxd/images ?**\r\n\r\n# Steps to reproduce\r\n\r\ncopying image\r\n```\r\nroot@fx8320e:~$lxc image copy images:debian/jessie/amd64 local: --alias debian8 --auto-update\r\nImage copied successfully!\r\nroot@fx8320e:~$lxc image export debian8 /tmp\r\nOutput is in /tmp\r\n```\r\npublish a container\r\n```\r\nroot@fx8320e:~$lxc init debian8 debian-test\r\nCreating debian-test\r\nroot@fx8320e:~$lxc publish debian-test --alias=debian-test\r\nContainer published with fingerprint: 0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61\r\nroot@fx8320e:~$lxc image export debian-test /tmp\r\nOutput is in /tmp/0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61.tar.gz\r\n```\r\nlxc image list \r\n```\r\n+-------------+--------------+--------+----------------------------------------+--------+----------+-------------------------------+\r\n|    ALIAS    | FINGERPRINT  | PUBLIC |              DESCRIPTION               |  ARCH  |   SIZE   |          UPLOAD DATE          |\r\n+-------------+--------------+--------+----------------------------------------+--------+----------+-------------------------------+\r\n| debian-test | 0e0d9c34bbae | no     |                                        | x86_64 | 140.84MB | Apr 29, 2016 at 10:02am (UTC) |\r\n+-------------+--------------+--------+----------------------------------------+--------+----------+-------------------------------+\r\n| debian8     | a31bff875bbb | no     | Debian jessie (amd64) (20160428_22:42) | x86_64 | 104.07MB | Apr 29, 2016 at 9:58am (UTC)  |\r\n+-------------+--------------+--------+----------------------------------------+--------+----------+-------------------------------+\r\n```\r\nll /tmp\r\n```\r\n-rw-r--r--  1 root   root   147677065 avril 29 12:02 0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61.tar.gz\r\n-rw-------  1 root   root         736 avril 29 12:00 meta-a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c.tar.xz\r\n```\r\n\r\n# Information to attach\r\n\r\nThere are correct links to lvm lv; but a strange difference of size compare to lvm lv occupied size?\r\nll /var/lib/lxd/images/\r\n```\r\ntotal 250804\r\ndrwx------  2 root root      4096 avril 29 12:02 .\r\ndrwxr-xr-x 12 root root      4096 avril 29 12:02 ..\r\n-rw-r--r--  1 root root 147677065 avril 29 12:01 0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61\r\nlrwxrwxrwx  1 root root        73 avril 29 12:01 0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61.lv -> /dev/ssd/0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61\r\n-rw-r--r--  1 root root       736 avril 29 11:55 a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c\r\nlrwxrwxrwx  1 root root        73 avril 29 11:58 a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c.lv -> /dev/ssd/a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c\r\n-rw-r--r--  1 root root 109121916 avril 29 11:58 a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c.rootfs\r\n```\r\nlvdisplay /dev/ssd/0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61\r\n ```\r\n --- Logical volume ---\r\n  LV Path                /dev/ssd/0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61\r\n  LV Name                0e0d9c34bbae4164841c895efb131bc199c81d9f077d8ce5645c0e02cf070e61\r\n  VG Name                ssd\r\n  LV UUID                tcLSEe-UC2B-LRRr-kzxT-obFV-x2EM-mdTMPs\r\n  LV Write Access        read/write\r\n  LV Creation host, time fx8320e, 2016-04-29 12:01:57 +0200\r\n  LV Pool name           LXDPool\r\n  LV Status              available\r\n  # open                 0\r\n  LV Size                2,00 GiB\r\n  Mapped size            20,66%\r\n  Current LE             512\r\n  Segments               1\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     256\r\n  Block device           252:12\r\n```\r\n   \r\n```\r\nlvdisplay /dev/ssd/a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c\r\n  --- Logical volume ---\r\n  LV Path                /dev/ssd/a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c\r\n  LV Name                a31bff875bbb3ca36bf00564eaa018d6e03d5e83a15d939395b6e74758614b8c\r\n  VG Name                ssd\r\n  LV UUID                RYLeL7-XTY4-c3gw-rq9y-bJbW-QdJx-lzzIHU\r\n  LV Write Access        read/write\r\n  LV Creation host, time fx8320e, 2016-04-29 11:58:37 +0200\r\n  LV Pool name           LXDPool\r\n  LV Status              available\r\n  # open                 0\r\n  LV Size                2,00 GiB\r\n  Mapped size            20,66%\r\n  Current LE             512\r\n  Segments               1\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     256\r\n  Block device           252:10\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lxc/lxd/issues/comments/216072310","html_url":"https://github.com/lxc/lxd/issues/1972#issuecomment-216072310","issue_url":"https://api.github.com/repos/lxc/lxd/issues/1972","id":216072310,"user":{"login":"stgraber","id":2230599,"avatar_url":"https://avatars.githubusercontent.com/u/2230599?v=3","gravatar_id":"","url":"https://api.github.com/users/stgraber","html_url":"https://github.com/stgraber","followers_url":"https://api.github.com/users/stgraber/followers","following_url":"https://api.github.com/users/stgraber/following{/other_user}","gists_url":"https://api.github.com/users/stgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/stgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stgraber/subscriptions","organizations_url":"https://api.github.com/users/stgraber/orgs","repos_url":"https://api.github.com/users/stgraber/repos","events_url":"https://api.github.com/users/stgraber/events{/privacy}","received_events_url":"https://api.github.com/users/stgraber/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T20:58:05Z","updated_at":"2016-05-01T20:58:05Z","body":"To recap:\r\n\r\n - lxc image copy images:debian/jessie/amd64 local: --alias debian\r\n - lxc image export debian\r\n\r\nIs supposed to give you two tarballs as the image is in the unified format.\r\n\r\nIf then doing:\r\n\r\n - lxc init debian my-container\r\n - lxc publish my-container --alias my-image\r\n - lxc image export my-image\r\n\r\nYou will end up with a single file as the image generated as result of container publication is in the unified format."}}