g2p / blocks

Enable bcache or LVM on existing block devices
GNU General Public License v3.0
375 stars 43 forks source link

Unix.Unix_error(20, "lstat", "/usr/lib/libept.so.1.0.5.4.12") #22

Closed mvysny closed 9 years ago

mvysny commented 9 years ago

I managed to install python3-blocks from your PPA on Ubuntu 14.04.2, but it fails:

$ sudo blocks to-bcache --maintboot /dev/sda3 --join a6af9363-8e5f-46c5-831c-4476731ed7e7 Fatal error: exception Unix.Unix_error(20, "lstat", "/usr/lib/libept.so.1.0.5.4.12") Traceback (most recent call last): File "/usr/bin/maintboot", line 86, in script_main() File "/usr/bin/maintboot", line 82, in script_main sys.exit(main()) File "/usr/bin/maintboot", line 53, in main [sm_cmd] + '--names --use-installed -o'.split() + [smd] + args.pkgs) File "/usr/lib/python3.3/subprocess.py", line 547, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['supermin', '--names', '--use-installed', '-o', '/tmp/maintboot.873mar/supermin.d', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools']' returned non-zero exit status 2 Traceback (most recent call last): File "/usr/bin/blocks", line 9, in load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')() File "/usr/lib/python3/dist-packages/blocks/main.py", line 2002, in script_main sys.exit(main()) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1668, in main return args.action(args) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1748, in cmd_to_bcache device, 'to-bcache', debug=args.debug, join=args.join) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1770, in call_maintboot

mvysny commented 9 years ago

Ok, tried sudo ln -s /usr/lib/x86_64-linux-gnu/libept.so.1.aptpkg4.12 /usr/lib/libept.so.1.0.5.4.12 now I have exception Unix.Unix_error(20, "lstat", "/etc/init/hwclock-save.conf")

mvysny commented 9 years ago

Ok, tried sudo ln -s /etc/init/hwclock.conf /etc/init/hwclock-save.conf now I have: $ sudo blocks to-bcache --maintboot /dev/sda3 --join a6af9363-8e5f-46c5-831c-4476731ed7e7 supermin-helper: failed to find a suitable kernel. I looked for kernels in /boot and modules in /lib/modules. If this is a Xen guest, and you only have Xen domU kernels installed, try installing a fullvirt kernel (only for supermin use, you shouldn't boot the Xen guest with it). Traceback (most recent call last): File "/usr/bin/maintboot", line 86, in script_main() File "/usr/bin/maintboot", line 82, in script_main sys.exit(main()) File "/usr/bin/maintboot", line 65, in main tdir + '/kernel', tdir + '/initramfs']) File "/usr/lib/python3.3/subprocess.py", line 547, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['supermin-helper', '--', '/tmp/maintboot.5wh0o7/supermin.d', 'x86_64', '/tmp/maintboot.5wh0o7/kernel', '/tmp/maintboot.5wh0o7/initramfs']' returned non-zero exit status 1 Traceback (most recent call last): File "/usr/bin/blocks", line 9, in load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')() File "/usr/lib/python3/dist-packages/blocks/main.py", line 2002, in script_main sys.exit(main()) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1668, in main return args.action(args) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1748, in cmd_to_bcache device, 'to-bcache', debug=args.debug, join=args.join) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1770, in call_maintboot

mvysny commented 9 years ago

Interestingly, the /boot/vmlinuz* file is missing on ubuntu live USB

$ sudo apt-get install linux-image-3.13.0-48-generic $ sudo /usr/sbin/update-initramfs.distrib -u -k all $ sudo apt-get install kexec-tools

mvysny commented 9 years ago

I MADE IT!!! :-D I have installed bcache on an encrypted disk (root on lvm on encrypted volume).

I tried to use --maintboot on live cd which was NOT NECESSARY.

So.

  1. Boot Ubuntu 14.04.2 LTS from CD or USB
  2. sudo add-apt-repository ppa:fkrull/deadsnakes # adds python3.3
  3. sudo add-apt-repository ppa:g2p/storage
  4. sudo apt-get update
  5. sudo apt-get install python3-blocks bcache-tools
  6. sudo make-bcache -C /dev/sdb1 # SSD
  7. ctrl+alt+f4 and sudo /etc/init.d/lightdm stop # this fixes later issues with bcache and dmsetup, probably unity auto-mounts the lvm or something
  8. sudo blocks to-bcache /dev/sda3 --join cset-uuid # /dev/sda3 = encrypted volume
  9. reboot
  10. cat /sys/block/bcache0/bcache/stats_day/* # should return numbers indicating that the bcache0 is actually used;
  11. sudo dmsetup ls --tree -o blkdevname # should show that a LV is on an encrypted volume, which is in turn on a bcache0