diff --git a/pkg/storage/filesystem/btrfs.go b/pkg/storage/filesystem/btrfs.go index 71d712925..03bcba420 100644 --- a/pkg/storage/filesystem/btrfs.go +++ b/pkg/storage/filesystem/btrfs.go @@ -53,7 +53,7 @@ func (p *btrfsPool) Device() DeviceInfo { } func (p *btrfsPool) prepare() error { - p.name = p.device.Label + p.name = p.device.UUID if p.device.Used() { // device already have filesystem return nil diff --git a/pkg/storage/filesystem/device.go b/pkg/storage/filesystem/device.go index 0808377c6..a39108884 100644 --- a/pkg/storage/filesystem/device.go +++ b/pkg/storage/filesystem/device.go @@ -57,6 +57,7 @@ type DeviceInfo struct { Filesystem FSType `json:"fstype"` Rota bool `json:"rota"` Subsystems string `json:"subsystems"` + UUID string `json:"uuid"` Children []DeviceInfo `json:"children,omitempty"` } @@ -168,7 +169,7 @@ func (l *lsblkDeviceManager) lsblk(ctx context.Context) ([]DeviceInfo, error) { args := []string{ "--json", "-o", - "PATH,NAME,SIZE,SUBSYSTEMS,FSTYPE,LABEL,ROTA", + "PATH,NAME,SIZE,SUBSYSTEMS,FSTYPE,LABEL,ROTA,UUID", "--bytes", "--exclude", "1,2,11", diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index cbaa6ec42..f7100df6d 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -36,8 +36,6 @@ const ( cacheGrowPercent = 60 cacheShrinkPercent = 20 cacheCheckDuration = 5 * time.Minute - - PXELABEL = "ZOSPXE" ) var ( @@ -201,7 +199,7 @@ func (s *Module) mountPool(device filesystem.DeviceInfo, vm bool) { log.Debug().Str("path", device.Path).Msg("mounting device") if device.IsPXEPartition() { - log.Error().Str("device", device.Path).Msg("device has 'zospxe' label") + log.Info().Str("device", device.Path).Msg("device has 'ZOSPXE' label") s.brokenDevices = append(s.brokenDevices, pkg.BrokenDevice{Path: device.Path, Err: fmt.Errorf("device is a PXE partition")}) return }