Mounting TrueNAS volume on multiple systems/platforms

rainwadj

Cadet
Joined
Aug 14, 2020
Messages
2
We have a TrueNAS system, and we've traditionally used it for volumes on our Windows systems. We're now trying to use it for Linux systems as well, but we're having trouble. We're able to connect the volumes to Linux over iSCSI, but:

- If we create an NTFS volume and mount it on our Windows systems, then try to mount it on a Linux system, the Linux mount command complains with 'Metadata kept in Windows cache, refused to mount.' and then mounts the volume read-only.
- If the volume is not mounted on Windows, we can use Linux mkfs.ntfs and format it for NTFS, then mount it on Linux and read/write files there. If we then mount it on Windows, it continues to work, but if we then unmount it from Linux and try to remount it, it comes back with the same metadata error and mounts read-only again.

Is it possible to have a volume that is shared between Windows and Linux hosts?

Thanks.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Ah, good for Linux. NTFS is not a cluster-aware filesystem. What you are doing is trying to take a USB hard drive and attach it to several PC's simultaneously (also known as "SAN protocol"). This does not work for filesystems designed to own the storage device that they are attached to. You will ruin your filesystems, and Windows is typically too stupid to notice you're doing something really bad.

You either need to use a cluster-aware filesystem or you need to use the NAS as a NAS, and use a filesharing protocol like CIFS.
 

rainwadj

Cadet
Joined
Aug 14, 2020
Messages
2
OK, that sounds about right, based on what we're seeing. Is there a cluster-aware filesystem I can use for TrueNAS?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No, your Windows and Linux boxes need it. When using SAN storage, FreeNAS is just handling the storage of blocks. The filesystem abstraction is handled on the client.

https://serverfault.com/questions/295190/how-can-i-use-ntfs-and-iscsi-and-not-corrupt-my-san

The relative difficulty level here is pretty high, and it is also a lot more resource intensive on the FreeNAS/TrueNAS side:

https://www.ixsystems.com/community...res-more-resources-for-the-same-result.28178/

There are some cases, such as VMFS, where you really do need to do this, but most of the time, people end up using CIFS or NFS and letting the NAS unit handle the filesystem, as ZFS is *awesome* and when you use it as it is meant, it can do lots of really cool stuff like snapshots and file versions.
 
Top