commit b310077093fd567944c6a46b7d0adcabe1f2b4b9
Author: Mihnea Saracin <email address hidden>
Date: Sat May 22 18:19:54 2021 +0300
Fix resize of filesystems in puppet logical_volume
After system reinstalls there is stale data on the disk
and puppet fails when resizing, reporting some wrong filesystem
types. In our case docker-lv was reported as drbd when
it should have been xfs.
Reviewed: https:/ /review. opendev. org/c/starlingx /integ/ +/792723 /opendev. org/starlingx/ integ/commit/ b310077093fd567 944c6a46b7d0adc abe1f2b4b9
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit b310077093fd567 944c6a46b7d0adc abe1f2b4b9
Author: Mihnea Saracin <email address hidden>
Date: Sat May 22 18:19:54 2021 +0300
Fix resize of filesystems in puppet logical_volume
After system reinstalls there is stale data on the disk
and puppet fails when resizing, reporting some wrong filesystem
types. In our case docker-lv was reported as drbd when
it should have been xfs.
This problem was solved in some cases e.g: /opendev. org/starlingx/ stx-puppet/ src/branch/ master/ puppet- manifests/ src/modules/ platform/ manifests/ filesystem. pp#L146
when doing a live fs resize we wipe the last 10MB
at the end of partition:
https:/
Our issue happened here: /opendev. org/starlingx/ stx-puppet/ src/branch/ master/ puppet- manifests/ src/modules/ platform/ manifests/ filesystem. pp#L65
https:/
Resize can happen at unlock when a bigger size is detected for the
filesystem and the 'logical_volume' will resize it.
To fix this we have to wipe the last 10MB of the partition after the
'lvextend' cmd in the 'logical_volume' module.
Tested the following scenarios:
B&R on SX with default sizes of filesystems and cgts-vg.
B&R on SX with with docker-lv of size 50G, backup-lv also 50G and
cgts-vg with additional physical volumes:
- name: cgts-vg
physicalVolume s: by-path/ pci-0000: 00:0d.0- ata-1.0 by-path/ pci-0000: 00:0d.0- ata-1.0 by-path/ pci-0000: 00:0d.0- ata-3.0
- path: /dev/disk/
size: 50
type: partition
- path: /dev/disk/
size: 30
type: partition
- path: /dev/disk/
type: disk
B&R on DX system with backup of size 70G and cgts-vg
with additional physical volumes:
physicalVol umes: by-path/ pci-0000: 00:0d.0- ata-1.0 by-path/ pci-0000: 00:0d.0- ata-1.0 by-path/ pci-0000: 00:0d.0- ata-3.0
- path: /dev/disk/
size: 50
type: partition
- path: /dev/disk/
size: 30
type: partition
- path: /dev/disk/
type: disk
Closes-Bug: 1926591 2e40c2e5e276ec1 7015d9bba44
Change-Id: I55ae6954d24ba3
Signed-off-by: Mihnea Saracin <email address hidden>