thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

Author Topic: Using sshfs with B3  (Read 7985 times)

Offline Mazter

  • Jr. Member
  • **
  • Posts: 14
    • Colombian community of Urban Terror
Using sshfs with B3
« on: January 10, 2010, 09:00:20 AM »
Hi,

I have been playing sshfs to monitor a remote server with b3. It works, but is kinda weird. If I mount with sshfs the remote game server dir in the box where b3 is running and then send a command from the game, for example !time, b3 will see the command like after two or three minutes. BUT, if I do a tail/cat/more of the game log file in the sshfs'ed mounted  directory then b3 will inmediately see the command in the log and respond. If I leave a tail -f game.log running then b3 will work perfectly, and when stopped it then b3 will again start to react two or three minutes after. I think this has to do with sshfs asynchronous or cached reads, but I have tried all options of sshfs to try to avoid this with no luck, like no_readahead, cache=no, cache_timeout=0 and sync_read.

Has anyone used sshfs? how should it be run to avoid this problem?

Thanks

Offline Mazter

  • Jr. Member
  • **
  • Posts: 14
    • Colombian community of Urban Terror
Re: Using sshfs with B3
« Reply #1 on: January 10, 2010, 09:34:00 AM »
Got it working :D

The magic parameters are direct_io and cache=no. It works like a charm. You will mount it like this:
Code: [Select]
sshfs -odirect_io,cache=no [email protected]:/home/urban/UrbanTerror servers/remote_server/

To avoid having to enter the remote user password each time you mount the remote dir you will have to generate a ssh key pair with the ssh-keygen command and upload the public key to the game server .ssh/authorized_keys file.

I hope this helps.

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
Re: Using sshfs with B3
« Reply #2 on: January 10, 2010, 11:05:41 AM »
Nice! Deserves a sticky.

Offline BetterDeadThanZed

  • Beta Testers
  • Hero Member
  • *
  • Posts: 681
    • Killin Zeds
Re: Using sshfs with B3
« Reply #3 on: September 18, 2010, 12:11:48 AM »
Wow. All that stuff hurts my head.

I've never been a fan of Linux. :)

Offline Mazter

  • Jr. Member
  • **
  • Posts: 14
    • Colombian community of Urban Terror
Re: Using sshfs with B3
« Reply #4 on: September 18, 2010, 12:19:37 AM »
I've never been a fan of Linux. :)

I'm really sorry for you, you don't what you are missing :D

Offline grosbedo

  • Former Dev. (senate)
  • Sr. Member
  • *****
  • Posts: 258
Re: Using sshfs with B3
« Reply #5 on: September 18, 2010, 01:52:59 AM »
Nice one ! One additional way to make B3 work remotely  ;D

Offline norma

  • Jr. Member
  • **
  • Posts: 14
Re: Using sshfs with B3
« Reply #6 on: January 20, 2016, 06:58:22 PM »
6 years later and a BIG thanks for this.

One thing I did instead of mounting all the game server files was to hardlink only the log files into one folder and then mount that one folder.

 


Rate this page +1 at Google Search