Skip to content

Commit b569575

Browse files
adityageshCopilot
andcommitted
Update lisa/tools/fstab.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ae59029 commit b569575

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

lisa/tools/fstab.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,19 @@ def add_entry(
163163

164164
lsblk = self.node.tools[Lsblk]
165165
try:
166-
disk = lsblk.find_disk_by_mountpoint(mount_point, force_run=True)
167-
device = disk.device_name
166+
# Try to find partition first
167+
partition = lsblk.find_partition_by_mountpoint(mount_point, force_run=True)
168+
device = partition.device_name
168169
except LisaException:
169-
raise LisaException(
170-
f"Could not auto-detect device for mount point {mount_point}. "
171-
"Please provide device parameter."
172-
)
173-
170+
try:
171+
# Fall back to disk if partition not found
172+
disk = lsblk.find_disk_by_mountpoint(mount_point, force_run=True)
173+
device = disk.device_name
174+
except LisaException:
175+
raise LisaException(
176+
f"Could not auto-detect device for mount point {mount_point}. "
177+
"Please provide device parameter."
178+
)
174179
# Convert to UUID if requested
175180
device_str = device
176181
if use_uuid and device.startswith("/dev/"):

lisa/tools/kdump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ def _get_disk_dump_path(self) -> str:
10301030

10311031
# Fallback to /var/crash as last resort
10321032
dump_path = "/var/crash"
1033-
self._log.warning(
1033+
self._log.info(
10341034
f"Using default dump path {dump_path}. "
10351035
f"May not have sufficient space ({required_space_gb}GB required) "
10361036
"for vmcore file. Kdump may fail during crash dump."

0 commit comments

Comments
 (0)