Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276097 - sys-apps/halevt-0.1.4-r2 produces wrong messages and refuses to mount block
Summary: sys-apps/halevt-0.1.4-r2 produces wrong messages and refuses to mount block
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-01 17:16 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2009-07-04 18:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/tmp/emerge--info (emerge--info,11.92 KB, text/plain)
2009-07-01 17:23 UTC, DEMAINE Benoît-Pierre, aka DoubleHP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DEMAINE Benoît-Pierre, aka DoubleHP 2009-07-01 17:16:17 UTC
> halevt-mount -u "$U" -o sync -m 000

=>
Mount error for /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474:
DBus Error org.freedesktop.Hal.Device.Volume.PermissionDenied: Device /dev/sdb1 is listed in /etc/fstab. Refusing to mount.

moon-gen-3 media # grep -nri sdb1 /etc/fstab
moon-gen-3 media #

In fact, I found sdb1 twice in ... /etc/blkid.tab . No clue what this file is for.

moon-gen-3 media # grep -nri sdb1 /etc/*tab
moon-gen-3 media #

halevt-mount just refuses to mount the device, because it dreams that the device is declared somewhere ...
Comment 1 DEMAINE Benoît-Pierre, aka DoubleHP 2009-07-01 17:23:53 UTC
Created attachment 196263 [details]
/tmp/emerge--info
Comment 2 George Kargiotakis 2009-07-01 18:31:32 UTC
can you provide the output of:
lshal -u /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474

The blkid.tab file has nothing to do with halevt. It's used to work with UUID stuff (libuuid).

Does your /etc/fstab contain devices or UUIDs ?
Is it like:
/dev/sda1       /boot       ext2        noauto,noatime      1 1
or like:
UUID=4c1d8fb4-05b6-454f-9493-02b2325cfeb6      /boot       ext2        noauto,noatime      1 1

what does /proc/mounts say about the device allegedly mounted ?
Comment 3 DEMAINE Benoît-Pierre, aka DoubleHP 2009-07-01 18:40:59 UTC
moon-gen-3 media # lshal -u /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474
moon-gen-3 media #

But since 1h, i did lot of things on my machine.

No my /etc/fstab does not contain any kind of UUID. I only, rarely, use LABELS.

ATM, /proc/mounts does not say anything about sdb. It may not be revealant, because I am debigging hal scripts; so I touch a lot my HW. Dispite all this, I can update to a new bunch of tests (do not forget that now, my scripts manually mount what failed by normal HAL):

messages:
Jul  1 20:35:51 moon-gen-3 halevt: Running: /etc/halevt/MyMountsh.sh /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474 /dev/sdc1 arch_longtime 2>&1 | logger
Jul  1 20:35:51 moon-gen-3 logger: Mount error for /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474:
Jul  1 20:35:51 moon-gen-3 logger: DBus Error org.freedesktop.Hal.Device.Volume.PermissionDenied: Device /dev/sdc1 is listed in /etc/fstab. Refusing to mount.
Jul  1 20:35:51 moon-gen-3 kjournald starting.  Commit interval 5 seconds
Jul  1 20:35:51 moon-gen-3 EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
Jul  1 20:35:51 moon-gen-3 EXT3 FS on sdc1, internal journal
Jul  1 20:35:51 moon-gen-3 EXT3-fs: recovery complete.
Jul  1 20:35:51 moon-gen-3 EXT3-fs: mounted filesystem with ordered data mode.
Jul  1 20:35:51 moon-gen-3 halevt: Running: halevt-mount -s
Jul  1 20:35:51 moon-gen-3 logger: Mounted with manual mount
Jul  1 20:35:51 moon-gen-3 logger: Type of volume detected: ext3

moon-gen-3 media # lshal -u /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474:
moon-gen-3 media # cat /etc/fstab |grep -i UUID
moon-gen-3 media # cat /etc/mtab |grep -i UUID
moon-gen-3 media # cat /proc/mounts |grep sd
/dev/sda1 /mnt/DHP_1T ext3 rw,nosuid,errors=continue,data=ordered 0 0
/dev/sdb1 /media/DHP_TEL_2G vfat rw,sync,uid=1000,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,utf8 0 0
/dev/sdc1 /media/arch_longtime ext3 rw,errors=continue,data=ordered 0 0
moon-gen-3 media #

