Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot unmount with ldmc -r #59

Open
kaarelmand opened this issue Jan 9, 2016 · 21 comments
Open

Cannot unmount with ldmc -r #59

kaarelmand opened this issue Jan 9, 2016 · 21 comments

Comments

@kaarelmand
Copy link

I must apologise for being a Linux noob, but this is a nice program I would really like to use, if only I could get it working somehow. The problem is that I cannot seem to unmount my flash drive with ldmc -r. I have installed ldm from the AUR, I have enabled ldm.service and have set the required options in /etc/ldm.conf.

Here is what I tried:

  1. My usb flash drive gets automounted nicely when I plug it in.
  2. I run ldmc -l, the drive is listed (/dev/sdb1).
  3. I run ldmc -r /dev/sdb1, and get the message "Operation completed successfully".
  4. I run ldmc -l again, the drive is not listed any more.
  5. However, when I run lsblk, the drive is still shown as mounted.
  6. Thinking that there is another service somewhere that is automounting the drive, I run 'sudo systemctl stop ldm.service && sudo umount /dev/sdb1.
  7. This seems to unmount the drive, as lsblk is not showing it as mounted any more.
  8. I reinsert the flash drive, but it does not get mounted, so I guess there isn't another program trying to automount the drive (successfully, at least).
  9. I run 'sudo systemctl start ldm' and the drive gets automounted quickly, it shows up in both lsblk and ldmc -l.
  10. When I run ldmc -r /dev/sdb1 again, I get the message "Operation completed successfully" again.
  11. Now, however, even ldmc -l shows it still as mounted, not only lsblk.

So, I don't know what to do any more. Might it be a problem with udev configuration? Unfortunately I am quite the noob and I don't know where to start troubleshooting it. My Arch Linux install is also quite old now and I don't remember all the things I did in /etc/ several months ago.

@LemonBoy
Copy link
Owner

Does dmesg/journalctl show anything?

@kaarelmand
Copy link
Author

Journalctl shows this when I run ldmc -r /dev/sde1

Jan 11 19:03:13 user-lappy ntfs-3g[10306]: Unmounting /dev/sde1 (user-usb1)
Jan 11 19:03:13 user-lappy ntfs-3g[345]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Jan 11 19:03:13 user-lappy ntfs-3g[345]: Failed to read index block: Input/output error
Jan 11 19:03:13 user-lappy kernel: buffer_io_error: 118 callbacks suppressed
Jan 11 19:03:13 user-lappy kernel: Buffer I/O error on dev sdd1, logical block 960229, async page read
Jan 11 19:03:13 user-lappy ntfs-3g[29596]: Version 2015.3.14 external FUSE 29
Jan 11 19:03:13 user-lappy ntfs-3g[29596]: Mounted /dev/sde1 (Read-Write, label "user-usb1", NTFS 3.1)
Jan 11 19:03:13 user-lappy ntfs-3g[29596]: Cmdline options: rw,uid=1000,gid=1000,utf8,dmask=0022,fmask=0133
Jan 11 19:03:13 user-lappy ntfs-3g[29596]: Mount options: rw,utf8,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sde1,blkdev,blksize=4096
Jan 11 19:03:13 user-lappy ntfs-3g[29596]: Global ownership and permissions enforced, configuration type 7

@LemonBoy
Copy link
Owner

