mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-01 16:17:52 +00:00
Search for lvm partitions on upgrade (#78)
This commit is contained in:
parent
fa9fe3177e
commit
5f26f80349
@ -304,6 +304,21 @@ func NewUpgradeSpec(cfg v1.Config) (*v1.UpgradeSpec, error) {
|
||||
}
|
||||
ep := v1.NewElementalPartitionsFromList(parts)
|
||||
|
||||
if ep.Recovery == nil {
|
||||
// We could have recovery in lvm which won't appear in ghw list
|
||||
ep.Recovery = utils.GetPartitionViaDM(cfg.Fs, constants.RecoveryLabel)
|
||||
}
|
||||
|
||||
if ep.OEM == nil {
|
||||
// We could have OEM in lvm which won't appear in ghw list
|
||||
ep.OEM = utils.GetPartitionViaDM(cfg.Fs, constants.OEMLabel)
|
||||
}
|
||||
|
||||
if ep.Persistent == nil {
|
||||
// We could have persistent encrypted or in lvm which won't appear in ghw list
|
||||
ep.Persistent = utils.GetPartitionViaDM(cfg.Fs, constants.PersistentLabel)
|
||||
}
|
||||
|
||||
if ep.Recovery != nil {
|
||||
if ep.Recovery.MountPoint == "" {
|
||||
ep.Recovery.MountPoint = constants.RecoveryDir
|
||||
|
Loading…
Reference in New Issue
Block a user