sda and sdb being, at the moment, off topic drives. sdc is now mounted because my script did it.

Still, for other people, halevt should do it.

ATM sdc1 is an external 120G formated in ext3 plugged in an IDE/USB adapter.
Comment 4 George Kargiotakis 2009-07-01 18:47:37 UTC
If we are to solve the bug you should stop making changes for a while..if possible.

Please do the following. 
a) Manually unmount a device you want to test.
b) find the device in lshal and provide all the relevant output for it.
c) issue a halevt-mount /dev/sdXY command manually and not through your script and provide any errors it shows.
Comment 5 DEMAINE Benoît-Pierre, aka DoubleHP 2009-07-01 19:32:28 UTC
No. Bug may take years to fix; and I need my workstation usable ASAP (already lost 4h on that; 10 times too much); got work to do, and real life to "live"; gotta fix this machine ASAP (compleet my scripts).

But, I know which drive can reproduce the bug easily. And if hal could sucessfully mount it, my script would just see drive is already mounted, and do nothing (special rules do not apply on ext, so, my script would just not deal with this USB drive if hal mounts it ).

***

Jul  1 21:24:37 moon-gen-3 logger: Mount error for /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474:
Jul  1 21:24:37 moon-gen-3 logger: DBus Error org.freedesktop.Hal.Device.Volume.PermissionDenied: Device /dev/sdb1 is listed in /etc/fstab. Refusing to mount.

moon-gen-3 ~ # umount /media/arch_longtime
moon-gen-3 ~ #

lshal:
udi = '/org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474'
  block.device = '/dev/sdb1'  (string)
  block.is_volume = true  (bool)
  block.major = 8  (0x8)  (int)
  block.minor = 17  (0x11)  (int)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_ST312002_6A_000000023220_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_ST312002_6A_000000023220_0_0'  (string)
  info.product = 'arch_longtime'  (string)
  info.udi = '/org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474'  (string)
  linux.hotplug_type = 3  (0x3)  (int)
  linux.sysfs_path = '/sys/block/sdb/sdb1'  (string)
  org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options', 'extra_options'} (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'} (string list)
  org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list)
  storage.model = ''  (string)
  volume.block_size = 512  (0x200)  (int)
  volume.fstype = 'ext3'  (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 = true  (bool)
  volume.label = 'arch_longtime'  (string)
  volume.linux.is_device_mapper = false  (bool)
  volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'remount', 'exec', 'acl', 'user_xattr', 'data='} (string list)
  volume.mount_point = ''  (string)
  volume.num_blocks = 234436482  (0xdf93782)  (uint64)
  volume.partition.flags = {} (string list)
  volume.partition.label = ''  (string)
  volume.partition.media_size = 120034123776  (0x1bf2976000)  (uint64)
  volume.partition.number = 1  (0x1)  (int)
  volume.partition.scheme = 'mbr'  (string)
  volume.partition.start = 32256  (0x7e00)  (uint64)
  volume.partition.type = '0x83'  (string)
  volume.partition.uuid = ''  (string)
  volume.size = 120031478784  (0x1bf26f0400)  (uint64)
  volume.unmount.valid_options = {'lazy'} (string list)
  volume.uuid = 'ba10196b-ce79-4026-a04f-a18dc8829474'  (string)

moon-gen-3 ~ # halevt-mount /dev/sdb1
An udi or a device is needed
moon-gen-3 ~ # halevt-mount /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474
An udi or a device is needed
moon-gen-3 ~ # halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474
Mount error for /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474:
DBus Error org.freedesktop.Hal.Device.Volume.PermissionDenied: Device /dev/sdb1 is listed in /etc/fstab. Refusing to mount.
moon-gen-3 ~ #

moon-gen-3 ~ # halevt-mount -d /dev/sdb1
Mount error for (null):
DBus Error org.freedesktop.Hal.Device.Volume.PermissionDenied: Device /dev/sdb1 is listed in /etc/fstab. Refusing to mount.
moon-gen-3 ~ #

moon-gen-3 media # grep -nri sdb1 /etc/*tab
moon-gen-3 media #

***

NB: I *NEVER* hand copy anything; I *EXCLUSIVELY* use mouse to copy/past any thing; even for small words like "sdb1" ... !!! 

... maybe I got an idea ...
Comment 6 DEMAINE Benoît-Pierre, aka DoubleHP 2009-07-01 19:43:57 UTC
I commented this line from fstab:

#LABEL=arch_longtime /mnt/arch_longtime ext3 defaults,noauto 0 0

Even if this was the cause of the problem, the message from halevt is wrong: it's not sdb1 written in fstab, but "it's label".

Yes, before i put this drive in an USB case, it was in the machine, and, mounted by fstab at boot time.

Still, it does not really work better:

Jul  1 21:33:05 moon-gen-3 halevt: Running: /etc/halevt/MyMountsh.sh /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474 /dev/sdb1 arch_longtime 2>&1 | logger
Jul  1 21:33:05 moon-gen-3 logger: Mount error for /org/freedesktop/Hal/devices/volume_uuid_ba10196b_ce79_4026_a04f_a18dc8829474:
Jul  1 21:33:05 moon-gen-3 logger: DBus Error org.freedesktop.Hal.Device.Volume.InvalidMountOption: The option 'umask=000' is not allowed for uid=0
Jul  1 21:33:05 moon-gen-3 kjournald starting.  Commit interval 5 seconds
Jul  1 21:33:05 moon-gen-3 EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
Jul  1 21:33:05 moon-gen-3 EXT3 FS on sdb1, internal journal
Jul  1 21:33:05 moon-gen-3 EXT3-fs: mounted filesystem with ordered data mode.
Jul  1 21:33:05 moon-gen-3 halevt: Running: halevt-mount -s
Jul  1 21:33:05 moon-gen-3 logger: Mounted with manual mount
Jul  1 21:33:05 moon-gen-3 logger: Type of volume detected: ext3

/etc/halevt/halevt.xml (part of) : 
<halevt:Device match="&MOUNTABLE;">
   <halevt:Insertion exec="/etc/halevt/MyMountsh.sh $hal.udi$ $hal.block.device$ $hal.volume.label$ 2>&amp;1 | logger"/>
</halevt:Device>

/etc/halevt/MyMountsh.sh (part of) :
halevt-mount -u "$U" -o sync -m 000 && echo "Mounted with halevt-mount" || { mkd
ir -p "$L" && mount "$B" "$L" && echo "Mounted with manual mount" || echo "All m
ount attempts failed" ; }
T=$(mount | grep "$B" | cut -d " " -f5)
echo "Type of volume detected: $T"

I need -m 000 so that when VFAT is mounted by root, user can still write on it.

Halevt lacks "per file system options" (unless it's just not documented, or I did not read up to there ? ). BTW: is there a *full* documentation for HAL ?
Comment 7 George Kargiotakis 2009-07-01 20:00:11 UTC
Ok, so there is no real problem with halevt. It was an error on your side. The error could be better though. 
You can contact upstream about the "confusing" error msgs: http://www.nongnu.org/halevt/


try to pass mount options using the -o switch and not with umask. umask of 000 is wrong.

I consider this bug as closed since there is no problem in the ebuild but you'd rather want more informative messages from upstream.
Comment 8 DEMAINE Benoît-Pierre, aka DoubleHP 2009-07-01 20:06:09 UTC
(In reply to comment #7)
> Ok, so there is no real problem with halevt. It was an error on your side. The
> error could be better though. 
> You can contact upstream about the "confusing" error msgs:
> http://www.nongnu.org/halevt/

1: the message is wrong
2: even after commenting this line, halevt still does not mount the device.

> try to pass mount options using the -o switch and not with umask. umask of 000
> is wrong.

No; this is FS specific fine tuning.

> I consider this bug as closed since there is no problem in the ebuild but you'd
> rather want more informative messages from upstream.

I see.
Comment 9 George Kargiotakis 2009-07-01 20:09:55 UTC
If you see the lshal output you will notice the volume.fstype string. You can create an "if-else" loop in halevt config to pass the proper options using the -o switch.

Comment 10 Markos Chandras (RETIRED) gentoo-dev 2009-07-01 21:31:04 UTC
Closing as invalid

Thanks George for taking care of this
Comment 11 DEMAINE Benoît-Pierre, aka DoubleHP 2009-07-04 18:47:11 UTC
I just mailed the list.