Bug 261783 - mdraid disks missing in solid with udisks backend
Summary: mdraid disks missing in solid with udisks backend
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: libsolid-udisks (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-01 13:45 UTC by Daniel Eklöf
Modified: 2013-07-28 21:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
udisks-dump (47.71 KB, text/plain)
2011-03-03 18:49 UTC, Daniel Eklöf
Details
solid-details (12.16 KB, text/plain)
2011-03-03 18:49 UTC, Daniel Eklöf
Details
Solid/udisks RAID patch (6.18 KB, patch)
2011-03-08 18:25 UTC, Lukáš Tinkl
Details
updated solid-details (12.65 KB, text/plain)
2011-03-11 16:58 UTC, Daniel Eklöf
Details
udisks --dump from udisks-1.0.4 (34.46 KB, application/octet-stream)
2011-09-16 12:35 UTC, Daniel Eklöf
Details
solid-hardware details for one of the RAID volumes (1.04 KB, application/octet-stream)
2011-09-16 12:36 UTC, Daniel Eklöf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Eklöf 2011-01-01 13:45:43 UTC
Version:           unspecified (using KDE 4.5.90) 
OS:                Linux

Using the new udisks backend in solid, mdraid disks are not showing up in dolphin and open/save dialogs etc.

The disks are included in udisks --dump (see below). I do see that udisks isn't picking up volume labels and such (perhaps because it's not partitioned, but has the filesystem directly on the block device?) Is this why solid isn't picking it up?

Showing information for /org/freedesktop/UDisks/devices/md0
  native-path:                 /sys/devices/virtual/block/md0
  device:                      9:0
  device-file:                 /dev/md0
    presentation:              /dev/md0
  detected at:                 Sat Jan  1 09:41:45 2011
  system internal:             1
  removable:                   0
  has media:                   1 (detected at Sat Jan  1 09:41:45 2011)
    detects change:            0
    detection by polling:      0
    detection inhibitable:     0
    detection inhibited:       0
  is read only:                0
  is mounted:                  1
  mount paths:             /mnt/xyz
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       1
  presentation name:           
  presentation icon:           
  size:                        61442621440
  block size:                  512
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  linux md:
    state:                     clean
    RAID level:                raid0
    uuid:                      e0463bb4:94709776:983398c7:5db4196b
    home host:                 
    name:                      
    num comp:                  2
    version:                   0.90
    degraded:                  0
    sync action:               idle
    slaves:
                      /org/freedesktop/UDisks/devices/sdb5
                      /org/freedesktop/UDisks/devices/sdc1
  drive:
    vendor:                    Linux
    model:                     Software RAID raid0
    revision:                  0.90
    serial:                    e0463bb4:94709776:983398c7:5db4196b
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 0
    adapter:                   Unknown
    ports:
    similar devices:
    media:                     
      compat:                 
    interface:                 virtual
    if speed:                  (unknown)
    ATA SMART:                 not available

Reproducible: Always




QT 4.7.1
KDE 4.6 RC1
udisks 1.0.2
HAL *not* installed
Comment 1 Daniel Eklöf 2011-01-01 14:51:05 UTC
I tried partitioning one of my raid volumes. Udisks is picking up the new partition (but still no labels etc), and solid is still ignoring it.

So, to summarize: I now have two raid disks: md0 which is partioned, and md1 (not shown here, but is not partitioned - i.e. filesystem is directly on the block device). Solid isn't seeing them.

Showing information for /org/freedesktop/UDisks/devices/md0p1
  native-path:                 /sys/devices/virtual/block/md0/md0p1
  device:                      259:0
  device-file:                 /dev/md0p1
    presentation:              /dev/md0p1
  detected at:                 Sat Jan  1 14:11:10 2011
  system internal:             1
  removable:                   0
  has media:                   1 (detected at Sat Jan  1 14:11:10 2011)
    detects change:            0
    detection by polling:      0
    detection inhibitable:     0
    detection inhibited:       0
  is read only:                0
  is mounted:                  1
  mount paths:             /mnt/xyz
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       1
  presentation name:           
  presentation icon:           
  size:                        61442619392
  block size:                  512
  job underway:                no
  usage:                       
  type:                        
  version:
  uuid:                        
  label:                       
  partition:
    part of:                   /org/freedesktop/UDisks/devices/md0
    scheme:                    mbr
    number:                    1
    type:                      0x83
    flags:                     boot
    offset:                    2048
    alignment offset:          63488
    size:                      61442619392
    label:                     
    uuid:
