! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
The plugin fails to umount EXFAT flash drive
Status:
RESOLVED: FIXED
Product:
Xfce4-mount-plugin
Component:
General

Comments

Description Denis 2017-01-22 20:55:33 CET
When trying to unmount EXFAT drive with the plugin pops up the message "Failed to umount device ..."
FAT flash drives are unmounted via the plugin successfully.
This same EXFAT drive can be unmounted via right-click on its icon on the desktop or via Thunar.
Comment 1 Fabian Nowak editbugs 2017-01-23 22:10:38 CET
How did you mount the drive? From the mount plugin itself, command line, Thunar?

Can you please post the output from

"umount /yourmountpoint; echo $?"? 

Unless you have explicitly set a custom umount command, the regular "umount" is used for unmounting. This has to work with exfat; and that's it.

Under Debian:
apt-file show exfat-fuse
exfat-fuse: /sbin/mount.exfat
exfat-fuse: /sbin/mount.exfat-fuse
exfat-fuse: /usr/share/doc/exfat-fuse/changelog.Debian.gz
exfat-fuse: /usr/share/doc/exfat-fuse/changelog.gz
exfat-fuse: /usr/share/doc/exfat-fuse/copyright
exfat-fuse: /usr/share/man/man8/mount.exfat-fuse.8.gz
exfat-fuse: /usr/share/man/man8/mount.exfat.8.gz

So I guess umounting with the standard tool "umount" shouldn't be a problem?

The output shall contain a "0" at the end; if that's not the case, it is then also the explanation for the dialog. Please pay also attention that you may not have any command line or file browser window open for your device, which may be a second reason for failing umount commands.

If there is special care necessary such as for usermount, then I might need additional hints or input as long as I don't find another flash device and some spare time for doing that on my own.
Comment 2 Denis 2017-01-24 03:55:45 CET
(In reply to Fabian Nowak from comment #1)
> How did you mount the drive? From the mount plugin itself, command line,
> Thunar?
> 
> Can you please post the output from
> 
> "umount /yourmountpoint; echo $?"? 
> 
> Unless you have explicitly set a custom umount command, the regular "umount"
> is used for unmounting. This has to work with exfat; and that's it.
> 
> Under Debian:
> apt-file show exfat-fuse
> exfat-fuse: /sbin/mount.exfat
> exfat-fuse: /sbin/mount.exfat-fuse
> exfat-fuse: /usr/share/doc/exfat-fuse/changelog.Debian.gz
> exfat-fuse: /usr/share/doc/exfat-fuse/changelog.gz
> exfat-fuse: /usr/share/doc/exfat-fuse/copyright
> exfat-fuse: /usr/share/man/man8/mount.exfat-fuse.8.gz
> exfat-fuse: /usr/share/man/man8/mount.exfat.8.gz
> 
> So I guess umounting with the standard tool "umount" shouldn't be a problem?
> 
> The output shall contain a "0" at the end; if that's not the case, it is
> then also the explanation for the dialog. Please pay also attention that you
> may not have any command line or file browser window open for your device,
> which may be a second reason for failing umount commands.
> 
> If there is special care necessary such as for usermount, then I might need
> additional hints or input as long as I don't find another flash device and
> some spare time for doing that on my own.

For mounting I used thunar-volman, just checked the option "Mount removable drives when hot-plugged".

The output of "umount /mymountpoint; echo $?" is:
"umount: /mymountpoint: No such file or directory"
In place of /mymountpoint there was an actual mount point of course and it was mounted, I could browse its content.

I use Manjaro, and the package providing exFAT is different, though I don't know what is the difference in its internals. It is "exfat-utils  1.2.5-1" and the files are following:

/usr/bin/dumpexfat
/usr/bin/exfatfsck
/usr/bin/exfatlabel
/usr/bin/fsck.exfat
/usr/bin/mkexfatfs
/usr/bin/mkfs.exfat
/usr/bin/mount.exfat
/usr/bin/mount.exfat-fuse
/usr/share/man/man8/dumpexfat.8.gz
/usr/share/man/man8/exfatfsck.8.gz
/usr/share/man/man8/exfatlabel.8.gz
/usr/share/man/man8/mkexfatfs.8.gz
/usr/share/man/man8/mount.exfat-fuse.8.gz
Comment 3 Denis 2017-01-24 04:01:03 CET
(In reply to Denis from comment #2)
> (In reply to Fabian Nowak from comment #1)
> > How did you mount the drive? From the mount plugin itself, command line,
> > Thunar?
> > 
> > Can you please post the output from
> > 
> > "umount /yourmountpoint; echo $?"? 
> > 
> > Unless you have explicitly set a custom umount command, the regular "umount"
> > is used for unmounting. This has to work with exfat; and that's it.
> > 
> > Under Debian:
> > apt-file show exfat-fuse
> > exfat-fuse: /sbin/mount.exfat
> > exfat-fuse: /sbin/mount.exfat-fuse
> > exfat-fuse: /usr/share/doc/exfat-fuse/changelog.Debian.gz
> > exfat-fuse: /usr/share/doc/exfat-fuse/changelog.gz
> > exfat-fuse: /usr/share/doc/exfat-fuse/copyright
> > exfat-fuse: /usr/share/man/man8/mount.exfat-fuse.8.gz
> > exfat-fuse: /usr/share/man/man8/mount.exfat.8.gz
> > 
> > So I guess umounting with the standard tool "umount" shouldn't be a problem?
> > 
> > The output shall contain a "0" at the end; if that's not the case, it is
> > then also the explanation for the dialog. Please pay also attention that you
> > may not have any command line or file browser window open for your device,
> > which may be a second reason for failing umount commands.
> > 
> > If there is special care necessary such as for usermount, then I might need
> > additional hints or input as long as I don't find another flash device and
> > some spare time for doing that on my own.
> 
> For mounting I used thunar-volman, just checked the option "Mount removable
> drives when hot-plugged".
> 
> The output of "umount /mymountpoint; echo $?" is:
> "umount: /mymountpoint: No such file or directory"
> In place of /mymountpoint there was an actual mount point of course and it
> was mounted, I could browse its content.
> 
> I use Manjaro, and the package providing exFAT is different, though I don't
> know what is the difference in its internals. It is "exfat-utils  1.2.5-1"
> and the files are following:
> 
> /usr/bin/dumpexfat
> /usr/bin/exfatfsck
> /usr/bin/exfatlabel
> /usr/bin/fsck.exfat
> /usr/bin/mkexfatfs
> /usr/bin/mkfs.exfat
> /usr/bin/mount.exfat
> /usr/bin/mount.exfat-fuse
> /usr/share/man/man8/dumpexfat.8.gz
> /usr/share/man/man8/exfatfsck.8.gz
> /usr/share/man/man8/exfatlabel.8.gz
> /usr/share/man/man8/mkexfatfs.8.gz
> /usr/share/man/man8/mount.exfat-fuse.8.gz

I'm sorry, I didn't copy the output the first time around, but typed it. It was "umount: echo: No such file or directory"
Comment 4 Fabian Nowak editbugs 2017-01-24 20:33:55 CET
Seems like you have spaces in your mount point? Is it very long? I don't succeed in having "echo" be part of the mount point name as you do.

user@host:/mnt$ mkdir "my test drive"
user@host:/mnt$ umount my\ test\ drive
umount: /mnt/my test drive: not mounted
user@host:/mnt$ umount my\ test\ drive; echo $?
umount: /mnt/my test drive: not mounted
1
user@host:/mnt$ umount "my test drive"; echo $?
umount: /mnt/my test drive: not mounted
1
user@host:/mnt$ umount my test drive; echo $?
umount: my: Datei oder Verzeichnis nicht gefunden
1
user@host:/mnt$ 


Maybe you can seperate the two commands; first umount and then as a new command echo $?. The latter result is what I am especially interested in; and maybe there are some problems inside the mount plugin with special mount point names. Would you mind telling the name of the mount point? At least as a schema?
Comment 5 Denis 2017-01-26 20:00:13 CET
(In reply to Fabian Nowak from comment #4)
> Seems like you have spaces in your mount point? Is it very long? I don't
> succeed in having "echo" be part of the mount point name as you do.
> 
> user@host:/mnt$ mkdir "my test drive"
> user@host:/mnt$ umount my\ test\ drive
> umount: /mnt/my test drive: not mounted
> user@host:/mnt$ umount my\ test\ drive; echo $?
> umount: /mnt/my test drive: not mounted
> 1
> user@host:/mnt$ umount "my test drive"; echo $?
> umount: /mnt/my test drive: not mounted
> 1
> user@host:/mnt$ umount my test drive; echo $?
> umount: my: Datei oder Verzeichnis nicht gefunden
> 1
> user@host:/mnt$ 
> 
> 
> Maybe you can seperate the two commands; first umount and then as a new
> command echo $?. The latter result is what I am especially interested in;
> and maybe there are some problems inside the mount plugin with special mount
> point names. Would you mind telling the name of the mount point? At least as
> a schema?

I'm sorry - turns out I forgot the semicolon after the mount point, that's where the output "umount: echo: No such file or directory" stemmed from. Sorry for wasting your time. When typed correctly, "umount /run/media/denis/ASSORTED; echo $?" produces just "0".

The same results if I first umount and then as a new command "echo $?". 

I have no spaces in my mount point. I have given the path above, it's /run/media/denis/ASSORTED.
ASSORTED is the label of this flash drive, and thunar-volman authomatically assigns where to mount it.

The problem with the plugin not unmounting this flash drive still stands - this at least wasn't my mistake.
Comment 6 Fabian Nowak editbugs 2017-01-28 16:30:43 CET
OK, I have the same problem with a USB stick with a Linux live image that is formatted as NTFS (for whatever reason). When hung in automatically or even manually by Thunar, I cannot unmount via the xfce4-mount-plugin. Would you mind confirming that by testing on your computer? With a second exfat filesystem on the stick, only the latter is mounted automatically and cannot be unmounted just as you reported.

In contrast, vfat partitions mounted by Thunar manually can be removed via the plugin.

To me, it seems we have several effects:

- With several partitions on a disk/stick, only 1 is mounted automatically and shown in Thunar as a device. Resolving mount point and device might be a problem. 

- From the mount plugin's messages, we can tell that it has some problems in resolving entries from /etc/fstab to the current mount table. Do you have an entry in /etc/fstab pointing to the same device such as /dev/sdb1? Solution may be to have a custom umount command using the device placeholder instead of the mount point: "umount %d".

- FUSE filesystems (such as exfat). They are automatically unmounted using "fusermount -u". fuse.sshfs is unmounted properly, fuseblk seems to be causing problems. Device cannot be found in /etc/mtab; 
$ fusermount -u "/media/user/Debian 7.8.0 i386 1"
fusermount: entry for /media/user/Debian 7.8.0 i386 1 not found in /etc/mtab
$ umount "/media/user/Debian 7.8.0 i386 1"; echo $?
0

- Several spaces in mount point names haven't been supported so far.

- Maybe encoding problems of device names, "Debian iso" is converted in /etc/mtab to "Debian\040iso".

As a first result, I will try using "fusermount -u" only for "fuse.*" filesystems but not for "fuse" only, so that FUSE filesystems will be unmounted using the regular umount commands.

Secondly, I target supporting several spaces in mount point names.

Please check the newest release.
Comment 7 Fabian Nowak editbugs 2017-01-28 16:33:19 CET
Closing. Thanks for reporting; this also made me remove another issue and potentially fix a memory allocation bug.

Bug #13304

Reported by:
Denis
Reported on: 2017-01-22
Last modified on: 2017-01-28

People

Assignee:
Fabian Nowak
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information