Bug 403291 - Before Halting System: "ntfs-3g: Unknown option '-n'."
Before Halting System: "ntfs-3g: Unknown option '-n'."
Product: Fedora
Classification: Fedora
Component: ntfs-3g (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-11-28 14:02 EST by Christoph Kindl
Modified: 2008-04-22 12:01 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-22 11:59:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
"Screen Shot" of the error (447.17 KB, image/jpeg)
2007-11-28 14:02 EST, Christoph Kindl
no flags Details
/etc/fstab (637 bytes, text/plain)
2007-11-28 14:03 EST, Christoph Kindl
no flags Details
patch for ntfs-3g to ignore -n mount opt (924 bytes, patch)
2008-02-27 13:22 EST, Tom "spot" Callaway
no flags Details | Diff

  None (edit)
Description Christoph Kindl 2007-11-28 14:02:12 EST
Description of problem:

I have mounted two NTFS windows partitions with /etc/fstab. 
When I save data on one of my partitions quite often (for example when I'm
programming and save my code every time before I execute it) it happens that my
system doesn't shut down completely, it hangs by the latest halt message
"Halting System...". Above the "Halting System..." message, an error of ntfs-3g

ntfs-3g: Unknown option '-n'.

I have noticed this error the second time within one week.

(I hope that this belongs to the component kernel)

Version-Release number of selected component (if applicable):

How reproducible:
I'm sorry but I'm not sure why this error occurs. I think it's because the NTFS
partitions couldn't be clearly unmounted.

The error that is displayed can be created with "ntfs-3g -n" in a terminal
Actual results:
System doesn't turn off, hangs by "Halting System..."
Have to hard-reset my computer

Expected results:
Shouldn't hang ^^

Additional info:
Because I haven't found any log entry:
I have got a photo of my screen that shows this error. This was taken by a
mobile phone camera, but it's readable xD.
Comment 1 Christoph Kindl 2007-11-28 14:02:12 EST
Created attachment 271601 [details]
"Screen Shot" of the error
Comment 2 Christoph Kindl 2007-11-28 14:03:58 EST
Created attachment 271611 [details]
Comment 3 Edward Karavakis 2008-02-25 19:10:35 EST
same problem here
Comment 4 Tom "spot" Callaway 2008-02-26 16:44:30 EST
Very strange. It's as if fstab-decode is generating -n as the option it needs
for the halt script to perform the ntfs umount. Bill, does this make any sense
to you?
Comment 5 Bill Nottingham 2008-02-26 17:41:26 EST
What do you have in /proc/mounts normally?
Comment 6 Bill Nottingham 2008-02-26 17:48:15 EST
I suppose the simplest way to debug this is to slap a set -x in __umount_loop in
/etc/init.d/functions and see what the output is.
Comment 7 Tom "spot" Callaway 2008-02-26 18:03:43 EST
I notice that you're running ntfs-3g-1.1030, which is a bit out of date. I was
unable to reproduce this with the latest package for f8, which is
ntfs-3g-1.1120-1. To be fair, I downgraded to ntfs-3g-1.1030, and I can't
reproduce it with that package either.

Comment 8 Christoph Kindl 2008-02-27 05:15:19 EST
I'm not an expert at shell-scripting at all, but this error could be generated
by the halt script:

line 193-197
# Remount read only anything that's left mounted.
# echo $"Remounting remaining filesystems readonly"
mount | awk '{ print $3 }' | while read line; do
    fstab-decode mount -n -o ro,remount $line

So it's possible be that the ntfs partition couldn't be unmounted, so it will be
remounted read-only, but that fails.

But that's just a wild guess!
(please ignore if that's not possible) xD
Comment 9 Bill Nottingham 2008-02-27 11:33:10 EST
If ntfs mount doesn't support -n, it really needs to...
Comment 10 Tom "spot" Callaway 2008-02-27 11:58:29 EST
Szaka, ntfs-3g doesn't support the -n option to mount. Would you be opposed to
adding it? (The current code is doing some odd "ignore mtab" options that take
effect at compile time, not as a runtime option)
Comment 11 Szabolcs Szakacsits 2008-02-27 12:35:12 EST
No. But the fundamental problem here is that remount is not supported and doing
so can cause data loss the same way as if the partition weren't unmounted at all. 

Please just use unmount at the moment.
Comment 12 Bill Nottingham 2008-02-27 13:05:49 EST
We cannot hardcode different options for different file systems, especially
since we're just calling 'normal' mount/unmount - if it can't support it, it
should just ignore it.
Comment 13 Tom "spot" Callaway 2008-02-27 13:22:48 EST
Created attachment 296100 [details]
patch for ntfs-3g to ignore -n mount opt
Comment 14 Tom "spot" Callaway 2008-04-22 11:59:32 EDT
This is resolved in F-9 and rawhide.

Note You need to log in before you can comment on or make changes to this bug.