Comment 19 for bug 148003

Revision history for this message
Peter Wainwright (prw) wrote :

It is possible that the problem lies with cryptsetup. Even when manually performing the steps

cryptsetup luksOpen /dev/sdb1 luks
cryptsetup luksClose luks

I still end up with some "leaked" devices. These can cause the "already setup" error. For example I have

/org/freedesktop/Hal/devices/volume_part_1_size_64000

[prw@pax cryptsetup-1.0.5]$ lshal -l -u /org/freedesktop/Hal/devices/volume_part_1_size_64000
udi = '/org/freedesktop/Hal/devices/volume_part_1_size_64000'
  block.device = '/dev/mapper/temporary-cryptsetup-24059' (string)
  block.is_volume = true (bool)
  block.major = 254 (0xfe) (int)
  block.minor = 0 (0x0) (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_disgo_disgo_021D93010900B1E0_0_0' (string)
  info.capabilities = {'volume', 'block'} (string list)
  info.category = 'volume' (string)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_disgo_disgo_021D93010900B1E0_0_0' (string)
  info.product = 'Volume' (string)
  info.udi = '/org/freedesktop/Hal/devices/volume_part_1_size_64000' (string)
  linux.hotplug_type = 3 (0x3) (int)
  linux.sysfs_path = '/sys/block/dm-0' (string)
  storage.model = '' (string)
  volume.block_size = 512 (0x200) (int)
  volume.crypto_luks.clear.backing_volume = '/org/freedesktop/Hal/devices/volume_uuid_c52cc2c6_8fbd_41b3_a99f_f4a7d3132c9c' (string)
  volume.fstype = '' (string)
  volume.fsusage = '' (string)
  volume.fsversion = '' (string)
  volume.is_disc = false (bool)
  volume.is_mounted = false (bool)
  volume.is_mounted_read_only = false (bool)
  volume.is_partition = false (bool)
  volume.label = '' (string)
  volume.linux.is_device_mapper = true (bool)
  volume.mount_point = '' (string)
  volume.num_blocks = 125 (0x7d) (int)
  volume.size = 64000 (0xfa00) (uint64)
  volume.uuid = '' (string)

This temporary-cryptsetup-XXXXX device is created by cryptsetup luksOpen, but it was supposed to be freed by clear_mapping().

By the way, my Fedora 7 box does this perfectly. You might want to see what is different with that.