This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Why system assigns a "volume name" for a binded "/tmp"?

Tags: None
(comma "," separated)
ChapaikinVA
Registered Member
Posts
14
Karma
0
OS
Why system assigns such "volume name" for a binded directory "/tmp" & how to get desired name for a root directory of a volume (not for its binded subfolder .../tmp)?
________________________________________
I have a volume (eg, /dev/sda2). Its label is: "Vol_2". Its content is:

(/dev/sda2)/file.Txt
...
(/dev/sda2)/folder_1
(/dev/sda2)/folder_2
(/dev/sda2)/folder_2/file.txt
(/dev/sda2)/folder/tmp
...


File /etc/fstab:
----------------------------------------
...
UUID=<uuid of /dev/sda2> /media/Vol_2 ext4 errors=remount-ro 0 1
/media/Vol_2/folder_1/tmp /tmp none bind
...
----------------------------------------

KDE (everywhere: in Dolphin and in dialogs) displays name: "Vol_2". And content of "Vol_2" is the content of "/tmp", not a content of "(/dev/sda2)/".
Why & how to solve this problem?

I want to get:

"[In Dolphin] Vol_2":

(/dev/sda2)/file.Txt
...
(/dev/sda2)/folder_1
(/dev/sda2)/folder_2
(/dev/sda2)/folder_2/file.txt
(/dev/sda2)/folder/tmp
...


"[In Dolphin] /tmp":
A content of /tmp [i. e., of "(/dev/sda2)/folder/tmp"].

____________________
P.S. "/media/Vol_2" have proper content. Problem is that KDE for "/media/Vol_2" displays a content of /tmp, not the content of "/media/Vol_2".
ChapaikinVA
Registered Member
Posts
14
Karma
0
OS
I simplify the question.

1. Initially /tmp is not binded.
2. System has a volume with a label "Vol_2" (e.g., /dev/sda2).
3. A user logs in.
4. The user mounts the volume "Vol_2" to /media/Vol_2 (if this drive is not mounted yet; this one might be mounted in the previous session).
5. The user starts Dolphin.
6. Device list contains an item "Vol_2". The Dolphin for this device displays content of "(/dev/sda2)/".

7. The user runs:
sudo mount --bind /media/Vol_2/tmp /tmp

8. The user starts Dolphin.
9. Device list contains an item "Vol_2". The Dolphin for this device displays content of "(/dev/sda2)/tmp" (not "(/dev/sda2)/").
10. Why?

11. The Dolphin displays proper content of the folder "/media/Vol_2".
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Sounds like Solid could be getting confused.
What is the output of the following command?
Code: Select all
solid-hardware query 'IS StorageVolume'

Also, for each of the items it outputs, please run the following command (where <udi> is the path like string within the quotes):
Code: Select all
solid-hardware details <udi>


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
zanny
Registered Member
Posts
10
Karma
0
OS
I'm having this same problem as well, here is the output of details on the partition I have binded elsewhere:
Code: Select all
udi = '/org/freedesktop/UDisks2/block_devices/sdb1'
  parent = '/org/freedesktop/UDisks2/drives/ST3000DM001_9YN166_Z1F169JS'  (string)
  vendor = ''  (string)
  product = 'ST3000DM001-9YN166'  (string)
  description = 'Storage'  (string)
  Block.major = 8  (0x8)  (int)
  Block.minor = 17  (0x11)  (int)
  Block.device = '/dev/sdb1'  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = '/srv/ftp'  (string)
  StorageAccess.ignored = false  (bool)
  StorageVolume.ignored = false  (bool)
  StorageVolume.usage = 'FileSystem'  (0x2)  (enum)
  StorageVolume.fsType = 'ext4'  (string)
  StorageVolume.label = 'Storage'  (string)
  StorageVolume.uuid = '7bf7b5dd-f442-4b25-81f5-12e76359c78a'  (string)
  StorageVolume.size = 3000591450112  (0x2baa1300000)  (qulonglong)


This is for physical device partition sdb1, with a bind mount from /media/<device>/ftp to <srv/ftp.

It seems to be a UDisks2 problem, not a Solid problem.

I found a thread about this from two years ago on a Russian forum.

To reproduce, mount a bind involving an origin from any mapped drive, and the UDisks address of the physical device (ie, sdb1) changes to the bind location.

Note this is with UDisks2, and kdelibs 4.14.3. Going to investigate the UDisks bugtracker for more on this.
luebking
Karma
0
The label of /tmp is Vol_2 - just as is for /media/Vol_2. Both are on the same physical partition.
The problem exposed by this is that dolphin/kio/solid/dunno will replace the first occurrance (/media/Vol_2) w/ the second (/tmp) for the idiot-proof label driven device list display (as both will most likely also have the very same uuid)

There's however of course a conflict inherent to this concept and the Solid::DeviceInterface API does not seem to incoportate the concept of bound (it's not "binded", btw ;-) mounts.

I assume the only possible workaround would be to explicitly hide the /tmp "Vol_2" entry and add two new ones for /tmp (called "/tmp") and /media/Vol_2 (called "Vol_2")
Luckily the device list is shared among all clients =)


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]