swap is not discovered for nvme devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
casper (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
scripts/
I've got a patch that rejigs the logic slightly so that if /dev/[hsv]
It also makes it a little more robust so we don't have to loop twice, or consider variable scoping for the $devices variable, by removing it's usage after the first for loop.
---
diff --git a/scripts/
index 2ca15d0..e71d1a3 100755
--- a/scripts/
+++ b/scripts/
@@ -26,8 +26,9 @@ esac
log_begin_msg "$DESCRIPTION"
-devices=""
-for device in /dev/[hsv]
+devices=$(find /dev -iname "[hsv]d[a-z][0-9]*" -o -iname "nvme[0-
+
+for device in $devices; do
if ! [ -b "$device" ]; then
continue
fi
@@ -37,13 +38,8 @@ for device in /dev/[hsv]
magic=
if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]; then
-# log "Found $device"
- devices="$devices $device"
- fi
-done
-
-for device in $devices; do
- swapon $device || true
+ swapon $device || true
+ fi
done
log_end_msg
The attachment "enable nvme swap discovery/usage, make the discovery logic/execution more robust" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]