Move your linux server installation to a JFS partition

From GMod Wiki

Jump to: navigation, search
Info 64.png This is still at draft stage, the general layout and headers will be reviewed.

Several GMod addons and models were created under windows environment on a case insensitive file system. Installing these components on Linux native file system can be troublesome because of it's case sensitivity. To avoid some of the headaches and tradeoff efficiency, you can move your GMod installation to a virtual JFS partition.

The instructions below have been tested on Ubuntu Server 10.04 LTS and Ubuntu Desktop 11.10 and are recommended for advanced users. Use at your own risk.

Initial Setup

Install the mkfs.jfs utility:

sudo apt-get install jfsutils

Create a file that will contain our virtual JFS partition:

sudo dd if=/dev/zero of=/root/gmod.img bs=1M count=20k

(adjust the count=20k value to the desirable size, in this case we are creating a 20 000 * 1M = 20GB file)

Format the partition using JFS format:

sudo mkfs.jfs -O /root/gmod.img

Create a mount point:

sudo mkdir /mnt/gmod

Mount it:

sudo mount -o rw,loop /root/gmod.img /mnt/gmod/

Copy our gmod installation:

sudo cp -R /home/gmod/gmod_srv/* /mnt/gmod/

Unmount it:

sudo umount /mnt/gmod/

Remove the GMod Server Files from the home directory of the GMod user:

sudo rm -R /home/gmod/gmod_srv/*

Mount the virtual file system into home directory of GMod user:

sudo mount -o rw,loop /root/gmod.img /home/gmod/gmod_srv

Set the permissions:

sudo chown -R gmod:gmod /home/gmod/gmod_srv/

You can then run srcds like you did before.

Automaticly mount the filesystem on system restart

Open the fstab in an editor (you can also use nano not just vi):

sudo vi /etc/fstab

Insert the following at the end in a new line:

/root/gmod.img      /home/gmod/gmod_srv      jfs      defaults,loop      0      0
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox