# ntfs-3g issue

## Saundersx

Either this is a bug or I am using it wrong.

I have a ntfs partition mounted as read-only with ntfs3g. When I startup vmware and write a file to that partition, ntfs under linux refuses to see the changes. Refreshing in konquerer, in bash, nothing will make it see the new/changed files. It appears to be caching the contents and it happens every single time.

my fstab

```
/dev/sda1    /mnt/xp_c   ntfs-3g    user,noexec,silent,umask=0,locale=en_US.utf8,no_def_opts,allow_other,ro  0 0
```

Question is how can I make it work properly/stop caching?

----------

## batistuta

I don't get it. How do you write to that partition from vmware? VMware doesn't have access to anything outside the virtual machine, unless it goes over the virtual network. 

Something else that I don't get: why do you use ntfs3g for read only? For readonly, stick to the kernel drivers that are considered not as beta as ntfs3g

----------

## gringo

 *Quote:*   

> VMware doesn't have access to anything outside the virtual machine, unless it goes over the virtual network. 

 

not true, afaik vmware can be configured to have raw access to a partition or disk.

 *Quote:*   

> why do you use ntfs3g for read only? 

 

i suppose to not fuck up the fs when accesing it natively and from inside vmware at the same time

@Saundersx : there is a feature in vmware that instructs the programm to not commit any changes to the guest fs. You dont´have this enabled, dont´you ?

cheers

----------

## batistuta

 *gringo wrote:*   

> not true, afaik vmware can be configured to have raw access to a partition or disk.

 

But does this partition need to be dedicated physical disk partition, or can it be part of a different filesystem? I would be interested in knowing this. If you have links please post!

 *gringo wrote:*   

>  *Quote:*   why do you use ntfs3g for read only?  
> 
> i suppose to not fuck up the fs when accesing it natively and from inside vmware at the same time

 

Don't get it

----------

## Saundersx

 *gringo wrote:*   

> 
> 
> i suppose to not fuck up the fs when accesing it natively and from inside vmware at the same time
> 
> 

 

exactly, i can't imagine a faster way to nuke a ntfs parition if I did.

 *gringo wrote:*   

> 
> 
> @Saundersx : there is a feature in vmware that instructs the programm to not commit any changes to the guest fs. You dont´have this enabled, dont´you ?
> 
> 

 

Nope. In fact for performance sake I have it writing immediately. 

It's kind of obvious what's going on is ntfs3g is caching, question is how do I disable it. Since it's readonly I don't know if they even have the option.

----------

## wjb

Restating the problem slightly, you want two computers (one virtual) to be able to access the same hard disk?

I think the problem here is that the two drivers have no possible way to cooperate.

Instead, it should be possible to use samba to access a windows shared disk in the vmware image?

----------

## Ast0r

Have you tried it with the partition mounted read/write? I have had great success with ntfs3g, but I can't recommend trying to run a virtual machine in VMware whose VMX file is on an NTFS partition - it's never worked for me.

----------

## batistuta

I still don't follow your reasoning. If you want read-only access from your linux host OS, you don't need ntfs3g and can stick to ntfs kernel driver.

As far as vmware docs state, the only requirement is that you don't access concurrently from both the host and guest os. So you'd need to unmount on your linux host before accessing the partition from your guest. But whether the host mounts read only with ntfs or ntfs3g is not relevant. That said I wouldn't use ntfs3g for readonly due to its beta state

----------

## Saundersx

ok mabye I didn't make myself clear enough.

I have a partition, this partition is ntfs, vmware reads the partition as a /dev/sdaX, I also want to read this partition from linux at the same time. I am NOT mounting this partition as ntfs and writing vmware images to it. This is a bootable windows partition I am reading as such in vmware. ntfs-3g > ntfs, they should both do the same thing (read only), one is better, i use the better one. I keep the bootable vmware image in it's own 6gig reiserfs partiton (no not resiser4).

However the samba thing is a good idea, albeit a much much slower alternative.

----------

## Ast0r

 *Saundersx wrote:*   

> ok mabye I didn't make myself clear enough.

 

You didn't. *Saundersx wrote:*   

> I have a partition, this partition is ntfs, vmware reads the partition as a /dev/sdaX, I also want to read this partition from linux at the same time.

 

This is a bad idea, no matter what you may think about it. Set up a Windows share with full access to the C:\ drive if you need to access the contents while the virtual machine is on. *Saunderx wrote:*   

> ntfs-3g > ntfs, they should both do the same thing (read only), one is better, i use the better one.

 

Exactly how is it better? The only thing that makes ntfs-3g "better" than the in-kernel ntfs support is that it has write-support. The ntfs driver in the kernel is more stable, has been tested by more people, and will not fry your data. Furthermore, userspace filesystems are inherently slower than kernel filesystems. FUSE adds an additional layer of abstraction to file system access and makes it slower for reads, regardless of what you may believe. If you don't need write support, then you are a fool for using ntfs-3g.

You should also keep in mind that if a volume is mounted read-only, then the your system does not EXPECT any changes to happen. It would be a waste of resources to check and see if any new files have been created, because as far as your system knows, there SHOULD NOT have been any changes, because the drive is mounted read-only, so how could any changes have been made?

----------

## batistuta

 *Saundersx wrote:*   

> I have a partition, this partition is ntfs, vmware reads the partition as a /dev/sdaX, I also want to read this partition from linux at the same time

 

If you take the time to read the link I've posted above (highly recommended), you will see that your proposal is not supported by vmware. They clearly state that you should unmount the partition from Linux before accessing it in raw mode from your virtual machine. You are really risking your data by doing that. So don't ask for a solution to something that was not designed to work the way you want.

As Ast0r (and vmware docs) say, use samba for that

----------

## Saundersx

Rereading my post it comes off as more bitchy then factual, which was not my intent. I guess this thread can be closed now but two final things to reply to. I use ntfs-3g over ntfs because I consider it better. My definition of better is "hasn't blown up on me yet", if it's not better in the technical sense so be it, I'm not here to argue which is superior. And yes what I was doing is foolish, but I don't care, I bet the majority of what I try to do with linux can be considered that. In my defense it half worked   :Wink: 

----------

## batistuta

 *Saundersx wrote:*   

> My definition of better is "hasn't blown up on me yet"

 

You should definitely patent this definition   :Very Happy: 

 *Quote:*   

> And yes what I was doing is foolish, but I don't care, I bet the majority of what I try to do with linux can be considered that. In my defense it half worked  

 

Good luck, you will need it. Make sure to backup though. And consider samba. You will learn by setting it up, and now you have a good motivation for doing that.

----------

## Saundersx

One final point of interest, instead of samba i can just mount it under vmware's "shared" folder and still have access to it under ntfs-3g, so I guess I won't need to add those dirs to samba.

----------

## batistuta

 *Saundersx wrote:*   

> One final point of interest, instead of samba i can just mount it under vmware's "shared" folder and still have access to it under ntfs-3g, so I guess I won't need to add those dirs to samba.

 

That seems like a good solution. I didn't know that this existed. Thanks for pointing it out!   :Very Happy: 

Keep in mind however, that your solution won't work. According to the docs, you share a host folder and not a guest folder. This means that you don't even need to have the ntfs or ntfs-3g driver installed in your host at all, because in the host you access it as a native linux folder (ext3, reiser, etc), and in your guest the shared folder shows up (Windows in your case) under "My Network Places". No ntfs needed.

----------

## Saundersx

In my particular situation I need it, trust me   :Wink: 

----------

