! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
thunar(xfdesktop) no unmount option for media with hal require_eject=false
Status:
RESOLVED: FIXED

Comments

Description Jacob 2008-04-02 16:35:03 CEST
thunar 0.9.0-5, xfdesktop 4.4.2-5, xfce4 4.4.2-3, hal 0.5.11~rc2-1

i get no unmount option, only eject.  exo-unmount works from command line with no trouble.  eject gives dialog box "unknown error" but does unmount the drive.  this is the output of lshal for the drive. 

udi = '/org/freedesktop/Hal/devices/storage_serial_S_WD_WXE208HD1910'
  block.device = '/dev/sda'  (string)
  block.is_volume = false  (bool)
  block.major = 8  (0x8)  (int)
  block.minor = 0  (0x0)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_S_WD_WXE208HD1910'  (string)
  info.capabilities = {'storage', 'block'} (string list)
  info.category = 'storage'  (string)
  info.parent = '/org/freedesktop/Hal/devices/pci_10de_266_scsi_host_scsi_device_lun0'  (string)
  info.product = 'WDC WD3200BEVT-1'  (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_S_WD_WXE208HD1910'  (string)
  info.vendor = 'ATA'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  linux.sysfs_path = '/sys/block/sda'  (string)
  storage.automount_enabled_hint = true  (bool)
  storage.bus = 'scsi'  (string)
  storage.drive_type = 'disk'  (string)
  storage.firmware_version = '11.00'  (string)
  storage.hotpluggable = false  (bool)
  storage.lun = 0  (0x0)  (int)
  storage.media_check_enabled = false  (bool)
  storage.model = 'WDC WD3200BEVT-1'  (string)
  storage.no_partitions_hint = false  (bool)
  storage.originating_device = '/org/freedesktop/Hal/devices/computer'  (string)
  storage.partitioning_scheme = 'mbr'  (string)
  storage.removable = false  (bool)
  storage.removable.media_available = true  (bool)
  storage.removable.media_size = 320072933376  (0x4a85d56000)  (uint64)
  storage.requires_eject = false  (bool)
  storage.serial = 'S_WD-WXE208HD1910'  (string)
  storage.size = 320072933376  (0x4a85d56000)  (uint64)
  storage.vendor = 'ATA'  (string)
Comment 1 Jannis Pohlmann editbugs 2008-11-23 19:00:29 CET
This should be fixed in revision 28895:

	* thunar-vfs/thunar-vfs-volume-hal.c
	  (thunar_vfs_volume_hal_is_ejectable): Return TRUE if and only if
	  requires_eject is TRUE. This should fix bug #3978.
Comment 2 Yves-Alexis Perez editbugs 2008-11-23 22:10:21 CET
Hmhm, I wonder if bug #4424 is related to this one.
Comment 3 Jannis Pohlmann editbugs 2008-11-25 11:31:45 CET
*** Bug 4424 has been marked as a duplicate of this bug. ***
Comment 4 Yves-Alexis Perez editbugs 2008-11-26 20:20:18 CET
The attached patch breaks crypto with thunar/thunar-volman:

It's not possible anymore to “eject“ a crypto-mounted partition. You can only unmount it. But the stuff uses the “eject” functionality to tear down the crypto layer.
Comment 5 Yves-Alexis Perez editbugs 2008-11-26 21:30:41 CET
The crypto-partition is:

udi = '/org/freedesktop/Hal/devices/volume_uuid_dc5a13af_48af_44da_963e_114e40595dcf'
  block.device = '/dev/sda5'  (string)
  block.is_volume = true  (bool)
  block.major = 8  (0x8)  (int)
  block.minor = 5  (0x5)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_SATA_HITACHI_HTS5416_SB2441GJHTVZXE'  (string)
  info.capabilities = {'volume', 'block'} (string list)
  info.category = 'volume'  (string)
  info.interfaces = {'org.freedesktop.Hal.Device.Volume.Crypto'} (string list)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_SATA_HITACHI_HTS5416_SB2441GJHTVZXE'  (string)
  info.product = 'Volume (crypto_LUKS)'  (string)
  info.udi = '/org/freedesktop/Hal/devices/volume_uuid_dc5a13af_48af_44da_963e_114e40595dcf'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5'  (string)
  org.freedesktop.Hal.Device.Volume.Crypto.method_argnames = {'passphrase', ''} (string list)
  org.freedesktop.Hal.Device.Volume.Crypto.method_execpaths = {'hal-luks-setup', 'hal-luks-teardown'} (string list)
  org.freedesktop.Hal.Device.Volume.Crypto.method_names = {'Setup', 'Teardown'} (string list)
  org.freedesktop.Hal.Device.Volume.Crypto.method_signatures = {'s', ''} (string list)
  storage.model = ''  (string)
  volume.block_size = 512  (0x200)  (int)
  volume.fstype = 'crypto_LUKS'  (string)
  volume.fsusage = 'crypto'  (string)
  volume.fsversion = '2'  (string)
  volume.ignore = true  (bool)
  volume.is_disc = false  (bool)
  volume.is_mounted = false  (bool)
  volume.is_mounted_read_only = false  (bool)
  volume.is_partition = true  (bool)
  volume.label = ''  (string)
  volume.linux.is_device_mapper = false  (bool)
  volume.mount_point = ''  (string)
  volume.num_blocks = 312078627  (0x1299f123)  (int)
  volume.partition.flags = {} (string list)
  volume.partition.label = ''  (string)
  volume.partition.media_size = 160041885696  (0x25433d6000)  (uint64)
  volume.partition.number = 5  (0x5)  (int)
  volume.partition.scheme = 'embr'  (string)
  volume.partition.start = 255015936  (0xf333c00)  (uint64)
  volume.partition.type = '0x83'  (string)
  volume.partition.uuid = ''  (string)
  volume.size = 159784257024  (0x2533e24600)  (uint64)
  volume.uuid = 'dc5a13af-48af-44da-963e-114e40595dcf'  (string)

The associated partition:


udi = '/org/freedesktop/Hal/devices/volume_uuid_f0e50a1e_fb06_402a_856a_52966a48
a1f1'
  block.device = '/dev/dm-4'  (string)
  block.is_volume = true  (bool)
  block.major = 254  (0xfe)  (int)
  block.minor = 4  (0x4)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_Kingston_D
ataTraveler_2_0_5B7B0DB10058_0_0'  (string)
  info.capabilities = {'volume', 'block'} (string list)
  info.category = 'volume'  (string)
  info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_Kingston_DataTravel
er_2_0_5B7B0DB10058_0_0'  (string)
  info.product = 'corsac-sec'  (string)
  info.udi = '/org/freedesktop/Hal/devices/volume_uuid_f0e50a1e_fb06_402a_856a_52966a48a1f1'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  linux.sysfs_path = '/sys/devices/virtual/block/dm-4'  (string)
  org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options'} (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount'} (string list)
  org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount'} (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as'} (string list)
  storage.model = ''  (string)
  volume.block_size = 512  (0x200)  (int)
  volume.crypto_luks.clear.backing_volume = '/org/freedesktop/Hal/devices/volume_uuid_357b0fec_9ffd_48ee_bbe4_8dc98f50f052'  (string)
  volume.fstype = 'ext2'  (string)
  volume.fsusage = 'filesystem'  (string)
  volume.fsversion = '1.0'  (string)
  volume.ignore = false  (bool)
  volume.is_disc = false  (bool)
  volume.is_mounted = false  (bool)
  volume.is_mounted_read_only = false  (bool)
  volume.is_partition = false  (bool)
  volume.label = 'corsac-sec'  (string)
  volume.linux.is_device_mapper = true  (bool)
  volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'acl', 'user_xattr'} (string list)
  volume.mount_point = ''  (string)
  volume.num_blocks = 496983  (0x79557)  (int)
  volume.size = 254455296  (0xf2aae00)  (uint64)
  volume.unmount.valid_options = {'lazy'} (string list)
  volume.uuid = 'f0e50a1e-fb06-402a-856a-52966a48a1f1'  (string)
