g2p / blocks

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

to-lvm fails on Debian Jessie #29

Open JamesHarrison opened 8 years ago

JamesHarrison commented 8 years ago

Attempting to run to-lvm on a Jessie box, target is a regular partition (not logical) on a physical device.

# blocks to-lvm --vg-name array /dev/sdc1
Will shrink the filesystem (ext4) by 7319552 bytes
Checking the filesystem before resizing it
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
sleeperservice: 710213/976625664 files (1.8% non-contiguous), 3686020179/3906494203 blocks
Copying 4194304 bytes from pos 0 to pos 16000992935936... ok
Preparing LVM metadata... device-mapper: reload ioctl on synthetic-530aed8d-b63a-11e5-93f7-4439c4558050 failed: Invalid argument
Command failed
device-mapper: reload ioctl on synthetic-530aed8d-b63a-11e5-93f7-4439c4558050 failed: Invalid argument
Command failed
Traceback (most recent call last):
  File "/usr/local/bin/blocks", line 9, in <module>
    load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')()
  File "/home/james/src/blocks/blocks/__main__.py", line 2012, in script_main
    sys.exit(main())
  File "/home/james/src/blocks/blocks/__main__.py", line 1678, in main
    return args.action(args)
  File "/home/james/src/blocks/blocks/__main__.py", line 1886, in cmd_to_lvm
    synth_device(pe_size, device.size - pe_size))
  File "/usr/lib/python3.4/contextlib.py", line 283, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.4/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/home/james/src/blocks/blocks/__main__.py", line 1274, in synth_device
    exit_stack=st)
  File "/home/james/src/blocks/blocks/__main__.py", line 150, in mk_dm
    assert proc.returncode == 0, 'Report to https://github.com/g2p/blocks/issues/8 if you see this'
AssertionError: Report to https://github.com/g2p/blocks/issues/8 if you see this

As an aside, running this on the block device as suggested in the instructions causes this error:

# blocks to-lvm --vg-name array /dev/sdc
Unsupported superblock type: