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

to-bcache fails #9

Open
squisher opened this issue Jan 28, 2014 · 4 comments
Open

to-bcache fails #9

squisher opened this issue Jan 28, 2014 · 4 comments

Comments

@squisher
Copy link

So I ran an offline conversion of a lvm volume to bcache before, but actually ran it on the console and couldn't copy and paste the failure. It did resize the ext4 fs, but then started to fail pretty quickly after that. If I try to re-run the process now, this is what I get:

(blocks)root@alucardo:/opt/blocks# bin/blocks to-bcache --join $(cat /root/cset.uuid) /dev/vg0/home
The filesystem (ext4) leaves enough room, no need to shrink it
Command ['dmsetup', 'remove', '--noudevsync', '--', 'synthetic-33181afa-87dd-11e3-9c3d-3085a99c4b04'] has failed with status 1
Standard output:

Standard error:
device-mapper: remove ioctl on synthetic-33181afa-87dd-11e3-9c3d-3085a99c4b04 failed: Device or resource busy
Command failed

Command ['dmsetup', 'remove', '--noudevsync', '--', 'rozeros-3317ad36-87dd-11e3-9c3d-3085a99c4b04'] has failed with status 1
Standard output:

Standard error:
device-mapper: remove ioctl on rozeros-3317ad36-87dd-11e3-9c3d-3085a99c4b04 failed: Device or resource busy
Command failed

Traceback (most recent call last):
  File "/usr/lib/python3.3/contextlib.py", line 248, in __exit__
    if cb(*exc_details):
  File "/usr/lib/python3.3/contextlib.py", line 200, in _exit_wrapper
    callback(*args, **kwds)
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 154, in <lambda>
    exit_stack.callback(lambda: quiet_call(cmd))
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 110, in quiet_call
    raise subprocess.CalledProcessError(proc.returncode, cmd, odat)
subprocess.CalledProcessError: Command '['dmsetup', 'remove', '--noudevsync', '--', 'synthetic-33181afa-87dd-11e3-9c3d-3085a99c4b04']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/blocks", line 9, in <module>
    load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')()
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 2012, in script_main
    sys.exit(main())
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 1678, in main
    return args.action(args)
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 1761, in cmd_to_bcache
    device=device, debug=args.debug, progress=progress, join=args.join)
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 1510, in lv_to_bcache
    synth_bdev = make_bcache_sb(pe_size, data_size, join)
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 1490, in make_bcache_sb
    assert bcache_backing.offset == bsb_size
  File "/usr/lib/python3.3/contextlib.py", line 55, in __exit__
    next(self.gen)
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 1286, in synth_device
    synth.writable_end_size = writable_end_size
  File "/usr/lib/python3.3/contextlib.py", line 263, in __exit__
    raise exc_details[1]
  File "/usr/lib/python3.3/contextlib.py", line 248, in __exit__
    if cb(*exc_details):
  File "/usr/lib/python3.3/contextlib.py", line 200, in _exit_wrapper
    callback(*args, **kwds)
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 154, in <lambda>
    exit_stack.callback(lambda: quiet_call(cmd))
  File "/opt/blocks/src/blocks/blocks/__main__.py", line 110, in quiet_call
    raise subprocess.CalledProcessError(proc.returncode, cmd, odat)
subprocess.CalledProcessError: Command '['dmsetup', 'remove', '--noudevsync', '--', 'rozeros-3317ad36-87dd-11e3-9c3d-3085a99c4b04']' returned non-zero exit status 1
@g2p
Copy link
Owner

g2p commented Feb 25, 2014

This might be due to udev being tricky to keep in sync.

@g2p
Copy link
Owner

g2p commented Feb 25, 2014

And you're running the version from after the #8 fix. This comment explains the problem. Which distribution and kernel are you using?

@cemeyer
Copy link

cemeyer commented Apr 6, 2014

I'm seeing device or resource busy with dmsetup calls as well.

Fedora 20 / Linux 3.13.8 / device-mapper 1.02.82. And lots of fun errors in dmesg:

[ +0.003284] Buffer I/O error on device dm-2, logical block 976754943
[ +0.006741] device-mapper: ioctl: unable to remove open device rozeros-acbc2810-bd20-11e3-9d9e-e83935f08fc4
[ +0.000550] Buffer I/O error on device dm-2, logical block 976754943
[Apr 5 17:18] quiet_error: 150 callbacks suppressed
[ +0.003500] Buffer I/O error on device dm-3, logical block 976754928
[ +0.001097] device-mapper: table: 253:4: linear: dm-linear: Device lookup failed
[ +0.000001] device-mapper: ioctl: error adding target to table
[ +0.010605] Buffer I/O error on device dm-3, logical block 976754928
[ +0.008106] Buffer I/O error on device dm-3, logical block 976754942
[ +0.004274] device-mapper: table: 253:4: linear: dm-linear: Device lookup failed
[ +0.000227] Buffer I/O error on device dm-3, logical block 976754942

@AaronOpfer
Copy link

I'm hitting this problem, and cannot make dmsetup remove work even after blocks exists, unless I stop bcache devices like this: for file in /sys/block/bcache*; do echo 1 > $file/bcache/stop; done. Of course, this doesn't really help blocks get any farther, though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants