Bug 410891 - Add mountpoint to default disk label
Summary: Add mountpoint to default disk label
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Lukáš Tinkl
Keywords: usability
Depends on:
Reported: 2019-08-14 08:52 UTC by Guo Yunhe
Modified: 2021-07-01 09:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.84

Disks, and one is mounted at / (4.53 KB, image/png)
2019-08-14 15:24 UTC, Nate Graham

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2019-08-14 08:52:58 UTC
I noticed that Dolphin has removed "Root" in places section. I think it is good because we can access "Root" in devices section. (Here must be some partition mounted at /, otherwise the system doesn't work)

Then I found a problem: the device list only show devices' names as "250GB Hard Drive", etc. This is clear when you have only one partition. But for some users, they have dual boot, and more partitions are created. The list may look like:

40GB Hard Drive
120GB Hard Drive
240GB Hard Drive
110GB Hard Drive
20GB Hard Drive

Users might be confused.

My suggestion is to add mount point and file system info to device labels or in tooltip:

40GB Hard Drive
    Btrfs, /
120GB Hard Drive
    XFS, /home
240GB Hard Drive
    Ext4, /data
110GB Hard Drive
    NTFS, ???
20GB Hard Drive
    FAT, ???
Comment 1 Nate Graham 2019-08-14 15:24:43 UTC
Created attachment 122114 [details]
Disks, and one is mounted at /

The root volume uses a special icon so you can tell which one it is.
Comment 2 Nate Graham 2019-08-14 15:27:25 UTC
Still, it might be a good idea to make the default label include the mountpoint.

So you would have:

40GB Hard Drive (/)
120GB Hard Drive (/home)
240GB Hard Drive (/data)
Comment 3 Bug Janitor Service 2021-06-07 18:03:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/41
Comment 4 Ahmad Samir 2021-06-13 00:04:49 UTC
FWIW, the most robust solution is adding partition labels using any partition manager (e.g. gparted), that works across OS's ...etc, because it's a property of the filesystem not specific to an OS.
Comment 5 David Faure 2021-06-19 09:34:34 UTC
Git commit e0f9d9769f666b4a0ab02a53eb5bb9fc53b611e5 by David Faure, on behalf of Ahmad Samir.
Committed on 19/06/2021 at 08:53.
Pushed by dfaure into branch 'master'.

UDisks backend: improve the description of volume and storage devices

- Nowadays SSD's are pretty common, using "Hard Drive" doesn't seem correct,
  "Hard Disk Drive" v.s. "Solid State Drive". Instead use: "External Drive"
  and "Internal Drive", which should work for both cases

- Add the block device name (sdX[Y]) to the description, this is useful for
  devices without labels; the same goes for a whole disk device, e.g.
  /dev/sdc, which can't have a label at all.
  One can easily differentiate between devices based on the device name,
  /dev/sda, /dev/sdc2, /dev/sdd ...etc, which are always unique

An obvious use-case is the Places panel in Dolphin or KFileWidget, if you
have two or more partitions without labels, you can't tell which is which
easily with just the size.
FIXED-IN: 5.84

M  +13   -9    src/solid/devices/backends/udisks2/udisksdevice.cpp

Comment 6 Till Schäfer 2021-07-01 07:49:07 UTC
I much appreciate this change! 

However, I would like to argue, that mount points are far less technical and informative. Although they are not always present, one can fall back to device names in this case or present booth information if present. 

possibly related report Bug 433950
Comment 7 Till Schäfer 2021-07-01 07:50:55 UTC
(In reply to Till Schäfer from comment #6)
> I much appreciate this change! 
> However, I would like to argue, that mount points are far less technical and
> informative. 
are more informative...
Comment 8 Ahmad Samir 2021-07-01 08:37:16 UTC
Adding the mount point to the text label would make the entry take more space, since this a side panel, the text would either get elided or a horizontal scrollbar would appear. The mount point is used in the tooltip, so you still get that info.
Comment 9 Till Schäfer 2021-07-01 09:09:39 UTC
sounds reasonable for dolphin. thx for the explanation. 

One further question, does this commit influence other places than sidebar panels (e.g. the labels mentioned in Bug 433950)?
Comment 10 Ahmad Samir 2021-07-01 09:18:37 UTC
Sorry, I don't know :)