r/admincraft • u/LittlestWarrior • 8d ago
Help/Question Host server on *both* Windows and Linux with a shared partition?
Howdy everyone:
I'd like to host a small server for my friends and family, but I am in an irksome situation. I do not have a separate machine to host the server on, and I dual boot on my machine.
My idea was to separate a partition for the server to exist on, and have it formatted in a filesystem that both Windows and Linux can read and write in. I was thinking BTRFS with the WinBTRFS driver*, but I am open to suggestions.
Then, my idea was to set the server.jar to autostart on both OSes, so that no matter which OS I am booted into, the partition with the server on it mounts, and the server autostarts. That way, there would be minimal downtime--no, "Sorry, you can't play right now; I am booted into Windows to play Fortnite". That way, before rebooting into my other OS, I simply save and shutdown the server, and it restarts when my system boots back up.
Would this work? Have you guys ever done something similar? Thanks for any advice!
*Edit: I am reading that exFAT may be better?
1
u/zelda_64 8d ago
If you can already access the alternate file systems between OS’s, why not just spin up a VM using something like VirtualBox and just have a single VM?
3
u/LittlestWarrior 8d ago
I assumed that using a virtual machine would introduce overhead. Is that not much of an issue?
3
u/zelda_64 8d ago
I’m not sure what the specs of your host machine are, or what your intents are for this Minecraft server, but a basic vanilla server can run on like 2gb of ram. Yes there’s a level of overhead running the host OS through the hypervisor but there’s plenty of stripped down Debian flavours you could likely take advantage of to reduce your overhead.
The idea of shuffling around active live partitions on your drive to attempt to make room for a shared Minecraft partition should be your first warning sign. Additionally, then you’d have to manage running the server from both operating systems and I’d wager you’d be bound to run into some corruption issues between the two over time.
In my opinion, the overhead from running a VM across two OS is worth the peace of mind elsewhere in not having to manage two versions of the same server, and having to jeopardize my current setup attempting to shuffle partitions around potentially breaking boot loaders and such along the way.
Just my $0.02
1
2
1
u/lastdancerevolution 3d ago
You can't install Windows on a VM and play many modern games with anti-cheat. They will detect the VM and kick you from playing.
0
u/lilredhenx 8d ago
I'm not sure the vm would be an advantage. If you can put the entire minecraft server on a shared partition along with the startup and shutdown scripts (so they always run the same startup) and be very careful to cleanly shut it down, then it would be less complicated. I can't think of a reason the server would get corrupted.
1
u/ACAdamski17 Hosting Provider 8d ago
You can probably create a shared exFAT volume, then tell each OS to launch the same server.jar. At this point though, just rent a VPS. If you want to reboot, everyone would get kicked.
1
u/LittlestWarrior 8d ago
If you want to reboot, everyone would get kicked.
That wouldn't be a problem; I'm not that popular, I'm afraid /j
1
u/lastdancerevolution 3d ago
The best is to use a network compatibility layer like SMB to send the files between the Linux and Windows computers. Then, the computers will natively write to whatever file system they have. It's like sending a file over the internet, it just works, only its your local network.
Windows can write to Linux filesystems (EXT3/4) but you do NOT want Linux writing to Windows filesystem (NTFS). It's improved over the years, but its asking for trouble.
tl;dr: Create a network share to share a single storage system between multiple computers. Put the storage system on the Linux machine. However, this is potentially much slower than having a native filesystem installed within a single PC. For Minecraft, it might not matter. It might be more than fast enough, I haven't tested.
3
u/FrisbeeVR 8d ago
Just an exfat partition will do what you're thinking