Bug 184471
Summary: | PCMCI Flash card reader should behave as a removable disk | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Uno Engborg <uno> | ||||||
Component: | gnome-mount | Assignee: | John (J5) Palmieri <johnp> | ||||||
Status: | CLOSED DUPLICATE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 5 | CC: | bmillett, davidz, jkeck, jspaleta, sundaram | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-03-26 20:16:42 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 150221 | ||||||||
Attachments: |
|
Description
Uno Engborg
2006-03-09 00:28:51 UTC
*** Bug 182145 has been marked as a duplicate of this bug. *** Just an FYI this is a side effect of the default policy file 99-redhat-storage-policy-fixed-drives.fdi ide based removable media like ide based CF cards is not distinquished from other IDE fixed disks in the catch all fixed-drives policy. I do not know if policy can be adjusted to recover CF card mountability while leaving "fixed disks" still ignored. I don't have an IDE CF card reader with which to play with to suggest a policy edit which only affects CF card readers. You can of course workaround this behavior by moving the fixed-drives policy out of the way and restarting hald. But this recovers mountability of all fixed drives, which may not be what the local administrator wants and certaintly defeats the purpose of including the fixed-drives policy. -jef What I don't get is why the CF IDE card reader doesn't have storage.removable = true. I would have thought it would. I'd like to ask that someone who is seeing their CF card reader affected like the original reporter if they can please do a dump of the command lshal once with the CF card in the reader and once with the CF card is out of the reader and attach both runs as seperate attachements to this report. I'd like to look at what hal says the properties of the reader are in both cases. It would be instructive for me. -jef Created attachment 126773 [details]
lshal after ejecting
Created attachment 126774 [details]
lshal before ejecting
diff between the two attachments: [bpm]$ diff -wruN before after --- before 2006-03-26 11:02:47.000000000 -0600 +++ after 2006-03-26 11:03:04.000000000 -0600 @@ -1,5 +1,5 @@ -Dumping 104 device(s) from the Global Device List: +Dumping 100 device(s) from the Global Device List: ------------------------------------------------- udi = '/org/freedesktop/Hal/devices/computer' info.callouts.add = {'hal-system-storage-cleanup-mountpoints'} (string list) @@ -1298,102 +1298,6 @@ linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1' (string) -udi = '/org/freedesktop/Hal/devices/pcmcia__1__1' - info.udi = '/org/freedesktop/Hal/devices/pcmcia__1__1' (string) - linux.subsystem = 'pcmcia' (string) - linux.hotplug_type = 1 (0x1) (int) - info.product = 'V5.00' (string) - info.vendor = 'KINGSTON TECHNOLOGY CF CARD' (string) - pcmcia.func_id = 4 (0x4) (int) - pcmcia.card_id = 0 (0x0) (int) - pcmcia.manf_id = 7 (0x7) (int) - pcmcia.prod_id2 = 'V5.00' (string) - pcmcia.prod_id1 = 'KINGSTON TECHNOLOGY CF CARD' (string) - pcmcia.socket_number = 1 (0x1) (int) - info.linux.driver = 'ide-cs' (string) - info.parent = '/org/freedesktop/Hal/devices/pci_1217_6933' (string) - info.bus = 'pcmcia' (string) - linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0' (string) - linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0' (string) - -udi = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' - info.udi = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' (string) - linux.subsystem = 'ide' (string) - linux.hotplug_type = 1 (0x1) (int) - info.product = 'IDE device (master)' (string) - ide.channel = 0 (0x0) (int) - ide.host = 2 (0x2) (int) - info.linux.driver = 'ide-disk' (string) - info.parent = '/org/freedesktop/Hal/devices/pcmcia__1__1' (string) - info.bus = 'ide' (string) - linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0/ide2/2.0' (string) - linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0/ide2/2.0' (string) - -udi = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' - volume.ignore = true (bool) - block.storage_device = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) - info.udi = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) - storage.requires_eject = false (bool) - storage.hotpluggable = false (bool) - info.capabilities = {'storage', 'block'} (string list) - info.category = 'storage' (string) - info.product = 'Hitachi ATA Card' (string) - storage.removable = false (bool) - storage.physical_device = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' (string) - storage.firmware_version = 'Rev_1.0' (string) - storage.vendor = '' (string) - storage.model = 'Hitachi ATA Card' (string) - storage.drive_type = 'disk' (string) - storage.automount_enabled_hint = true (bool) - storage.media_check_enabled = false (bool) - storage.no_partitions_hint = false (bool) - storage.bus = 'ide' (string) - block.is_volume = false (bool) - block.minor = 0 (0x0) (int) - block.major = 33 (0x21) (int) - block.device = '/dev/hde' (string) - linux.hotplug_type = 3 (0x3) (int) - info.parent = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' (string) - linux.sysfs_path_device = '/sys/block/hde' (string) - linux.sysfs_path = '/sys/block/hde' (string) - -udi = '/org/freedesktop/Hal/devices/volume_uuid_15DA_2B0E' - volume.unmount.valid_options = {'lazy'} (string list) - volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid='} (string list) - org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-system-storage-mount', 'hal-system-storage-unmount', 'hal-system-storage-eject'} (string list) - org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list) - org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list) - info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list) - volume.ignore = true (bool) - info.udi = '/org/freedesktop/Hal/devices/volume_uuid_15DA_2B0E' (string) - volume.partition.msdos_part_table_type = 6 (0x6) (int) - info.product = 'MY STUFF' (string) - volume.size = 64077824 (0x3d1c000) (uint64) - volume.num_blocks = 125152 (0x1e8e0) (int) - volume.block_size = 512 (0x200) (int) - volume.partition.number = 1 (0x1) (int) - info.capabilities = {'volume', 'block'} (string list) - info.category = 'volume' (string) - volume.is_partition = true (bool) - volume.is_disc = false (bool) - volume.is_mounted = false (bool) - volume.mount_point = '' (string) - volume.label = 'MY STUFF' (string) - volume.uuid = '15DA-2B0E' (string) - volume.fsversion = 'FAT16' (string) - volume.fsusage = 'filesystem' (string) - volume.fstype = 'vfat' (string) - storage.model = '' (string) - block.storage_device = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) - block.is_volume = true (bool) - block.minor = 1 (0x1) (int) - block.major = 33 (0x21) (int) - block.device = '/dev/hde1' (string) - linux.hotplug_type = 3 (0x3) (int) - info.parent = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) - linux.sysfs_path_device = '/sys/block/hde/hde1' (string) - linux.sysfs_path = '/sys/block/hde/hde1' (string) - udi = '/org/freedesktop/Hal/devices/pci_8086_24cc' info.udi = '/org/freedesktop/Hal/devices/pci_8086_24cc' (string) linux.subsystem = 'pci' (string) @@ -2177,6 +2081,6 @@ linux.sysfs_path = '/sys/devices/pnp0/00:06' (string) -Dumped 104 device(s) from the Global Device List. +Dumped 100 device(s) from the Global Device List. ------------------------------------------------ So with the card in the reader.... hal sees the card but marks is as not removable nor hotpluggable... which is confirmed in the lshal attachements from the previous comments. So the fixed-disked policy file matches and the ignore property is set. Is hal making a mistake here? Shouldn't hal be recognizing these pcmcia based card readers as removable? Looking over the lshal policy all i can think of as a work around is trying to match on the pcmcia substring from the storage.physical_device in the fixed-disk policy definition. Does that make sense as a workaround to recover access to PCMCIA based storage devices? Adding logic to the fixed-disk policy file so that volume.ignore is not enabled if storage.physical_device contains "pcmcia"? -jef bah... can anyone provide me with an example snippet for a rule that encompasses the logic for "match if does not contain" None of the on disk policy examples even in the /usr/share/doc/ area for hal has an example for an exclude match. -jef And shouldn't hal be setting storage.drive_type = compact_flash for the card readers of this type. Brian your cardreader from the attachments is a Compact Flash card reader correct? I ask because I'm looking over the example policy file /usr/share/doc/hal-0.5.7/conf/match-cardreader.fdi and it appears that hal should be able to detect compact_flash as drive_type. Unless of course that example policy is stale and no longer valid. Though experimenting with my usb CF cardreader the drive_type for it doesn't show compact_flash either. So I'm utterly confused as to what the correct behavior is with regard to drive_type with a CF card is plugged in. Is hal suppose to distinguish "compact_flash" from "disk" as the example policy in the hal ondisk docs suggest? There is either a bug in hal or a bug in the provided example policy that coes in hal's doc directory. -jef Jeff, It is a CompactFlash PC Card Adapter by Kingston. I do have a Flashcard reader, but it is USB and it works correctly. Here is the output from hal-device for the card: [bpm]$ sudo hal-device 0: udi = '/org/freedesktop/Hal/devices/volume_uuid_15DA_2B0E' volume.unmount.valid_options = { 'lazy' } (string list) volume.mount.valid_options = { 'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=' } (string list) org.freedesktop.Hal.Device.Volume.method_execpaths = { 'hal-system-storage-mount', 'hal-system-storage-unmount', 'hal-system-storage-eject' } (string list) org.freedesktop.Hal.Device.Volume.method_signatures = { 'ssas', 'as', 'as' } (string list) org.freedesktop.Hal.Device.Volume.method_names = { 'Mount', 'Unmount', 'Eject' } (string list) info.interfaces = { 'org.freedesktop.Hal.Device.Volume' } (string list) volume.ignore = true (bool) info.udi = '/org/freedesktop/Hal/devices/volume_uuid_15DA_2B0E' (string) volume.partition.msdos_part_table_type = 6 (0x6) (int) info.product = 'MY STUFF' (string) volume.size = 64077824 (0x3d1c000) (uint64) volume.num_blocks = 125152 (0x1e8e0) (int) volume.block_size = 512 (0x200) (int) volume.partition.number = 1 (0x1) (int) info.capabilities = { 'volume', 'block' } (string list) info.category = 'volume' (string) volume.is_partition = true (bool) volume.is_disc = false (bool) volume.is_mounted = false (bool) volume.mount_point = '' (string) volume.label = 'MY STUFF' (string) volume.uuid = '15DA-2B0E' (string) volume.fsversion = 'FAT16' (string) volume.fsusage = 'filesystem' (string) volume.fstype = 'vfat' (string) storage.model = '' (string) block.storage_device = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) block.is_volume = true (bool) block.minor = 1 (0x1) (int) block.major = 33 (0x21) (int) block.device = '/dev/hde1' (string) linux.hotplug_type = 3 (0x3) (int) info.parent = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) linux.sysfs_path_device = '/sys/block/hde/hde1' (string) linux.sysfs_path = '/sys/block/hde/hde1' (string) 1: udi = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' volume.ignore = true (bool) block.storage_device = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) info.udi = '/org/freedesktop/Hal/devices/storage_model_Hitachi_ATA_Card' (string) storage.requires_eject = false (bool) storage.hotpluggable = false (bool) info.capabilities = { 'storage', 'block' } (string list) info.category = 'storage' (string) info.product = 'Hitachi ATA Card' (string) storage.removable = false (bool) storage.physical_device = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' (string) storage.firmware_version = 'Rev_1.0' (string) storage.vendor = '' (string) storage.model = 'Hitachi ATA Card' (string) storage.drive_type = 'disk' (string) storage.automount_enabled_hint = true (bool) storage.media_check_enabled = false (bool) storage.no_partitions_hint = false (bool) storage.bus = 'ide' (string) block.is_volume = false (bool) block.minor = 0 (0x0) (int) block.major = 33 (0x21) (int) block.device = '/dev/hde' (string) linux.hotplug_type = 3 (0x3) (int) info.parent = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' (string) linux.sysfs_path_device = '/sys/block/hde' (string) linux.sysfs_path = '/sys/block/hde' (string) Drat, looks like I should also have included: 2: udi = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' info.udi = '/org/freedesktop/Hal/devices/pcmcia__1__1_ide_2_0' (string) linux.subsystem = 'ide' (string) linux.hotplug_type = 1 (0x1) (int) info.product = 'IDE device (master)' (string) ide.channel = 0 (0x0) (int) ide.host = 2 (0x2) (int) info.linux.driver = 'ide-disk' (string) info.parent = '/org/freedesktop/Hal/devices/pcmcia__1__1' (string) info.bus = 'ide' (string) linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0/ide2/2.0' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0/ide2/2.0' (string) 3: udi = '/org/freedesktop/Hal/devices/pcmcia__1__1' info.udi = '/org/freedesktop/Hal/devices/pcmcia__1__1' (string) linux.subsystem = 'pcmcia' (string) linux.hotplug_type = 1 (0x1) (int) info.product = 'V5.00' (string) info.vendor = 'KINGSTON TECHNOLOGY CF CARD' (string) pcmcia.func_id = 4 (0x4) (int) pcmcia.card_id = 0 (0x0) (int) pcmcia.manf_id = 7 (0x7) (int) pcmcia.prod_id2 = 'V5.00' (string) pcmcia.prod_id1 = 'KINGSTON TECHNOLOGY CF CARD' (string) pcmcia.socket_number = 1 (0x1) (int) info.linux.driver = 'ide-cs' (string) info.parent = '/org/freedesktop/Hal/devices/pci_1217_6933' (string) info.bus = 'pcmcia' (string) linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0' (string) linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/1.0' (string) Brian, can you see if this naive attempt at a policy edit makes your pcmcia cardreader work? I don't know if there are unintended side-effects with other pcmcia storage devices which should not be marked as removable... so buyer beware. replace 10osvendor/99-redhat-storage-policy-fixed-drives.fdi with <?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="@block.storage_device:storage.physical_device" contains="pcmcia"> <merge key="storage.removable" type="bool">true</merge> </match> <match key="@block.storage_device:storage.hotpluggable" bool="false"> <match key="@block.storage_device:storage.removable" bool="false"> <merge key="volume.ignore" type="bool">true</merge> </match> </match> </device> </deviceinfo> -jef This is discussed in more detail in bug 185557 so I'm closing this as a duplicate. I'll also try to make a fix today. *** This bug has been marked as a duplicate of 185557 *** |