Hrm, it seems to be related to the other bug (#60) since both exfat and ntfs-3g are fuse-based.

@LemonBoy
Copy link
Owner

The latest couple of commits should help, can you test ?

@kaarelmand
Copy link
Author

So I uninstalled the AUR version of ldm, built and installed ldm from github, rebooted, and tried again. Still, there is no luck in unmounting, either with ldmc -r or umount. Actually, what seems to happen is that ldm unmounts the drive and then immediately remounts it again. This is what journalctl shows when I plug in my drive:

Jan 21 16:31:13 <hostname> kernel: usb 8-1: new high-speed USB device number 4 using ehci-pci
Jan 21 16:31:13 <hostname> kernel: usb-storage 8-1:1.0: USB Mass Storage device detected
Jan 21 16:31:13 <hostname> kernel: scsi host9: usb-storage 8-1:1.0
Jan 21 16:31:13 <hostname> mtp-probe[6354]: checking bus 8, device 4: "/sys/devices/pci0000:00/0000:00:1d.7/usb8/8-1"
Jan 21 16:31:13 <hostname> mtp-probe[6354]: bus: 8, device: 4 was not an MTP device
Jan 21 16:31:15 <hostname> kernel: scsi 9:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
Jan 21 16:31:16 <hostname> kernel: sd 10:0:0:0: [sdb] 61457664 512-byte logical blocks: (31.4 GB/29.3 GiB)
Jan 21 16:31:16 <hostname> kernel: sd 10:0:0:0: [sdb] Write Protect is off
Jan 21 16:31:16 <hostname> kernel: sd 10:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jan 21 16:31:16 <hostname> kernel: sd 10:0:0:0: [sdb] No Caching mode page found
Jan 21 16:31:16 <hostname> kernel: sd 10:0:0:0: [sdb] Assuming drive cache: write through
Jan 21 16:31:16 <hostname> kernel:  sdb: sdb1
Jan 21 16:31:16 <hostname> kernel: sd 10:0:0:0: [sdb] Attached SCSI removable disk
Jan 21 16:31:16 <hostname> ldm[552]: Mount helper returned code 0
Jan 21 16:31:16 <hostname> ntfs-3g[6445]: Version 2015.3.14 external FUSE 29
Jan 21 16:31:16 <hostname> ntfs-3g[6445]: Mounted /dev/sdb1 (Read-Write, label "username-usb1", NTFS 3.1)
Jan 21 16:31:16 <hostname> ntfs-3g[6445]: Cmdline options: rw,uid=1000,gid=1000,utf8,dmask=0022,fmask=0133,uhelper=ldm
Jan 21 16:31:16 <hostname> ntfs-3g[6445]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
Jan 21 16:31:16 <hostname> ntfs-3g[6445]: Global ownership and permissions enforced, configuration type 7

This is what it shows when I do ldmc -r /mnt/username-usb1 or umount /mnt/username-usb1

Jan 21 16:50:57 <hostname> ntfs-3g[10881]: Unmounting /dev/sdb1 (username-usb1)
Jan 21 16:50:57 <hostname> ldm[552]: Mount helper returned code 0
Jan 21 16:50:57 <hostname> ntfs-3g[14730]: Version 2015.3.14 external FUSE 29
Jan 21 16:50:57 <hostname> ntfs-3g[14730]: Mounted /dev/sdb1 (Read-Write, label "username-usb1", NTFS 3.1)
Jan 21 16:50:57 <hostname> ntfs-3g[14730]: Cmdline options: rw,uid=1000,gid=1000,utf8,dmask=0022,fmask=0133,uhelper=ldm
Jan 21 16:50:57 <hostname> ntfs-3g[14730]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
Jan 21 16:50:57 <hostname> ntfs-3g[14730]: Global ownership and permissions enforced, configuration type 7

@LemonBoy
Copy link
Owner

I can't reproduce this behaviour, please make sure there's no other tool trying to remount the disk.
What is the output of mount after the disk gets magically remounted ?

@kaarelmand
Copy link
Author

The output of mount is:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=1960880k,nr_inodes=490220,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/mapper/lvmpool-archvol on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
/dev/mapper/lvmpool-lubuntuvol on /mnt/lubuntu type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=393772k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda3 on /mnt/2efc742b-f24f-452d-9838-239e374488b8 type ext4 (rw,relatime,data=ordered,uhelper=ldm)
/dev/sdb1 on /mnt/username-usb1 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=ldm)

Also, I do not know what programs I should look for - udisks is not installed at any rate and I don't remember trying anything else out other than that and ldm. Sorry, I'm pretty much a Linux noob.

@LemonBoy
Copy link
Owner