Comment 6 Yves-Alexis Perez editbugs 2008-11-27 06:43:06 CET
> [00:12:40] (JPohlmann): Corsac: Well, even for luks stuff I don't think "eject" is the right thing.
> [00:13:07] (JPohlmann): Corsac: Maybe we need some additional code to handle crypto stuff.

Agreed, that was a workaround used by Colin at that time. The rationale was it avoided to touch thunar at all (only exo, to know what to do when receiving an “eject” even for a cryptolayer, and thunar-volman to auto-setup the crypto-layer)

Maybe a proper Thunar support (like the initial patches provided by Colin) would be a start?

I'm adding Colin in CC: for that, but it may be worth to open a new bug.

Cheers,
--
Yves-Alexis
Comment 7 Yves-Alexis Perez editbugs 2008-11-27 06:48:43 CET
Hmhm, wait. It seems that even with “unmount” the cryptolayer is correctly teared down.
Comment 8 Colin Leroy 2008-11-27 07:38:59 CET
(In reply to comment #7)
> Hmhm, wait. It seems that even with “unmount” the cryptolayer is correctly
> teared down.

Yes, that's handled by exo-mount: --eject does --unmount:
  backing_udi = libhal_volume_crypto_get_backing_volume_udi(device->volume);
  if (backing_udi)
    {
    /* never eject a LUKS-encrypted device */
    return exo_mount_hal_device_unmount(device, error);
  }

and --unmount does unmount+teardown.

Rationale was indeed to avoid touching Thunar.

Bug #3978

Reported by:
Jacob
Reported on: 2008-04-02
Last modified on: 2009-07-17
Duplicates (1):
  • 4424 Unmount problem with removable media

People

Assignee:
Jannis Pohlmann
CC List:
4 users

Version

Version:
unspecified

Attachments

Additional information