Merge pull request #1553 from Deixx/cleanup-umount
Fix mdadm --zero-superblock problem in cleanup
This commit is contained in:
commit
28bc75238b
@ -262,8 +262,8 @@ def base_prepare(item):
|
|||||||
disk_path in device.get_device_id(),
|
disk_path in device.get_device_id(),
|
||||||
[bd.get_device_id() for bd in TestRun.dut.disks])),
|
[bd.get_device_id() for bd in TestRun.dut.disks])),
|
||||||
raid.array_devices)):
|
raid.array_devices)):
|
||||||
raid.umount_all_partitions()
|
|
||||||
raid.remove_partitions()
|
raid.remove_partitions()
|
||||||
|
raid.unmount()
|
||||||
raid.stop()
|
raid.stop()
|
||||||
for device in raid.array_devices:
|
for device in raid.array_devices:
|
||||||
Mdadm.zero_superblock(posixpath.join('/dev', device.get_device_id()))
|
Mdadm.zero_superblock(posixpath.join('/dev', device.get_device_id()))
|
||||||
@ -277,11 +277,9 @@ def base_prepare(item):
|
|||||||
f"Serial for {disk.path} doesn't match the one from the config."
|
f"Serial for {disk.path} doesn't match the one from the config."
|
||||||
f"Serial from config {disk.serial_number}, actual serial {disk_serial}"
|
f"Serial from config {disk.serial_number}, actual serial {disk_serial}"
|
||||||
)
|
)
|
||||||
|
|
||||||
disk.umount_all_partitions()
|
|
||||||
Mdadm.zero_superblock(posixpath.join('/dev', disk.get_device_id()))
|
|
||||||
TestRun.executor.run_expect_success("udevadm settle")
|
|
||||||
disk.remove_partitions()
|
disk.remove_partitions()
|
||||||
|
disk.unmount()
|
||||||
|
Mdadm.zero_superblock(posixpath.join('/dev', disk.get_device_id()))
|
||||||
create_partition_table(disk, PartitionTable.gpt)
|
create_partition_table(disk, PartitionTable.gpt)
|
||||||
|
|
||||||
TestRun.usr.already_updated = True
|
TestRun.usr.already_updated = True
|
||||||
|
Loading…
Reference in New Issue
Block a user