I just don't know then, WORKSFORME.

@kaarelmand
Copy link
Author

Oh well. Still, thank you very much for going through the trouble of looking at the problem though. I hope that when I eventually reinstall, it will work.

@LemonBoy
Copy link
Owner

The other user who had similar problems confirmed the latest commits (and the latest release) fixes them, would you mind trying it out ?

@kaarelmand
Copy link
Author

I built it from source now and tried it out, but no luck sadly. But it does behave differently now.

  • When I plug in a usb stick, it mounts it, but ldmc -r /mnt/usb-stick1 just gives The operation didn't complete successfully. Journalctl doesn't even give any output.
  • When I plug that one out and plug in another stick, it does the same.
  • However, when both ones are plugged in, after giving the unmount command, ldmc says Operation completed successfully, but the drive gets automounted instantly, just like before.

I guess my system configuration is just screwed up in some unknown place. Or maybe it is something wrong with my (ntfs) memory sticks.

@LemonBoy
Copy link
Owner

Interesting. Would you give a go at this [1] patch ? (apply it with patch over the source)
It adds some more debug output that's redirected to the system log, I'd love to have the output for the three cases you tried :)

[1] http://ix.io/nYi

@kaarelmand
Copy link
Author

Sorry for the big delay, I got caught up in work and didn't have time to mess around with the computer for a while. Also, now my second usb drive died, so I can't really test the scenario in my last post. I did apply the patch and try mounting my remaining thumb drive.

Plugging thumb drive in:

Feb 22 16:31:30 user-lappy kernel: usb 8-1: new high-speed USB device number 2 using ehci-pci
Feb 22 16:31:30 user-lappy mtp-probe[3032]: checking bus 8, device 2: "/sys/devices/pci0000:00/0000:00:1d.7/usb8/8-1"
Feb 22 16:31:30 user-lappy mtp-probe[3032]: bus: 8, device: 2 was not an MTP device
Feb 22 16:31:31 user-lappy kernel: usb-storage 8-1:1.0: USB Mass Storage device detected
Feb 22 16:31:31 user-lappy kernel: scsi host8: usb-storage 8-1:1.0
Feb 22 16:31:31 user-lappy kernel: usbcore: registered new interface driver usb-storage
Feb 22 16:31:31 user-lappy kernel: usbcore: registered new interface driver uas
Feb 22 16:31:32 user-lappy kernel: scsi 8:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 2
Feb 22 16:31:32 user-lappy kernel: sd 8:0:0:0: [sdb] 4167680 512-byte logical blocks: (2.13 GB/1.98 GiB)
Feb 22 16:31:32 user-lappy kernel: sd 8:0:0:0: [sdb] Write Protect is off
Feb 22 16:31:32 user-lappy kernel: sd 8:0:0:0: [sdb] Mode Sense: 03 00 00 00
Feb 22 16:31:32 user-lappy kernel: sd 8:0:0:0: [sdb] No Caching mode page found
Feb 22 16:31:32 user-lappy kernel: sd 8:0:0:0: [sdb] Assuming drive cache: write through
Feb 22 16:31:32 user-lappy kernel:  sdb: sdb1
Feb 22 16:31:32 user-lappy kernel: sd 8:0:0:0: [sdb] Attached SCSI removable disk
Feb 22 16:31:32 user-lappy kernel: fuse init (API version 7.23)
Feb 22 16:31:32 user-lappy systemd[1]: Mounting FUSE Control File System...
Feb 22 16:31:32 user-lappy systemd[1]: Mounted FUSE Control File System.
Feb 22 16:31:32 user-lappy ldm[608]: Mount helper returned code 0
Feb 22 16:31:32 user-lappy ntfs-3g[3125]: Version 2015.3.14 external FUSE 29
Feb 22 16:31:32 user-lappy ntfs-3g[3125]: Mounted /dev/sdb1 (Read-Write, label "user-backup", NTFS 3.1)
Feb 22 16:31:32 user-lappy ntfs-3g[3125]: Cmdline options: rw,uid=1000,gid=1000,utf8,dmask=0022,fmask=0133,uhelper=ldm
Feb 22 16:31:32 user-lappy ntfs-3g[3125]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
Feb 22 16:31:32 user-lappy ntfs-3g[3125]: Global ownership and permissions enforced, configuration type 7

Running ldmc -r, gives "The operation didn't complete successfully":

Feb 22 16:32:23 user-lappy ldm[608]: R R/mnt/user-backup/
Feb 22 16:32:23 user-lappy ldm[608]: Realpath = /mnt/user-backup
Feb 22 16:32:23 user-lappy ldm[608]: Dev is 0x9880e0
Feb 22 16:32:23 user-lappy ldm[608]: SEARCHING...
Feb 22 16:32:23 user-lappy ldm[608]: device_umount = 0

Running sudo umount - gives no error, but the thumb drive still ends up being mounted:

Feb 22 16:36:21 user-lappy sudo[5901]:   user : TTY=pts/1 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/umount /mnt/user-backup
Feb 22 16:36:21 user-lappy sudo[5901]: pam_unix(sudo:session): session opened for user root by (uid=0)
Feb 22 16:36:21 user-lappy ntfs-3g[3125]: Unmounting /dev/sdb1 (user-backup)
Feb 22 16:36:21 user-lappy sudo[5901]: pam_unix(sudo:session): session closed for user root
Feb 22 16:36:21 user-lappy ldm[608]: SEARCHING...
Feb 22 16:36:21 user-lappy ldm[608]: Mount helper returned code 0
Feb 22 16:36:21 user-lappy ntfs-3g[5907]: Version 2015.3.14 external FUSE 29
Feb 22 16:36:21 user-lappy ntfs-3g[5907]: Mounted /dev/sdb1 (Read-Write, label "user-backup", NTFS 3.1)
Feb 22 16:36:21 user-lappy ntfs-3g[5907]: Cmdline options: rw,uid=1000,gid=1000,utf8,dmask=0022,fmask=0133,uhelper=ldm
Feb 22 16:36:21 user-lappy ntfs-3g[5907]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
Feb 22 16:36:21 user-lappy ntfs-3g[5907]: Global ownership and permissions enforced, configuration type 7

Now I ran ldmc -r again, this time it said "Operation completed successfully", but the drive still got remounted:

Feb 22 16:40:56 user-lappy ldm[608]: R R/mnt/user-backup/
Feb 22 16:40:56 user-lappy ldm[608]: Realpath = /mnt/user-backup
Feb 22 16:40:56 user-lappy ldm[608]: Dev is 0x9878c0
Feb 22 16:40:56 user-lappy ldm[608]: SEARCHING...
Feb 22 16:40:56 user-lappy ldm[608]: FOUND!
Feb 22 16:40:56 user-lappy ntfs-3g[5907]: Unmounting /dev/sdb1 (user-backup)
Feb 22 16:40:56 user-lappy ldm[608]: device_umount = 1
Feb 22 16:40:57 user-lappy ldm[608]: SEARCHING...
Feb 22 16:40:57 user-lappy ldm[608]: FOUND!
Feb 22 16:40:57 user-lappy ldm[608]: Error in syscall (Invalid argument)
Feb 22 16:40:57 user-lappy ldm[608]: Error while unmounting /dev/sdb1
Feb 22 16:40:57 user-lappy ntfs-3g[8248]: Version 2015.3.14 external FUSE 29
Feb 22 16:40:57 user-lappy ntfs-3g[8248]: Mounted /dev/sdb1 (Read-Write, label "user-backup", NTFS 3.1)
Feb 22 16:40:57 user-lappy ntfs-3g[8248]: Cmdline options: rw,uid=1000,gid=1000,utf8,dmask=0022,fmask=0133,uhelper=ldm
Feb 22 16:40:57 user-lappy ntfs-3g[8248]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
Feb 22 16:40:57 user-lappy ntfs-3g[8248]: Global ownership and permissions enforced, configuration type 7
Feb 22 16:40:57 user-lappy ldm[608]: Mount helper returned code 0

