Skip to content

Commit

Permalink
Search for lvm partitions on upgrade (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Jul 7, 2023
1 parent fa9fe31 commit 5f26f80
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/elementalConfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f26f80

Please sign in to comment.