You are not logged in.
On most of my Arch boxes, calling `lsblk -f` results in an alpha sorted list of partitions, ie (sda1, sda2, sda3 etc). Recently however, the order is not as such. Others? Why?
Example: sda4, sda2, sda5, sda3, sda1, sda6 and nvme0n1p5, nvme0n1p3, nvme0n1p1, nvme0n1p6, nvme0n1p4, nvme0n1p2
Last edited by graysky (2016-10-24 19:58:37)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Wild guess here based off of one data point at my end: are they in order by UUID?
More importantly though, does it matter? Just add '-x NAME' or '-x KNAME' if you want them sorted by block device name.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
mine are also out of order. possible update bug? i last updated on 2016-10-20. was fine before.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdd 8:48 0 111.8G 0 disk
├─sdd2 8:50 0 111.3G 0 part
└─sdd1 8:49 0 487M 0 part
sdb 8:16 0 111.8G 0 disk
├─sdb2 8:18 0 110.8G 0 part /
└─sdb1 8:17 0 1G 0 part /boot
sr0 11:0 1 1024M 0 rom
sde 8:64 0 1.8T 0 disk
├─sde2 8:66 0 1.8T 0 part
└─sde1 8:65 0 128M 0 part
sdc 8:32 0 111.8G 0 disk
├─sdc2 8:34 0 1K 0 part
├─sdc5 8:37 0 15.9G 0 part
└─sdc1 8:33 0 95.9G 0 part
sda 8:0 0 238.5G 0 disk
├─sda4 8:4 0 237.9G 0 part
├─sda2 8:2 0 99M 0 part
├─sda3 8:3 0 16M 0 part
└─sda1 8:1 0 450M 0 part
Offline
A bug is when software behaves contrary to how it is supposed to. There is no indication of that there. Did you bother checking the UUIDs of your partitions - you have ample to provide good evidence for or against my hypothesis.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
doesnt look to be in uuid order
NAME FSTYPE LABEL UUID MOUNTPOINT
sdd
├─sdd2 ext4 e57ac59d-6ebf-4e5e-a9d7-5b3d54bc6306
└─sdd1 vfat 1101-F7B1
sdb
├─sdb2 ext4 f806c238-1bf9-43cd-90a9-612261e04c62 /
└─sdb1 vfat 3F7C-ACA4 /boot
sr0
sde
├─sde2 ntfs Share 363A81183A80D671
└─sde1
sdc
├─sdc2
├─sdc5 swap 76583176-352d-4b74-ab61-8507db4a5c36
└─sdc1 ext4 8b9f7c80-e02d-42db-9139-04c55036bc28
sda
├─sda4 ntfs D69E8E3B9E8E1461
├─sda2 vfat 0C87-F884
├─sda3
└─sda1 ntfs Recovery CCF48766F487519E
Offline
I have the same problem, I think it's since the kernel 4.8 update.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sda 8:0 0 465.8G 0 disk
├─sda2 8:2 0 440.8G 0 part /home
└─sda1 8:1 0 25G 0 part /
I installed kubuntu 16.10 on some other computer recently with a kernel 4.8 and it's the same.
Offline
I have the same problem.
Problem? Why is this a problem? Again this is not a bug, problem, or any other negative thing. There is nothing in lsblk's intended behavior that states the output will be sorted by the block device name unless you add the sort flag to do just this. The sort flag works as intended. I am mildly curious what does determine the default ordering - but it is a curiosity to be sated, not a problem to be fixed.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
It seems to be determined by partition size for me.
Edit: Looking back at others output, though, it doesn't.
Last edited by Scimmia (2016-10-24 13:38:12)
Offline
So... I asked LKML and they'll fix it in v2.29!
Glory to kzak from Redhat!
Last edited by Inan (2016-10-24 19:08:40)
arch~awesome~zsh~urxvt | Intel i7-6700K / Nvidia GTX 1080 / Samsung SSD 960 EVO M.2 PCIe NVMe 250 Go
Offline
As a comparison, show us "fdisk -l".
Last edited by rdeckard (2016-10-24 19:50:15)
Offline
So... I asked LKML and they'll fix it in v2.29!
Glory to kzak from Redhat!
Great thanks for taking point on this! I knew I wasn't crazy.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Great thanks for taking point on this! I knew I wasn't crazy.
Isn't this a classic case of affirming the consequent?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
graysky wrote:Great thanks for taking point on this! I knew I wasn't crazy.
Isn't this a classic case of affirming the consequent?
Ha! I'm crazy for other reasons...
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
varphi wrote:I have the same problem.
Problem? Why is this a problem? Again this is not a bug, problem, or any other negative thing. There is nothing in lsblk's intended behavior that states the output will be sorted by the block device name unless you add the sort flag to do just this. The sort flag works as intended. I am mildly curious what does determine the default ordering - but it is a curiosity to be sated, not a problem to be fixed.
It's a mystery.
Offline
I just built 2.29 but it doesn't appear as though the fix was not included...
Last edited by graysky (2016-11-19 12:03:31)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline