-
Notifications
You must be signed in to change notification settings - Fork 86
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
WIP: Initial Stratis support #915
WIP: Initial Stratis support #915
Conversation
STRATIS_MANAGER_INTF = STRATIS_SERVICE + ".Manager" | ||
|
||
|
||
STRATIS_FS_SIZE = Size("1 TiB") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we expect this to be always 1 TiB? We need the size just for the initial device scan, it is later updated from sysfs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, you can expect this to always start as 1 TiB. It will grow if the physical storage available is greater than 1 TiB and the filesystem fills up. Stratis automatically extends the filesystem size when it fills up. Currently, resizing will double the filesystem size.
blivet/devicelibs/stratis.py
Outdated
STRATIS_POOL_INTF = STRATIS_SERVICE + ".pool" | ||
STRATIS_FILESYSTEM_INTF = STRATIS_SERVICE + ".filesystem" | ||
STRATIS_BLOCKDEV_INTF = STRATIS_SERVICE + ".blockdev" | ||
STRATIS_PROPS_INTF = STRATIS_SERVICE + ".FetchProperties" | ||
STRATIS_MANAGER_INTF = STRATIS_SERVICE + ".Manager" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes about the interface design that we have. Because we try to be as backwards compatible as possible, these interface names should still be available in Stratis v2.x, but just a note that these are the oldest interfaces available. These will probably need to be updated as new Fedora releases include later versions of stratisd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jbaublitz is correct. You'll generally want the most recent revision for the version of stratisd that is available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used these interfaces mostly because I didn't need any properties from the newer revisions, but I'll try to use the newest interfaces in the future.
I'll do a more thorough look through after I've discussed with the team, but this overall looks like a really good starting point! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine!
51125a2
to
58b750a
Compare
58b750a
to
c187d08
Compare
Currently only Stratis private devices are being ignored.
c187d08
to
71e92da
Compare
005d168
to
f0ce2bf
Compare
I've pushed an updated version which includes a special class for the XFS filesystem on Stratis -- it's basically XFS with |
f0ce2bf
to
929d221
Compare
New StratisBlockdev format and two new devices StratisPoolDevice and StratisFilesystemDevice has been added. Stratis devices are populated using data from Stratis DBus API (cached in static_data.stratis_info).
We are ignoring a lot of stratis private device mapper devices now so we can no longer use libblockdev DM plugin to remove Stratis storage stack and we need to use Stratis DBus API instead.
Stratis block device UUID may not be in the RFC 4122 format, uuid library will always convert to a correct format.
devicelibs.stratis uses stratis_info so we can't import constants from it here without breaking Python.
This will allow us handling the XFS filesystem on Stratis in a better way to avoid creating and removing it separately (it should be created and removed automatically together with the Stratis filesystem block device).
929d221
to
95df74d
Compare
Locked pools are tricky because Stratis uses LUKS but the "Stratis LUKS devices" can't be unlocked with cryptsetup, only with Stratis API. This implementation "hides" the LUKS device for locked pools and use the StratisBlockdev format for them instead. To unlock a locked pool, unlock_pool() function of the StratisBlockdev format must be used.
95df74d
to
dfe83f8
Compare
I've pushed (I hope) last version of the encrypted pools support and this should be now ready for review. The only missing part (I know about) is the size limits/free space calculation for pools. Stratis team is working on a tool that will allow us to calculate these limits for non-existing pools (see stratis-storage/stratisd#2513). With the encrypted pools support, I've tried to hide as much of the internal structure as possible. For both locked and unlocked pools, the LUKS format and device are hidden and internally we pretend the LUKS device is actually a Stratis block device Unlocked pool:
Locked pool:
This makes populator helpers for stratis and LUKS a little bit messy but I think it's worth it and makes the stratis encrypted devices easier to present to users. I'm also working on blivet-gui support for Stratis (storaged-project/blivet-gui#277) to test these changes and also to make sure the API makes sense from the user point of view. |
This adds just a basic support for Stratis devices. Information about stratis blokdevs, pools and filesystems is gathered using the Stratis DBus API. I've added two new devices (
StratisFilesystemDevice
andStratisPoolDevice
) and a new format (StratisBlockdev
) with just few stratis specific properties for now. This is definitely not finished, I'm posting it here just to get some feedback about the "design" decisions, naming etc.Stratis devices in devicetree
Stratis filesystem device
Stratis pool device