@LemonBoy
Copy link
Owner

You don't really need sudo before umount.
The first sequence indicates that it didn't find the device in the mtab, probably the code that updates the in-memory copy didn't fire.
The second sequence is the weird one, umount doesn't care about the uhelper since you've run that as root, and then somehow udev gets another event that makes ldm remount it (maybe it's getting a change event).
Those are some notes for myself, I'll come back later when I have some time 🎈

@LemonBoy
Copy link
Owner

Could you please try the debug branch and report the same results as above ?

@nonamethanks
Copy link

nonamethanks commented May 19, 2016

@LemonBoy I have this exact same problem and the debug branch doesn't help, the results are the same. The daemon immediately mounts the drive after it's unmounted.

Output of mount:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4027604k,nr_inodes=1006901,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda5 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=806044k,mode=700,uid=1000,gid=100)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
/dev/sdb1 on /mnt/SAMSUNG type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=ldm)

Output of journalctl:

May 19 14:13:01 za-warudo sudo[16857]: nonamethanks : TTY=pts/2 ; PWD=/home/nonamethanks/Various/ldm-debug/bin ; USER=root ; COMMAND=./ldmc -r /dev/sdb1
May 19 14:13:01 za-warudo sudo[16857]: pam_unix(sudo:session): session opened for user root by (uid=0)
May 19 14:13:01 za-warudo ntfs-3g[16765]: Unmounting /dev/sdb1 (SAMSUNG)
May 19 14:13:01 za-warudo sudo[16857]: pam_unix(sudo:session): session closed for user root
May 19 14:13:02 za-warudo ntfs-3g[16864]: Version 2016.2.22 external FUSE 29
May 19 14:13:02 za-warudo ntfs-3g[16864]: Mounted /dev/sdb1 (Read-Write, label "SAMSUNG", NTFS 3.1)
May 19 14:13:02 za-warudo ntfs-3g[16864]: Cmdline options: rw,uid=1000,gid=100,utf8,dmask=0022,fmask=0133,uhelper=ldm
May 19 14:13:02 za-warudo ntfs-3g[16864]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
May 19 14:13:02 za-warudo ntfs-3g[16864]: Global ownership and permissions enforced, configuration type 7
May 19 14:13:02 za-warudo ldm[16723]: Mount helper returned code 0

@nonamethanks
Copy link

Oh and by the way using ldm not in daemon mode doesn't return anything for me in the terminal it's running in.

@loonies
Copy link

loonies commented May 25, 2016

I'm also affected. Arch Linux, ldm 0.7

@LemonBoy
Copy link
Owner

I'm especially interested in the lines from journalctl marked with ldm, I suspect that a change event is issued (because of fuse ?)

@loonies
Copy link

loonies commented Jun 5, 2016

Connecting external portable HDD, yields this in systemd journal:

