ntfs volumes and locale= option

Danny Kukawka danny.kukawka at web.de
Thu Oct 9 07:30:46 PDT 2008


On Samstag, 4. Oktober 2008, Michael Biebl wrote:
> Hi,
>
> a Debian user reported that mounting ntfs volumes fails for him under KDE
> [1].

I've see the same problem today.

> The locale option was added in
> a372bf79e16a5c6c00d0e262745dc935de364ca2, as response to
> https://launchpad.net/bugs/78370.
[...]

I've reverted this patch for now.

> Only ntfs-fuse and ntfs-3g support the locale= option, the kernel
> driver doesn't.
>
> Distributions and desktop environments handle this situation differently.
>
> gnome-mount (GNOME) by default uses fstype=ntfs-3g.
> This means, mounting ntfs volumes fails if the ntfs-3g package is not
> installed. But as it uses ntfs-3g it doesn't hit the locale= problem.

IMO the wrong behavior.

> KDE does not explicitely set the fstype.
> That means, mounting ntfs volumes from within KDE fails.

Shows the correct behavior and fails in this case, which is correct since 
there is a bug in HAL.

> A third workaround exists, that uses ntfs-config, which creates a fdi
> file that set fstype to ntfs-3g.

Not sure if this is the correct solution.

> Imo, all those approaches have downsides and I'm wondering what the
> best fix would look like.
>
> a.) should the locale= option be only allowed for fstype ntfs-3g?

Yes. In principle.

> b.) should be locale= option be provided by a fdi shipped within the
> ntfs-3g package?

Also yes. Always the package that introduce something new, which isn't part of 
the basic system (as e.g. libmtp for supported MTP devices) should deliver 
their own fdi files to provide correct policies and behavior.

> b.) should KDE explicitely ask hal to use the ntfs3-g fstype, as
> gnome-mount does?

If it's installed, KDE should provide a way to set the fstype parameter to 
ntfs-3g.

> Other ideas, comments?

I'm not sure if overwriting the fstype in HAL (as ntfs-3g apparently do) is 
the correct way to go since the property shows the fstype of the filesystem 
which is correctly ntfs and not ntfs-3g (which is IMO not really a fstype). 
Yes, it currently collides with the mount option handling. 

Maybe we need to change the way HAL currently handles the mount options. I 
think currently about a solution as we have for music player which need a 
special lib to work:

- volume.fstype.alternative (strlist) e.g. ntfs-3g, ntfs-fuse
- volume.fstype.[alternative].valid_options (strlist)
  --> volume.fstype.ntfs-3g.valid_options={'locale=','uid=',...}
  --> volume.fstype.ntfs-fuse.valid_options={...}

This would allow to handle the special mount options an non default fstype 
handler like ntfs-3g or a fuse-fs needs. But this would also mean that the 
desktop needs to adapt to the new properties to be able to mount ntfs-3g.

Danny


More information about the hal mailing list