Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dudyas6
Copy link
Contributor

@dudyas6 dudyas6 commented Aug 14, 2025

Problem
Starting with RHCOS 4.19 (possibly other newer kernels), optical drives and some loop devices report rotational=0, causing them to be misclassified as SSD.
RHCOS 4.19+:

lsblk -d -o name,rota
NAME  ROTA
loop0    0
loop1    0  
sda      1
sr0      0  ← CD-ROM incorrectly becomes SSD

RHCOS <= 4.18:

lsblk -d -o name,rota
NAME  ROTA
loop0    0
loop1    1
sda      1
sr0      1  ← CD-ROM correctly stays ODD

The fix
Only promote devices to SSD when they're actually HDD type devices

This is likely a general kernel behavior change, not RHCOS only, so the fix benefits all Linux distributions.

Possible impact
sr0 stays ODD (fixes the core issue)
loop stays Virtual
Non-rotational sd*/vd*/hd*/xvd* still can be promoted to SSD
nvme*/mmc* unchanged

Fixes sr0 incorrectly showing as SSD on RHCOS 4.19.

Signed-off-by: David Asulin <[email protected]>
Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks mate! :)

@jaypipes jaypipes merged commit 6633b10 into jaypipes:main Aug 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants