Skip to content

Instantly share code, notes, and snippets.

@joseivanlopez
Last active September 14, 2021 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joseivanlopez/5cec4ad77df38b2e53ef7c9a5950361e to your computer and use it in GitHub Desktop.
Save joseivanlopez/5cec4ad77df38b2e53ef7c9a5950361e to your computer and use it in GitHub Desktop.

Which one best describes the disks layout?

Screenshot from 2021-09-14 11-51-27

Screenshot from 2021-09-14 11-50-44

@shundhammer
Copy link

shundhammer commented Sep 14, 2021

From IRC:

[13:08:24] <jilopez> guys, I was thinking about why sometimes I am not able to easily understand a disk layout from the list of devices in the Partitioner. What do you think about this? https://gist.github.com/joseivanlopez/5cec4ad77df38b2e53ef7c9a5950361e
[13:10:43] <ancorgs> maybe I'm just too used, but I prefer the first one
[13:11:49] <HuHa> +1
[13:11:58] <dgdavid> ancorgs: It's hard to choose, but I'd say second one is more useful at first glance
[13:12:22] <HuHa> in those tree views, it's common to have some ID-like thing in the first column and the type in a later column
[13:12:29] <dgdavid> ancorgs: HuHa: it gives me more information about my devices
[13:12:30] <jilopez> ancorgs: the point is that the nesting in sda* says nothing to me. With the second option I easily see how the disk is structured with extended partitions and so on
[13:12:39] <HuHa> otherwise you don't have a chance to orient yourself which is which
[13:12:49] <dgdavid> jilopez: +1
[13:13:07] <HuHa> in my machine here, I have 2 rotating disks and 1 SSD with a lot of partitions on each
[13:13:41] <HuHa> just "ext4" in the first column doesn't tell me anything
[13:13:46] <jilopez> HuHa: the list could show the technoloy or something instead of simply Disk
[13:14:22] <HuHa> if the device is only in the 3rd column, it's really just an afterthought
[13:14:24] <dgdavid> jilopez: ancorgs: HuHa: what about having both views? 
[13:14:35] <HuHa> can't you simply move columns around?
[13:14:44] <HuHa> (not sure if we disabled that)
[13:15:54] <jilopez> HuHa: yes, they can be moved but the first one cannot
[13:16:20] <HuHa> in every tree everywhere you never only have the TYPE of an item in the first column
[13:16:39] <HuHa> you might have the type implicitly as an icon, but never as the only content of the first column
[13:17:31] <jilopez> HuHa: Type is only a name. The column actually shows something like a "human" description
[13:17:31] <HuHa> https://paste.pics/DV7VM   <-- my disks
[13:17:47] <HuHa> it's not at all human one way or the other
[13:18:07] <jilopez> HuHa: for me, the content of that "Type" column together with nesting makes me easily to see the structure
[13:18:08] <HuHa> you either have a kernel device name or an abbreviated filesystem type or a partition size
[13:18:19] <HuHa> look at my screenshot
[13:18:32] <HuHa> now imagine the first column would be all those "ext4"
[13:18:36] <HuHa> that's completely pointless
[13:19:14] <HuHa> even if there was another indentation level for the disks
[13:20:31] <HuHa> https://paste.pics/DV7X5  my "open directory" dialog with a slightly different approach
[13:20:44] <jilopez> HuHa: I don't see it pointless. For me, it is more informative to see Disk (samsung ...) -> Ext4 Partition -> Ext4 Partition 
[13:21:01] <HuHa> here it's the combination of mount point, size and filesystem type that is used to identify a partition
[13:21:31] <HuHa> how many users even know what type of disk they have? and what if you have several from the same maker (which is common)?
[13:22:02] <HuHa> also remember that this is an expert tool - dumbing it down too much so only newbies can use it would be counterproductive
[13:22:12] <jilopez> but the user cannot identify the disk only with the sda name
[13:22:41] <HuHa> those device names give you information (a) on what disk it is (b) what partition number it is
[13:22:54] <HuHa> which both are really essential pieces of information when it comes to partitioning
[13:25:43] <jilopez> yes, and you will not lose that information. The point is that at first sight, I would have more possibilities to identify my disk if I see the e.g. model of my disk and the type of partitions it contains, instead of sda with nesting sda1, sda2
[13:25:48] <HuHa> https://paste.pics/DV80H
[13:26:04] <HuHa> I wouldn't even know the models of my disks
[13:29:38] <HuHa> also, imagine you are on an s/390 and you have to deal with some dozen DASDs
[13:29:54] <HuHa> good luck finding anything when you have to deal with some dozen "ext4" thingies
[13:31:41] <jilopez> but the current Device column (sda, sdb, etc) will stay, I think everything would be as easy to find as now
[13:32:01] <HuHa> moving it to an irrelevant place is as bad as removing it completely
[13:34:19] <HuHa> how about moving the other columns around? like this: https://paste.pics/DV7VM
[13:34:36] <HuHa> notice that this has a different use case: it's about used and free disk space
[13:34:51] <HuHa> so everything can be expected to have a mount point, otherwise it wouldn't even appear here
[13:35:22] <HuHa> but IMHO the mount point is something better to identify a partition than anything else
[13:36:02] <jilopez> I also expect the mount point to be placed more to the left than now
[13:36:03] <HuHa> also, do we need to spell everything out? "Ext4 Partition", not just "ext4"?
[13:36:23] <HuHa> getting rid of redundant stuff would be an important step, too IMHO
[13:36:30] <ancorgs> I would say that some order like device:mount point:type:label:size:f:enc would be more useful
[13:37:12] <HuHa> the size is also something that users can identify more easily
[13:37:28] <HuHa> "my 30 GB ext4 partition" tells me more than "some ext4 partition"
[13:37:46] <jilopez> the description shown in the Type column could be revisited, yes
[13:38:59] <HuHa> BTW that was the reasoning behind the left list here https://paste.pics/DV7X5
[13:39:42] <HuHa> it also shows the kernel device name as a tooltip, but that's a lot less relevant there
[13:40:42] <jilopez> what I like of this version is that the disk layout can be understood by reading the first column from top to down: https://user-images.githubusercontent.com/1112304/133245608-610f04be-9cd9-4ac2-a803-2cebe2e461f3.png
[13:41:13] <HuHa> jilopez: I disagree with that
[13:41:31] <HuHa> if the size would be the second column, maybe
[13:41:35] <HuHa> but not that far to the right
[13:42:26] <HuHa> BTW with a similar reasoning one might argue that the size should be the first column; it would immediately show the subdivision of the disks
[13:43:34] <jilopez> I guess all this depends on the user. For example, the size does not says too much to me. I even do not remember the sizes I give for the partitions
[13:44:09] <HuHa> jilopez: but in the left navigation tree, there could really be some more useful information than just "sda", "sdb", "sdc"
[13:44:40] <jilopez> HuHa: that is true. Maybe the key is there
[13:44:42] <HuHa> like "1 TB Seagate Disk sda", "256 GB Samsung SSD"
[13:45:17] <HuHa> it's obvious in that list that the sequence is sda, sdb, sdc - this is not giving the user any useful information
[13:45:38] <HuHa> the letters start becoming useful when there are a lot of them - like in the s/390 DASD case
[13:46:04] <jilopez> HuHa: yes
[13:46:06] <HuHa> "100 GB virtual DASD" - not very useful ;-)
[13:46:31] <HuHa> so I'd always add that "sda", "sdb", ... part there - at the end
[13:46:46] <jilopez> HuHa: the point is that we need only one solution for two "different" scenarios/expectations 
[13:47:08] <HuHa> sure - we don't want to duplicate that thing

@shundhammer
Copy link

shundhammer commented Sep 14, 2021

QDirStat screenshots:

huha-disks

qdirstat-open-dir

lsblk-huha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment