SOLVED How to run games from a TrueNAS server

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Filesystem destruction? To which extent - no idea. Possibly complete data loss. If both mount the disk read/write ...
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Ok, may I ask what happens if I connect both :)?

You will lose your filesystem sooner or later.

Please refer to

https://www.truenas.com/community/t...ferent-content-to-win-servers.7625/post-30501

Peter,

An iSCSI target is just a block level storage device. It can be accessed by one or many machines. If machine 1 writes block 123456, and machine 2 reads block 123456, it sees what machine 1 just wrote. This should not come as a shock. I think it is what you expect.

However, you've made a catastrophic error. You've assumed that NTFS (guessing/probably), when it creates a filesystem on this shared storage, will work in that same manner. It won't. Windows will do extensive caching of data, AND it assumes that it has exclusive access to the data. So when your "Winsrv1" mounts it, and "Winsrv2" mounts it, both read the key parts of the disk, generally including the main directory, and then each has a cached copy. Now you write a file on "Winsrv1", but when you do a "dir" on "Winsrv2", you don't see it, because Winsrv2 is completely unaware that the cached data it has is now inconsistent with what's on disk. You want worse trouble? Have Winsrv2 write a file. Because it's cached metadata, it may well choose some of the same disk blocks that Winsrv1 did to write the data, so now you have two servers trampling each others files, because neither is "aware" of what the other is doing. You have virtually guaranteed corruption when both servers write to the disk, and you have to remember that these things are not just writing file data, but also metadata.

For iSCSI and multiple server filesystem access, what you need is a cluster-aware filesystem. On our VMware ESXi nodes, for example, each host mounts a bunch of filesystems that are shared amongst all the hosts, meaning that each host has a connection to each iSCSI target. Because "VMFS" is a cluster-aware filesystem, when I go over to "/vmfs/volumes/storage0" and create a file, that file magically becomes available on all hosts simultaneously. Unfortunately, you lose some performance when using a cluster-aware filesystem, because there's a requirement to make sure that things remain sane, nobody's trampling anything, etc. Cluster-aware filesystems typically rely less on caching and hit the disks more often to ensure things are correct.

The usual way to "fix" this is to run the request for filesystem access across the network, onto a server, and then let the server deal with it, which is what "NAS" is really all about. A NAS server can use a non-cluster filesystem because the only filesystem layer accessing its disk is the local kernel's filesystem, so a NAS server can run BSD FFS, Linux EXT2/3, or Windows NTFS and share files out to many clients without issue. That's why so many NAS protocols (NFS, CIFS, AFS, etc) have been developed over the years.

http://www.everythingvm.com/content...area-network-san-network-attached-storage-nas
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Ok, and is there such a thing as unmount on power off? or is powering off the system enough?
Powering off is enough. Or disconnect the drive however that can be done in Windows with an iSCSI target.
 

lostsouls85

Cadet
Joined
Oct 1, 2018
Messages
1
Don't know if this will be of help to anyone. Once I install the game on my main computer I just simply cut and paste into my truenas server and run it. Works fine for me
 
Top