Bug 403291

Summary: Before Halting System: "ntfs-3g: Unknown option '-n'."
Product: [Fedora] Fedora Reporter: Christoph Kindl <christoph.kindl>
Component: ntfs-3gAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: notting, szaka
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-22 15:59:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
"Screen Shot" of the error
none
/etc/fstab
none
patch for ntfs-3g to ignore -n mount opt none

Description Christoph Kindl 2007-11-28 19:02:12 UTC
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
occurs:

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):
kernel 2.6.23.1-49.fc8

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 19:02:12 UTC
Created attachment 271601 [details]
"Screen Shot" of the error

Comment 2 Christoph Kindl 2007-11-28 19:03:58 UTC
Created attachment 271611 [details]
/etc/fstab

Comment 3 Edward Karavakis 2008-02-26 00:10:35 UTC
same problem here

Comment 4 Tom "spot" Callaway 2008-02-26 21:44:30 UTC
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 22:41:26 UTC
What do you have in /proc/mounts normally?

Comment 6 Bill Nottingham 2008-02-26 22:48:15 UTC
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 23:03:43 UTC
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 10:15:19 UTC
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
done

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 16:33:10 UTC
If ntfs mount doesn't support -n, it really needs to...

Comment 10 Tom "spot" Callaway 2008-02-27 16:58:29 UTC
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 17:35:12 UTC
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 18:05:49 UTC
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 18:22:48 UTC
Created attachment 296100 [details]
patch for ntfs-3g to ignore -n mount opt

Comment 14 Tom "spot" Callaway 2008-04-22 15:59:32 UTC
This is resolved in F-9 and rawhide.