Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxc-copy isn't operable in '--snapshot' mode + LVM thin provisioning #968

Open
vbaskoff opened this issue Apr 13, 2016 · 2 comments
Open
Labels
Bug Confirmed to be a bug

Comments

@vbaskoff
Copy link

ENV: OracleLinux 7.2 + rpm built using .spec from source tarball

sudo lxc-copy --version
2.0.0

Branched from issue #807

lxc-copy fails to copy base container on top of LVM thin provisioned volume.

STR:
0. sudo lxc-create --name=template --bdev=lvm --vgname=lxdata --thinpool=lxpool --fssize=15G --template=./template/lxc-lxsys.sh -- --target-mr=55.0 --storage-url=ftp://md.intra/

  1. sudo lxc-copy --name='template' --newname='config+log' --snapshot -B lvm --logpriority='DEBUG' --logfile='./copy.log'

cat ./copy.log
lxc-copy 20160413141629.413 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/template'->'/var/lib/lxc/template/rootfs' with fstype 'xfs'
lxc-copy 20160413141629.423 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: Invalid argument
lxc-copy 20160413141629.423 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/template'->'/var/lib/lxc/template/rootfs' with fstype 'ext4'
lxc-copy 20160413141629.432 INFO bdev - bdev/bdev.c:find_fstype_cb:918 - mounted '/dev/lxdata/template' on '/var/lib/lxc/template/rootfs', with fstype 'ext4'
lxc-copy 20160413141629.446 INFO bdev - bdev/bdev.c:detect_fs:659 - detected fstype ext4 for /dev/lxdata/template
lxc-copy 20160413141629.603 INFO lxc_container - lxccontainer.c:copy_file:2622 - Error stat'ing /var/lib/lxc/template/lxc_rdepends
lxc-copy 20160413141629.603 INFO lxc_container - lxccontainer.c:copy_rdepends:2781 - Error copying reverse dependencies
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'xfs'
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'ext4'
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'ext3'
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'ext2'
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'iso9660'
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: Permission denied
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'vfat'
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.617 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'hfs'
lxc-copy 20160413141629.620 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such device
lxc-copy 20160413141629.620 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'hfsplus'
lxc-copy 20160413141629.623 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such device
lxc-copy 20160413141629.623 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype '*'
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such device
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'xfs'
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'ext3'
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'ext2'
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'ext4'
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'iso9660'
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: Permission denied
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:902 - trying to mount '/dev/lxdata/config+log'->'/usr/lib64/lxc/rootfs' with fstype 'vfat'
lxc-copy 20160413141629.626 DEBUG bdev - bdev/bdev.c:find_fstype_cb:910 - mount failed with error: No such file or directory
lxc-copy 20160413141629.626 ERROR bdev - bdev/bdev.c:mount_unknown_fs:780 - failed to determine fs type for '/dev/lxdata/config+log'
lxc-copy 20160413141629.732 INFO lxc_container - lxccontainer.c:container_destroy:2379 - Destroyed rootfs for config+log
lxc-copy 20160413141629.732 INFO lxc_container - lxccontainer.c:container_destroy:2395 - Destroyed directory for config+log

@vbaskoff
Copy link
Author

I have managed to workaround this via setting 'auto_set_activation_skip = 0' in '/etc/lvm/lvm.conf' (many thanks to @lxnt for hint)
Details in #807

@hallyn
Copy link
Member

hallyn commented Apr 18, 2016

Yeah, the thinpool code went into lxc in 2013, near as i can tell the activation_skip code went into lvm in 2014. Lxc should just try to set that (and ignore failure - i.e. older lvm)

@stgraber stgraber added the Bug Confirmed to be a bug label Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Development

No branches or pull requests

3 participants