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

Expose more information about blockdev usage on the D-Bus #298

Open
mulkieran opened this issue Apr 8, 2021 · 4 comments
Open

Expose more information about blockdev usage on the D-Bus #298

mulkieran opened this issue Apr 8, 2021 · 4 comments
Assignees

Comments

@mulkieran
Copy link
Member

Right now, we only expose one key, which represents total size. We would like to expose more information about blockdev usage via the FetchProperties interface.

@mulkieran
Copy link
Member Author

And we would like to be able to report it in the CLI.

@mulkieran mulkieran transferred this issue from stratis-storage/stratisd May 5, 2021
@mulkieran
Copy link
Member Author

In the CLI, it seems reasonable to report Total/Used/Free as we do in the pool listing.

@mulkieran
Copy link
Member Author

Blocked by #300

@mulkieran
Copy link
Member Author

Right now, stratisd can only recognize the new device size if it is brought down and then back up again. It also wouldn't be expected to work on pools with encrypted devices. So, we can only test a few simple things:

  1. Test that stratisd recognizes the new larger size.
    i. Create a new pool, unencrypted, with a least one device, a dm-raid device.
    ii. Verify that the real size and the size on the metadata are the same. In this case, the CLI will show just the one size.
    iii. Change the size of the dm-raid device so that it is larger by some amount.
    iv. Stop stratisd and restart it.
    v. Verify that the new size of the devices has been detected. The CLI should show both sizes when listing the devices.

  2. Test that stratisd refuses to create a pool if the device is smaller than the metadata specifies.
    i. Create a new pool, unencrypted, with a least one device, a dm-raid device.
    ii. Verify that the real size and the size on the metadata are the same. In this case, the CLI will show just the one size.
    iii. Change the size of the dm-raid device so that it is smaller by some amount.
    iv. Stop stratisd and restart it.
    v. Verify, using the report interface, that stratisd has put the set of devices into its errored pools field.

In both tests, inspect the stratisd logs. The liminal module reports, at the debug level, every occasion on which it picks up a relevant change event, and it probably will pick up a change event when the device's size changes. I think it also makes sense to run udevadm monitor when changing the device size to identify precisely the events that are detected. I believe that in the general case, though, we will not be able to rely on a udev change event to detect a device size change.

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

2 participants