Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#43463 - [ntfs-3g, systemd] Mounted partition is immediately unmounted

Attached to Project: Arch Linux
Opened by A. Sarkar (asarkar) - Thursday, 15 January 2015, 19:46 GMT
Last edited by Gaetan Bisson (vesath) - Monday, 19 January 2015, 21:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thomas Bächler (brain0)
Gaetan Bisson (vesath)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



I cannot mount an NTFS partition from fstab and read/write from it. It appears the partition is immediately unmounted and ntfs-3g exits.

Additional info:

ntfs-3g 2014.2.15-1

Steps to reproduce:

$ blkid
/dev/sdb1: UUID="63DC4A4F5506D55F" TYPE="ntfs" PARTUUID="6721a13f-01"

$ sudo ntfs-3g -o debug,no_detach /dev/sdb1 /media/usb
FUSE library version: 2.9.3
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
Version 2014.2.15 external FUSE 29
Mounted /dev/sdb1 (Read-Write, label "", NTFS 3.1)
Cmdline options: debug,no_detach
Mount options: allow_other,nonempty,relatime,fsname=/dev/sdb1,blkdev,blksize=4096
Ownership and permissions disabled, configuration type 7
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.23
INIT: 7.19
unique: 1, success, outsize: 40
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 7196
getattr /
unique: 2, success, outsize: 120
unique: 3, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 7196
getattr /
unique: 3, success, outsize: 120
unique: 4, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 7196
statfs /
unique: 4, success, outsize: 96
unique: 5, opcode: FORGET (2), nodeid: 1, insize: 48, pid: 0
unique: 6, opcode: DESTROY (38), nodeid: 0, insize: 40, pid: 0
Unmounting /dev/sdb1 ()
unique: 6, success, outsize: 16
This task depends upon

Closed by  Gaetan Bisson (vesath)
Monday, 19 January 2015, 21:14 GMT
Reason for closing:  Not a bug
Comment by Gaetan Bisson (vesath) - Friday, 16 January 2015, 01:52 GMT
I have no idea what might be wrong. Last time I checked all worked flawlessly for me. Currently I am without a NTFS drive to check.

Regardless, this does not seem like a packaging bug. Could you report this bug upstream as per ?

Comment by A. Sarkar (asarkar) - Friday, 16 January 2015, 15:28 GMT
This was already reported upstream:

The problem appears to be related to units generated by systemd from /etc/fstab.

$ systemctl status media-usb.mount
● media-usb.mount - /media/usb
Loaded: loaded (/etc/fstab)
Active: inactive (dead)
Where: /media/usb
What: /dev/disk/by-uuid/A0CA-8896
Docs: man:fstab(5)

I can successfully mount NTFS partitions to mountpoints not included in fstab.
Comment by Gaetan Bisson (vesath) - Friday, 16 January 2015, 17:27 GMT
Ah. Let's involve systemd experts then.
Comment by AK (Andreaskem) - Sunday, 18 January 2015, 14:22 GMT
You only posted a part of the output of journalctl -r. I would assume that there is a lot more to be learned from the journal before the unmount happens.
Or is the bug report you mentioned from somebody else? What does the journal say?
Comment by A. Sarkar (asarkar) - Sunday, 18 January 2015, 15:42 GMT
The upstream bug report was by someone else.

I've attached journalctl output from inserting the USB flash drive with the NTFS partition to unmount.
Comment by AK (Andreaskem) - Sunday, 18 January 2015, 16:46 GMT
I'm no expert, but to me it seems like udisks decides to unmount it immediately without systemd/udev involvement?
Comment by Dave Reisner (falconindy) - Sunday, 18 January 2015, 17:16 GMT
No, that's udisks responding to something else umounting the filesystem. The something else doesn't appear in those logs.

systemd-analyze set-log-level debug

Will show systemd's involvement.
Comment by A. Sarkar (asarkar) - Sunday, 18 January 2015, 17:27 GMT
I have attached a log with debug information.

The relevant lines appear to be:

Jan 18 12:24:07 ganymede systemd[1]: media-usb.mount changed dead -> mounted
Jan 18 12:24:07 ganymede systemd[1]: Unit media-usb.mount is bound to inactive service. Stopping, too.
Jan 18 12:24:07 ganymede systemd[1]: Trying to enqueue job media-usb.mount/stop/fail
Jan 18 12:24:07 ganymede systemd[1]: Installed new job media-usb.mount/stop as 873
Jan 18 12:24:07 ganymede systemd[1]: Enqueued job media-usb.mount/stop as 873
   log (17.6 KiB)
Comment by Anatol Pomozov (anatolik) - Sunday, 18 January 2015, 18:01 GMT
What is process with "pid: 7196" from your logs? It tries to access the root directory and maybe it is what causes the unmount?
Comment by AK (Andreaskem) - Sunday, 18 January 2015, 18:02 GMT
Altered fstab without executing systemctl daemon-reload afterward?
Leftover unit file somewhere?
Wrong label or UUID in /etc/fstab?

In fact:
What: /dev/disk/by-uuid/A0CA-8896
$ blkid
/dev/sdb1: UUID="63DC4A4F5506D55F" TYPE="ntfs" PARTUUID="6721a13f-01"
Comment by A. Sarkar (asarkar) - Monday, 19 January 2015, 20:14 GMT
Changing the UUID in /etc/fstab fixed it. Please close this bug.