Jun 05 20:59:41 <hostname> kernel: usb 4-2: new SuperSpeed USB device number 6 using xhci_hcd
Jun 05 20:59:41 <hostname> kernel: usb 4-2: Enable of device-initiated U1 failed.
Jun 05 20:59:41 <hostname> kernel: usb 4-2: Enable of device-initiated U2 failed.
Jun 05 20:59:41 <hostname> kernel: usb-storage 4-2:1.0: USB Mass Storage device detected
Jun 05 20:59:41 <hostname> kernel: scsi host12: usb-storage 4-2:1.0
Jun 05 20:59:41 <hostname> kernel: usb 4-2: Enable of device-initiated U1 failed.
Jun 05 20:59:41 <hostname> kernel: usb 4-2: Enable of device-initiated U2 failed.
Jun 05 20:59:45 <hostname> kernel: scsi 12:0:0:0: Direct-Access     Samsung  M3 Portable      3    PQ: 0 ANSI: 6
Jun 05 20:59:47 <hostname> kernel: sd 12:0:0:0: [sdc] 1953504688 512-byte logical blocks: (1.00 TB/932 GiB)
Jun 05 20:59:47 <hostname> kernel: sd 12:0:0:0: [sdc] Write Protect is off
Jun 05 20:59:47 <hostname> kernel: sd 12:0:0:0: [sdc] Mode Sense: 27 00 00 00
Jun 05 20:59:47 <hostname> kernel: sd 12:0:0:0: [sdc] No Caching mode page found
Jun 05 20:59:47 <hostname> kernel: sd 12:0:0:0: [sdc] Assuming drive cache: write through
Jun 05 20:59:47 <hostname> kernel:  sdc: sdc1 sdc2
Jun 05 20:59:47 <hostname> kernel: sd 12:0:0:0: [sdc] Attached SCSI disk
Jun 05 20:59:47 <hostname> ldm[20941]: Mount helper returned code 0
Jun 05 20:59:47 <hostname> ntfs-3g[21047]: Version 2016.2.22 external FUSE 29
Jun 05 20:59:47 <hostname> ntfs-3g[21047]: Mounted /dev/sdc2 (Read-Write, label "portab", NTFS 3.1)
Jun 05 20:59:47 <hostname> ntfs-3g[21047]: Cmdline options: rw,uid=1000,gid=100,utf8,dmask=0022,fmask=0133,uhelper=ldm
Jun 05 20:59:47 <hostname> ntfs-3g[21047]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdc2,blkdev,blksize=4096
Jun 05 20:59:47 <hostname> ntfs-3g[21047]: Global ownership and permissions enforced, configuration type 7
Jun 05 21:00:13 <hostname> ntfs-3g[21047]: Unmounting /dev/sdc2 (portab)
Jun 05 21:00:13 <hostname> ntfs-3g[21065]: Version 2016.2.22 external FUSE 29
Jun 05 21:00:13 <hostname> ntfs-3g[21065]: Mounted /dev/sdc2 (Read-Write, label "portab", NTFS 3.1)
Jun 05 21:00:13 <hostname> ntfs-3g[21065]: Cmdline options: rw,uid=1000,gid=100,utf8,dmask=0022,fmask=0133,uhelper=ldm
Jun 05 21:00:13 <hostname> ntfs-3g[21065]: Mount options: rw,utf8,uhelper=ldm,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdc2,blkdev,blksize=4096
Jun 05 21:00:13 <hostname> ntfs-3g[21065]: Global ownership and permissions enforced, configuration type 7
Jun 05 21:00:13 <hostname> ldm[20941]: Mount helper returned code 0

Output of mount and ldmc is:

$ mount | grep mnt                                                                                                                                                                   
/dev/sdc2 on /mnt/portab type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=ldm)
$ ldmc -l
v "/dev/sdc2" "ntfs" "/mnt/portab"
$ ldmc -r /dev/sdc2
Operation completed successfully
$ mount | grep mnt
/dev/sdc2 on /mnt/portab type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=ldm)
$ ldmc -l
v "/dev/sdc2" "ntfs" "/mnt/portab"

Stopping ldm service (systemctl stop ldm.service) umounts device.

Mounting / umounting (another) USB flash drive works as expected.

Let me know if you need any further info.

@loonies
Copy link

loonies commented Jun 5, 2016

P.S.

I think you are right. Looks like it has to do something with FUSE.
This was logged earlier, probably the first time I connected a USB
storage device:

Jun 05 20:04:55 <hostname> kernel: fuse init (API version 7.24)
Jun 05 20:04:55 <hostname> systemd[1]: Mounting FUSE Control File System...
-- Subject: Unit sys-fs-fuse-connections.mount has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sys-fs-fuse-connections.mount has begun starting up.
Jun 05 20:04:55 <hostname> systemd[1]: Mounted FUSE Control File System.
-- Subject: Unit sys-fs-fuse-connections.mount has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sys-fs-fuse-connections.mount has finished starting up.
-- 
-- The start-up result is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants