Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ntfs-3g write not committed?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Tue Jun 19, 2007 11:54 am    Post subject: ntfs-3g write not committed? Reply with quote

Hi,

I am running Gentoo amd64 on Athlon 64 3200+, 1Gb Ram, gentoo-sources-2.6.19-r5.

I have ntfs-3g mounting my sata partition. It is mounted on /sda2 with the force option on boot up with an entry in /etc/fstab.

I had written an avi file onto there from Windows and then rebooted into Linux so I could create a DVD from it.

So...

I cd'd into /sda2 and I changed the file name first of all from "somereallylongfilename.avi" to "shortname.avi". I then used mencoder to create shortname.mpg so now my file structure looks like this

/sda2/shortname.avi
/sda2/shortname.mpg

The encoding took a while so I decided to shut down and come back to it the next day.

When I booted back up and went into /sda2 I was really surprised to see that it had reverted back to:
/sda2/somereallylongfilename.avi.

How has it reverted?!? 8O

As /sda2 is in fstab, it should have unmounted properly on shut down. I am seeing some "unrespresentable filename for inode ***" in /var/log/messages, but I think these are other files within /sda2.

So it looks like I am going to have to re-encode my video file.

I am pretty sure I am using the latest ~amd64 version of fuse and ntfs-3g.

Can anyone think what may have gone wrong here?
Back to top
View user's profile Send private message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Tue Jun 19, 2007 7:40 pm    Post subject: Reply with quote

Sorry, I wasn't at my home computer when I posted.

Confirm Version numbers - sys-fs/fuse-2.6.4-r1 and sys-fs/ntfs3g-1.516

I will post a bug to ntfs3g themselves but wanted to make sure it wasn't something really obvious that I'd done.

I have been through their FAQ and this problem isn't covered. I think ntfs-3g is REALLY useful and this project is great - I hope it is something I have done wrong but I can't see how or what.
Back to top
View user's profile Send private message
irgu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Apr 2003
Posts: 131

PostPosted: Tue Jun 19, 2007 9:59 pm    Post subject: Reply with quote

Only 2.6.20+ kernels are safe. Earlier ones can fail flushing all data to the disk during unmount, no matter if you have the needed line in fstab or not. You're using 2.6.19-r5 and I think ntfs-3g should have warned you something about this.

Another explanation could be if Windows "System Restore" got activated for some reason.
Back to top
View user's profile Send private message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Wed Jun 20, 2007 10:30 am    Post subject: Reply with quote

Not that I don't believe you... but I can't find anything about that anywhere... any chance of a link to an explanation? :lol:

Is that the case with using the in kernel fuse module or the installable fuse package? I know they added support in for the in kernel module in January I think. Can the flush fail in both cases for <2.6.20?
Back to top
View user's profile Send private message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Wed Jun 20, 2007 10:35 am    Post subject: Reply with quote

Taken from gmane

Quote:
Due to the __TREMENDOUS__ amount of requests for older FUSE kernel module
support, here it is. It's very interesting that this was far the most often
asked feature for the stable release.

The capability of the FUSE kernel module is automatically detected
and used. Upgrading the FUSE kernel module will not require ntfs-3g
reinstallation.

Please note, the recommended FUSE kernel module is available in the
official Linux kernels since version 2.6.20-rc1 and in the FUSE 2.6.x
software packages


So if you are using the fuse kernel module then yes, it needs to be 2.6.20-rc1 or later. However I am using the fuse 2.6.X package which should work whether I am on an older kernel version or not.
Back to top
View user's profile Send private message
irgu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Apr 2003
Posts: 131

PostPosted: Wed Jun 20, 2007 5:56 pm    Post subject: Reply with quote

roycrom wrote:
So if you are using the fuse kernel module then yes, it needs to be 2.6.20-rc1 or later. However I am using the fuse 2.6.X package which should work whether I am on an older kernel version or not.

Absolutely most definitely not true. The fuse package installs only the fuse user space library by default, not the fuse kernel module which would make the driver safe. It's explained here: http://ntfs-3g.org/support.html#fuse26
Back to top
View user's profile Send private message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Thu Jun 21, 2007 10:41 am    Post subject: Reply with quote

Taken from that very same link

Quote:
The Linux kernel must be upgraded either to at least version 2.6.20, or the FUSE kernel driver must be upgraded to a safe version which is also included in the FUSE package for Linux kernel version 2.6.9 and later.


Kernel driver is included in Fuse package for kernels 2.6.9 and later.

