Bug 273369 - [PATCH] digikam does not get UUID for disk devices inside LVM
Summary: [PATCH] digikam does not get UUID for disk devices inside LVM
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Media (show other bugs)
Version: 2.0.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks: 271591
  Show dependency treegraph
 
Reported: 2011-05-15 22:33 UTC by Matthieu Pupat
Modified: 2017-07-26 05:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments
patch (802 bytes, patch)
2011-05-16 03:05 UTC, Matthieu Pupat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Pupat 2011-05-15 22:33:59 UTC
Version:           1.9.0 (using KDE 4.6.2) 
OS:                Linux

When adding an album on devices inside a LVM, digikam complains that it is not able to identify the storage medium of the path. The album is then identify only by its path which poses other problems if the device is LUKS and one starts digikam without unlocking the LUKS device (see #271591 for more details).

Reproducible: Always

Steps to Reproduce:
Add an album on a device inside an LVM

Actual Results:  
digikam is unable to identify the storage medium of the path

Expected Results:  
digikam should be able to identify the storage medium of the path

I understand that digikam relies on solid-hardware to find out the storage devices.

Below is the solid-hardware output for one of a LUKS disks stored in a LVM for which digikam fails:

udi = '/org/freedesktop/UDisks/devices/dm_2d7'
  parent = '/org/freedesktop/UDisks/devices/dm_2d2'  (string)
  vendor = ''  (string)
  product = 'luks'  (string)
  description = 'luks'  (string)
  Block.major = 253  (0xfd)  (int)
  Block.minor = 7  (0x7)  (int)
  Block.device = '/dev/dm-7'  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = '/home/luks'  (string)
  StorageAccess.ignored = true  (bool)
  StorageVolume.ignored = true  (bool)
  StorageVolume.usage = 'FileSystem'  (0x2)  (enum)
  StorageVolume.fsType = 'ext4'  (string)
  StorageVolume.label = 'luks'  (string)
  StorageVolume.uuid = '13ea945a-ef5b-4db7-9fc6-34e1bd00df96'  (string)
  StorageVolume.size = 450102292480  (0x68cc2ff000)  (qulonglong)


Below is the solid-hardware output for one of a non-encrypted disks stored in a LVM for which digikam fails:

udi = '/org/freedesktop/UDisks/devices/dm_2d1'
  parent = '/org/freedesktop/UDisks'  (string)
  vendor = ''  (string)
  product = 'homes'  (string)
  description = 'homes'  (string)
  Block.major = 253  (0xfd)  (int)
  Block.minor = 1  (0x1)  (int)
  Block.device = '/dev/dm-1'  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = '/home'  (string)
  StorageAccess.ignored = true  (bool)
  StorageVolume.ignored = true  (bool)
  StorageVolume.usage = 'FileSystem'  (0x2)  (enum)
  StorageVolume.fsType = 'ext4'  (string)
  StorageVolume.label = 'homes'  (string)
  StorageVolume.uuid = '92903620-f0f3-4f5a-bce2-7fb6de0650f7'  (string)
  StorageVolume.size = 93415538688  (0x15c0000000)  (qulonglong)
Comment 1 Matthieu Pupat 2011-05-16 03:05:21 UTC
Created attachment 60046 [details]
patch

the problems comes from drives under LVM not being Drives and having UDisks as parent which mean they do not belong to a drive either.

I do not know if it is an issue with solid-hardware or if this is digikam assuming something it should not (i.e. each volume will have a drive as aparent at some point).

Attached is a patch that fixes the issue in 1.9.0 and works fine for me.
Comment 2 caulier.gilles 2011-05-16 08:35:07 UTC
Thanks Matthieu for your patch. It can be applied to 2.0.0 as well, but need some tune i think. 

Marcel ?

Gilles Caulier
Comment 3 Marcel Wiesweg 2011-05-17 21:46:57 UTC
Git commit f55e24a8fbd519cfffa6509abc1ef3f109559f94 by Marcel Wiesweg.
Committed on 17/05/2011 at 21:45.
Pushed by mwiesweg into branch 'master'.

Apply patch by Matthieu Pupat.
We strictly need the drive device only to find out if it is removable/hotpluggable,
and I see the point that logical volumes may not have a clear parent.

BUG: 273369

M  +2    -1    NEWS     
M  +13   -1    libs/database/collectionmanager.cpp     

http://commits.kde.org/digikam/f55e24a8fbd519cfffa6509abc1ef3f109559f94
Comment 4 Marcel Wiesweg 2011-05-23 21:20:53 UTC
*** Bug 271591 has been marked as a duplicate of this bug. ***