Ubuntu

hal does not recognize NTFS-FUSE mounted devices as mounted

Reported by LKRaider on 2006-03-17
26
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Medium
Martin Pitt
nautilus (Ubuntu)
Medium
Unassigned

Bug Description

I'm using ntfs-fuse to mount a volume (rw) in fstab.
Nautilus displays the device, but when trying to open it, pmount says the device is already mounted according to fstab. (some other user reported that mount, instead of pmount, is giving this error).
The system seems to be trying to mount an already mounted device.

Actually, the experience with this so far has been a bit flaky, since the drive will show in Nautilus/Computer but not in the Places tab. And it's not everytime that it shows under Computer either. For example, I just included the locale=pt_BR.UTF8 in the fstab mount options, and upon reboot, Nautilus doesn't lists the drive anymore at all.

Excerpt of my fstab file:
/dev/hda1 /media/Aalto ntfs-fuse auto,gid=114,umask=0007,locale=pt_BR.UTF-8 0 0

LKRaider (paul-eipper) wrote :

Correction: "(some other user reported that mount, instead of pmount, is giving this error)" -> The user who said that was using Konqueror in KDE, so you can disregard that.

Changed in nautilus:
assignee: nobody → pitti
Martin Pitt (pitti) wrote :

Hm, this volume should be automatically mounted at boot time, isn't it?

Martin Pitt (pitti) wrote :

Also, nautilus shouldn't display unmounted drives. Can you please do

  lshal > hal.txt

in a terminal and attach hal.txt here?

Changed in nautilus:
status: Unconfirmed → Needs Info

Yes the volume automounts at boot time.

Attached is the output of lshal.

OK, so hal does not detect /dev/hda1 as mouted. It consults /proc/mounts to determine that; can you please copy&paste the output of

 grep hda1 /proc/mounts

here? I have the strong suspicion that it doesn't appear there. Does 'fuse' mean that some userspace thing accesses the ntfs drive without actually mounting it? (i. e. some FUSE plugin to access NTFS drives).

If it does not appear in /proc/mounts, what is the output of 'mount'?

LKRaider (paul-eipper) wrote :

The output of grep hda1 /proc/mounts is:
/dev/hda1 /media/Aalto fuse rw,nosuid,nodev,user_id=0,group_id=0,default_permissions,allow_other 0 0

It shows as 'fuse', which is some kind of abstraction layer to the real filesystem used on the disk (ntfs). I'm using the 'ntfsprogs' package to support write access to the disk with 'fuse'. The commandline tool for mounting is 'ntfsmount'.

Info on fuse: http://fuse.sourceforge.net/
Info on ntfsprogs: http://www.linux-ntfs.org/

I think hal should recognize fuse filesystems, since the fuse package is already part of the main linux kernel since 2.6.14.

Martin Pitt (pitti) on 2006-05-10
Changed in hal:
status: Needs Info → Confirmed
Silviu Julean (sjulean) wrote :

I can confirm the bug. I'm able to use ntfs-fuse, but only if I hand tune /etc/fstab, and then the devices show up as not being mounted (they're not listed in Places, and their listings in Computer try to mount them).

Regarding "I just included the locale=pt_BR.UTF8 in the fstab mount options, and upon reboot, Nautilus doesn't lists the drive anymore at all.": this is probably an issue with ntfs-fuse, not hald. If I set nls=utf8, mount fails with "Invalid parameter." Perhaps there's a different syntax to setting nls on fuse-mounted devices?

Is there a way to fix this? I've been searching many hours now and i finally find my problem to be a confirmed bug :)

It would be very nice to have functional icons.

Simon Law (sfllaw) on 2006-07-10
Changed in nautilus:
importance: Untriaged → Medium
status: Unconfirmed → Confirmed
status: Confirmed → Needs Info

OK, after messing around with it for an hour, I managed to figure out a way to fix this. This is just a hack until some things with nautilus and hal are fixed up, but you can try this:

Open up /etc/hal/fdi/policy/preferences.fdi and paste this in at the end (but before </deviceinfo>):

<device>
  <match key="volume.fstype" string="ntfs">
    <merge key="volume.is_mounted" type="bool">true</merge>
    <merge key="volume.mount_point" type="string">/media/Windows</merge>
    <merge key="volume.policy.mount_filesystem" type="strlist">fuse</merge>
    <merge key="storage.removable" type="bool">false</merge>
    <merge key="volume.ignore" type="bool">false</merge>
  </match>
</device>

Of course, replace /media/Windows with the mount point. This won't work if you have multiple NTFS partitions, change the match element to match your device. Please let me know if this works :-)

Cheers, Samuel

Martin Andersen (msandersen) wrote :

I just did an upgrade, and though I've now switched to experimenting with ntfs-3g, the experimental driver which will be merged into ntfs-progs, the problem is the same. What's interesting is, that once I restarted after the upgrade (which included a new kernel), the HAL demon failed to start. All the NTFS partitions showed up on the Deskop and in Places. But after trying sudo dpkg --configure -a and restarting to get HAL working, the next time hald did start and the NTFS partitions had disappeared from the Desktop and places. Places->Computer shows them, but display the above symptom:
mount: according to mtab, /dev/hda8 is already mounted on /media/data2