Code:

# zgrep -i "fuse" /proc/config.gz
# CONFIG_FUSE_FS is not set

Code:
# lsmod | grep -i fuse


No result from this, so I emerge fuse package - # emerge sys-fs/fuse

Code:
# modprobe fuse
# lsmod | grep -i fuse

Code:
fuse                   34196  0


So it seems to me that the safe fuse kernel module is included in thhe package.
Back to top
View user's profile Send private message
irgu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Apr 2003
Posts: 131

PostPosted: Thu Jun 21, 2007 10:43 pm    Post subject: Reply with quote

The safe fuse kernel modul is in the fuse package but it does not installed by default. The existence of a fuse module in the kernel means absolutely nothing. The fuse kernel API must be at least 7.8, if not then it's unsafe.

But it's very easy to decide if you have safe or unsafe kernel. If you see this message during ntfs mount
Code:

WARNING: Deficient Linux kernel detected. Some driver features are
not available (swap file on NTFS, boot from NTFS by LILO), and
unmount is not safe unless it's made sure the ntfs-3g process
naturally terminates after calling 'umount'. If you wish this
message to disappear then you should upgrade to at least kernel
version 2.6.20, or request help from your distribution to fix
the kernel problem. The below web page has more information:
http://ntfs-3g.org/support.html#fuse26

then your kernel is unsafe. Otherwise it's safe.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Fri Jun 22, 2007 7:57 am    Post subject: Reply with quote

@irgu: Check the ebuild! And you'll see that it checks the kernel configuration. If it finds fuse in the kernel, it will only build the userspace utilities. If there's no fuse in the kernel, it will build both the userspace utilities and the kernel module. roycrom does not have fuse in his kernel, so the ebuild will give him the up-to-date (and safe) module.

@roycrom: why do you mount with the force option? It should mount without it. If it doesn't, then the filesystem isn't clean and ntfs-3g not wanting to make changes to it seems normal to me (better not change anything than corrupt the partition). I would advise you to boot windows and run a 'chkdsk /f'. Then reboot windows as you will be asked to do, and let it check the filesystem. Then reboot into windows again, just in case there are still pending operations on the filesystem. Afterwards boot into linux and the filesystem should be mountable without the force option.
Back to top
View user's profile Send private message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Fri Jun 22, 2007 9:39 am    Post subject: Reply with quote

Hi Gusar,

ntfs-3g says my volume is unclean and suggests I boot into Windows twice to fix it. This never works! I must admit though, that I have never run chkdsk to try and sort this out - thanks for the suggestion.

When I get back home I will boot up and run the chkdsk /f and then reboot a couple of times.

If that helps me to mount without a force then I will see if the problem with writes not being kept after reboot goes away.

Thanks for the input irgu and Gusar. :)
Back to top
View user's profile Send private message
irgu
Tux's lil' helper
Tux's lil' helper


Joined: 25 Apr 2003
Posts: 131

PostPosted: Fri Jun 22, 2007 12:22 pm    Post subject: Reply with quote

roycrom wrote:
I will see if the problem with writes not being kept after reboot goes away.

Is it reproducible? :-o Do you have Vista? What's your disk controller, how many disks, what kind of? Do you have libata, ide errors in your /var/log/messages file? Do you have any disk/contect protection security software on your Windows?
Back to top
View user's profile Send private message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Fri Jun 22, 2007 12:36 pm    Post subject: Reply with quote

I've not done any consistent testing but it has happened more than once.

I have a Via K8V-X motherboard. Two 160Gb SATA drives in RAID 0 using the VIA Raid setup utility on bootup.

I use Windows XP SP2, no encryption or special security. Just out of the box settings.

I am not at home now, but I am pretty sure I have no ide errors as I checked there to try and get to the bottom of this and don't recall any messages/warning about libata/ide.

I shall make sure I post back when I have tried Gusar's chkdsk suggestion. I have a feeling that this may be the cause as I have been using the -o force option for a while now :oops:
Back to top
View user's profile Send private message
roycrom
n00b
n00b


Joined: 22 Dec 2005
Posts: 36

PostPosted: Mon Jun 25, 2007 9:01 am    Post subject: Reply with quote

Good news, I did a chkdsk on my sata drive and I can now boot up into gentoo and mount the partitions without forcing.

I have performed a few operations and rebooted and the file system changes seem to be kept. It did seem rather intermittent before but so far so good.

Thanks for the help - hopefully everything will stay nice and consistent now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum