Skip to main content
8 events
when toggle format what by license comment
Dec 7, 2022 at 0:35 history edited don_crissti CC BY-SA 4.0
added 659 characters in body
Jan 28, 2020 at 16:01 comment added arielf This works best for me, but it includes redundant/unwanted loop devices (e.g. due to Ubuntu snaps). A slight improvement is: lsblk -d -e 7 -o NAME,ROTA,DISC-MAX,MODEL which excludes loop devices + adds the model name (manufacturer) and disk capacity.
Dec 18, 2019 at 12:32 comment added crysman this one is better than unix.stackexchange.com/posts/65602/revisions because it lists all devices
Sep 14, 2016 at 20:45 comment added tuk0z lsblk reports "0" for all my good old SATA spinning HDDs here (ASROCK mobo). « some USB controllers don't tell that drive is actually non-rotational (for example, USB flash) » @dma_k this is so true --and better this way than the other way for USB wired external spinning HDDs IMHA.
Jun 8, 2016 at 18:01 comment added dma_k Actually I was looking into various ways because some USB controllers don't tell that drive is actually non-rotational (for example, USB flash) and there is no way in Linux to tell the truth. At the end of the day I have fixed that by creating the explicit rule in /etc/udev/rules.d/90-non-rotational.rules: ACTION=="add|change", SUBSYSTEMS=="usb", ENV{ID_SERIAL}=="SanDisk_Ultra_Fit_*-0:0", ATTR{queue/rotational}="0", ATTR{queue/scheduler}="deadline"
May 13, 2016 at 16:30 comment added user @dma_k Little wonder, considering it appears to use that one. Try it yourself: strace lsblk -d -o name,rota /dev/sda 2>&1 | grep --context=3 --color rotational
Oct 20, 2015 at 10:45 comment added dma_k That utility seems to report the same information as in /sys/block/.../rotational.
Sep 4, 2015 at 11:02 history answered don_crissti CC BY-SA 3.0