stratisd
stratisd copied to clipboard
Need ability to handle duplicate pool UUIDs
If a user clones a disk drive that has a stratis superblock on it and tries to use both on the same system we will have an issue where we have duplicate UUIDs. We need to be able to allow the user to correct the situation without resorting to destroying and re-creating a pool on one or more devices. This is related to https://github.com/stratis-storage/stratisd/issues/272
This will be complicated by the fact that the pool UUID and pool name will be identical for each of the stratis pools.
An example
# blkid -p /dev/sdg
/dev/sdg: UUID="ae105f754c6d4086b6315da3716c7aa8" POOL_UUID="1e8122c33265494091cd576d50c2afed" BLOCKDEV_SECTORS="4194304" BLOCKDEV_INITTIME="1553896265" TYPE="stratis" USAGE="raid"
# blkid -p /dev/sdh
/dev/sdh: UUID="ae105f754c6d4086b6315da3716c7aa8" POOL_UUID="1e8122c33265494091cd576d50c2afed" BLOCKDEV_SECTORS="4194304" BLOCKDEV_INITTIME="1553896265" TYPE="stratis" USAGE="raid"
# /usr/libexec/stratisd --debug
DEBUG libstratis::stratis::buff_log: BuffLogger: pass_through: true hold time: none
INFO stratisd: Using StratEngine
WARN libstratis::engine::strat_engine::engine: no pool set up, reason: Engine(Error, "failed to set up pool for (pool UUID: 1e8122c3-3265-4940-91cd-576d50c2afed, devnodes: /dev/sdg ,/dev/sdh): reason: Engine(Invalid, \"The following list of Stratis UUIDs were each claimed by more than one Stratis device: ae105f754c6d4086b6315da3716c7aa8\")")
DEBUG stratisd: Engine state:
StratEngine {
pools: {},
incomplete_pools: {
1e8122c3-3265-4940-91cd-576d50c2afed: {
Device {
major: 8,
minor: 96
}: "/dev/sdg",
Device {
major: 8,
minor: 112
}: "/dev/sdh"
}
},
watched_dev_last_event_nrs: {}
}
INFO stratisd: DBUS API is now available
This issue will also occur if stratis is used in a cloud environment where VMs are provisioned. In these cases all devices will appear to be identical with same device UUID and pool UUIDs. This will cause an issue if a VM is configured to use storage from a different VM as existing storage and storage that is newly attached to it will appear identical from a stratis identification standpoint.
The idea is that we have VM_0
, VM_1
, and VM_2
. VM_1
and VM_2
are clones of VM_0
. Stratis is being run in the VM. As a consequence the Stratis pools and devices in VM_1
and VM_2
have exactly the same identifiers. If VM_2
gets VM_1
's Stratis-owned block devices, then they will look identical.
There are many relevant situations here, of which the one at setup is only one. For example, the doppelganger devices could be added when the first pool is already up. In that case, the second pool will not be brought up because it is a duplicate pool, I would believe.