mount failed
the partitions are indeed mounted and accessible, but Gnome/HALd doesn't know it.
It is being discussed here:
http://www.ubuntuforums.org/showthread.php?t=217009

Florent Mertens (givre) wrote :

The problem is that hal use minor/major to search match between device in /proc/mounts and hal volume, but fuse device don't have good minor/major number.
I patch hal so it use block.device instead of block.minor & block.major for fuse device.
Not sure that it's the best solution, but at least it works.

Florent Mertens (givre) wrote :

Ok, David Zeuthen has commit a fix for that bug on the 25 september :

" stat special device file, not the mount point
This is required to make FUSE mounts work for e.g. the ntfs-fuse
driver. "

Tested it on dapper & edgy hal package (with a custum patch, no need of the autofs stuff), and it works great.
I thinks that's could be a good patch to apply since fuse is for sure the future for write support of NTFS, and now edgy & dapper have two solution of that type : ntfs-fuse & ntfs-3g.

Martin Pitt (pitti) wrote :
Changed in hal:
importance: Wishlist → Medium
status: Confirmed → In Progress
Martin Pitt (pitti) wrote :

Closing unrelated nautilus task.

Changed in hal:
status: In Progress → Fix Committed
Changed in nautilus:
status: Needs Info → Rejected
Martin Pitt (pitti) wrote :

 hal (0.5.7.1-0ubuntu15) edgy; urgency=low
 .
   * Add debian/patches/00upstream-05-fix-stale_nfs_handle_block.patch:
     - Do not stat NFS mounts when preparing for suspend to fix hang.
     - Patch taken from upstream git.
     - Closes: LP#64266
   * Add debian/patches/20_laptop-panel-fixes.patch: ThinkPad T60 controls
     screen brightness in hardware, so set the appropriate flag in
     10-laptop-panel-mgmt-policy.fdi. Closes: LP#61184
   * Add debian/patches/21_smartcard_drivetype.patch: Recognize 'Storage-SDC'
     as smart card drive type. Closes: LP#61834
   * Add debian/patches/22-prefer-pmi-over-powersave.patch: Prefer pmi over
     powersave in the suspend/hibernate scripts. Closes: LP#61920
   * debian/patches/17-mp3-player-fdi.patch: Add information about Sandisk
     Corp. Sansa e270. Closes: LP#64300
   * debian/patches/02_ignored_volumes.patch: Ignore Apple bootstrap partitions
     on removable devices, too. Closes: LP#61767
   * Add debian/patches/00upstream-06-stat-dev-not-mountpoint.patch:
     - hald/linux/blockdev.c, blockdev_refresh_mount_state(): Stat the special
       device file, not the mount point's underlying device. This makes hal
       correctly recognize fuse mounts.
     - Patch ported from upstream GIT, thanks to Florent Mertens!
       http://gitweb.freedesktop.org/?p=hal.git;a=commit;h=2ea340399bf8cf3d2bb6bd1b5c4ecbc2042e93d4
     - Closes: LP#35354

Changed in hal:
status: Fix Committed → Fix Released
Florent Mertens (givre) wrote :

It's seems that the patch has been dropped during merge from edgy to feisty, so i reopen this bug.
Also see duplicate here : https://launchpad.net/bugs/75796

Thanks.

Changed in hal:
status: Fix Released → Confirmed
Martin Pitt (pitti) on 2007-01-08
Changed in hal:
status: Confirmed → In Progress
Martin Pitt (pitti) on 2007-01-09
Changed in hal:
status: In Progress → Fix Committed
Martin Pitt (pitti) wrote :

 hal (0.5.8.1-4ubuntu2) feisty; urgency=low
 .
   * Add back debian/patches/00upstream-06-stat-dev-not-mountpoint.patch and
     port it to 0.5.8.1. This fixes handling of NTFS-FUSE mounts again in
     Feisty. Closes: LP#35354
   * debian/patches/24_ignored_volumes.patch: Fix ignoring of Apple bootstrap
     partitions. Closes: LP#61767
   * debian/patches/24_ignored_volumes.patch: Ignore partitions without an
     fsusage, e. g. unformatted ones, Mac patch partitions, etc.
     Closes: LP#18901
   * Add debian/patches/00upstream-01-acpi-low-powerlevels.patch:
     - Fix ACPI problems with incorrect low current voltage values.
     - Patch taken from upstream git 9c99fc03fbac6380032a6678c641a76ef02ad834.
     - Closes: LP#66025
   * Add debian/patches/16_ntfs_allow_local_mount_option.patch: Allow 'locale='
     mount option for NTFS. Closes: LP#78370
   * Add debian/patches/00upstream-02-music-players.patch: Pull USB music
     player FDI file from git head. At the moment, this adds the Zen Nano.
     Closes: LP#77047
   * debian/patches/30-mp3-player-fdi.patch:
     - Add "Nexia NX58XX (including Super*Talent MegaScreen)". Closes: LP#77842
     - Add "Feiya Technology Corp Memory Bar". Closes: LP#77854
     - Add "MPMan MP-Ki 128". Closes: LP#66239

Changed in hal:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments