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

wrong assumption on meta dev size #58

Open
simonxuhao opened this issue Oct 9, 2019 · 0 comments
Open

wrong assumption on meta dev size #58

simonxuhao opened this issue Oct 9, 2019 · 0 comments

Comments

@simonxuhao
Copy link

Document says "A metadata dev of 1G, and data dev of 4G is sufficient.", but it doesn't work with a 1G meta dev (/dev/loop0) and a 4G data dev (/dev/loop1):

BasicTests_dd_benchmark.log:

D, [2019-10-09T16:28:13.757995 #9853] DEBUG -- : executing: 'blockdev --getsz /dev/loop0'
D, [2019-10-09T16:28:13.764555 #9853] DEBUG -- : stdout:
    2097152
D, [2019-10-09T16:28:13.764749 #9853] DEBUG -- : executing: 'dd if=/dev/zero of=/dev/loop0 bs=512 count=8 seek=0'
D, [2019-10-09T16:28:13.771620 #9853] DEBUG -- : stderr:
    8+0 records in
    8+0 records out
    4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00396838 s, 1.0 MB/s
D, [2019-10-09T16:28:13.771764 #9853] DEBUG -- : executing: 'blockdev --getsz /dev/loop1'
D, [2019-10-09T16:28:13.782728 #9853] DEBUG -- : stdout:
    8388608
D, [2019-10-09T16:28:13.783069 #9853] DEBUG -- : executing: 'dmsetup create test-dev-389767 --notable'
D, [2019-10-09T16:28:13.793071 #9853] DEBUG -- : writing table: <<table:0 20971520 thin-pool /dev/loop0 /dev/loop1 128 0 0>>
D, [2019-10-09T16:28:13.793230 #9853] DEBUG -- : executing: 'dmsetup load test-dev-389767 /tmp/dm-table20191009-9853-55ionb'
D, [2019-10-09T16:28:13.818950 #9853] DEBUG -- : stderr:
    device-mapper: reload ioctl on test-dev-389767  failed: Invalid argument
    Command failed.
D, [2019-10-09T16:28:13.819051 #9853] DEBUG -- : command failed with 'pid 9881 exit 1': dmsetup load test-dev-389767 /tmp/dm-table20191009-9853-55ionb

It seems that the code ignores the size of data dev returned by blockdev and just assumes that it is at least 10 times the size of meta dev? If so, the document and/or the code should be updated.

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

1 participant