Comment 2 Lukáš Tinkl 2011-03-03 16:47:08 UTC
Solid "sees" stuff that not only has partitions but also some kind of filesystem on it. From comment #1 it doesn't look like there's one, ie. "usage" and "type" are empty.
Comment 3 Daniel Eklöf 2011-03-03 18:18:09 UTC
OK, I guess what you're saying is the bug is in udisks? Because there's quite clearly filesystems on them... (I have them mounted, it's just that they're not showing up in solid).
Comment 4 Lukáš Tinkl 2011-03-03 18:40:36 UTC
Well, it might be that udisks handles them differently; we'll just have to find out how :) I noticed up in the original text, there is something like "slaves" (/org/freedesktop/UDisks/devices/sdb5 and /org/freedesktop/UDisks/devices/sdc1), could you please post the whole "udisks --dump" together with "solid-hardware details <udi>"? Thx
Comment 5 Daniel Eklöf 2011-03-03 18:49:01 UTC
Created attachment 57648 [details]
udisks-dump
Comment 6 Daniel Eklöf 2011-03-03 18:49:24 UTC
Created attachment 57649 [details]
solid-details
Comment 7 Lukáš Tinkl 2011-03-08 18:25:18 UTC
Created attachment 57775 [details]
Solid/udisks RAID patch
Comment 8 Lukáš Tinkl 2011-03-08 18:26:31 UTC
Please try the above patch; it would also be nice if you could stop by on IRC (#solid @ Freenode) to discuss this further.
Comment 9 Daniel Eklöf 2011-03-08 21:36:21 UTC
(In reply to comment #8)
> Please try the above patch;

I'll do that as soon as possible. Unfortunately I'm not likely to have any time for that until later this week.

> it would also be nice if you could stop by on IRC
> (#solid @ Freenode) to discuss this further.

I can do that. I'm assuming I need access to the RAID:ed system though, in which case I won't have any time until later this week. If not, I can pop in almost any time, from work.
Comment 10 Daniel Eklöf 2011-03-11 16:54:11 UTC
(In reply to comment #7)
> Created an attachment (id=57775) [details]
> Solid/udisks RAID patch

It now detects the RAID disks, but they are not listed correctly.

* It lists the individual members instead of the RAID disk
* It doesn't detect the mount status correctly for the RAID partitioned RAID block device (/dev/md0p1). The non-partitioned RAID block device (i.e. the one where the fiilesystem is directly  on the block device, /dev/md1) is correctly detected as mounted.
* Since solid lists the individual members, I see two disks pointing to the same mount point for /dev/md1.
* Labels are not picked up. I.e. I see two "379.9 GiB Hard Drive", and two "28.6 GiB Hard Drive" entries.
Comment 11 Daniel Eklöf 2011-03-11 16:58:10 UTC
Created attachment 57871 [details]
updated solid-details
Comment 12 Daniel Eklöf 2011-09-16 12:33:33 UTC
With udisks-1.0.4, and *without* the patch from comment #7, the correct disks are now detected. I.e. I see one disk for each RAID partition, and I don't see any of the individual members making up the array. So all that is good.

However, Solid isn't using any informative labels, and simply lists them as "76.3 GiB Hard Drive". Shouldn't it use the label if there is one (there is)?
Comment 13 Daniel Eklöf 2011-09-16 12:35:17 UTC
Created attachment 63693 [details]
udisks --dump from udisks-1.0.4
Comment 14 Daniel Eklöf 2011-09-16 12:36:08 UTC
Created attachment 63694 [details]
solid-hardware details for one of the RAID volumes
Comment 15 Daniel Eklöf 2011-09-30 09:51:48 UTC
One more datapoint. With *partitioned* RAID volumes, solid sees the volumes, and uses the volume labels as description (with udisks-1.0.4)

In other words, solid now sees filesystems on RAID volumes correctly, except that for filesystems put directly on an unpartitioned RAID disk, solid uses the generic "X GB Hard Drive" as description, instead of the volume label.

The reason for this, assuming I read the sources correctly, is that such a filesystem can be seen as both a Solid::DeviceInterface::StorageVolume, and a Solid::DeviceInterface::StorageDrive.

The volume label is used as description for StorageVolumes. I'm guessing StorageDrives are assumed not to have a label and hence the generic "X GB Hard Drive" description is used.

Finally, when generating the description, it *first* checks if it's a StorageDrive, *then* if it's a StorageVolume.

So, for a filesystem put directly on an unpartitioned RAID volume, we get the generic StorageDrive description, whereas filesystems on partitioned RAID volumes aren't seen as StorageDrives and hence we get the label as description.

I.e. one way to fix this would be to check (in "QString UDisksDevice::description() const") if it's a StorageVolume *before* checking if it's a StorageDrive. Not sure if this would break something else. Also not sure how common it is to have filesystems on an unpartitioned RAID volume.

Hope that made some sense.
Comment 16 Alex Fiestas 2013-03-14 02:16:03 UTC
Is this still happening with 4.10.1 or 4.9.5 ?

What about udisk2 ?
Comment 17 Alex Fiestas 2013-07-28 21:28:21 UTC
Closing the thread for lack of activity.

Please, please! if you are still able to reproduce this with KDE 4.10 or 4.11 feel free to reopen the bug!

Oh, if you reopen the bug, please provide:
-Check if this still happens with UDisk2
-solid-hardware list (output, with udisk2)

Thanks !