Wrong container configuration - where 's its data?


cyberstyx

Recommended Posts

Hello all,

 

I heard about unRaid two weeks ago and was impressed enough to make me drop my current home eSXI virtualization system to give it a go. First impressions are really - really good and I 'll be sticking to it.

 

I am still on the trial license and I will be upgrading later on. As I was a bit eager to play with my knew toy, I moved some of my movies / series files from a VMFS disk into it. From the first moment the network bandwidth sky-rocketed from a max (and rare) 65MB/s (from the old eSXI running a Win2008 file server) to a constant 100MB/s easily.

 

My young daughters had just found out about Minecraft so I gave a go at a container (MineOS) as I wanted to test it. I knew there was a proper guide in the manual about setting it up, but I was just playing around at that point. I set up everything and all was working well for 5 days. The functionality / result that is, the PCs would connect to a fast server. The container had no issues when I would stop/start it or make an "archive" (an option it has for its files) and I got carried away with other stuff, but hey, it was working, and everyone was happy, right?

 

Well... No.

 

Just yesterday there were a few power failures on the grid and the server shutdown. When I returned home and powered on the server, I saw that the array was not started up (had forgotten to auto-start the Array), but the container would start up (didn't forget that). But there was nothing in the container's Web page, all configuration (and created /server - the game world) files were missing. It was like a fresh installation.

 

I started the Array and restarted the container without any change. I set up the Array to auto start, the container not to, used the reboot command from an SSH connection, started the container, still nothing.

 

I did some searching around, and although I 've made a small mess of things as my container configuration was not correct, I can't understand this "behavior".

 

My current testing configuration is a single 6TB HDD in the Array. The 2nd 4TB HDD is connected on the motherboard and recognized by the system but it's a NTFS disk with data on it and I have to copy them over to the 1st disk before I format / mount it. There is no parity disk (the 6TB HDD for it will arrive next week) and no cache disk for the moment.

 

I haven't done the usual mistake of having the container mount to a path on a cache share (no cache HDD yet), which gets moved to some other disk if you haven't selected the appropriate share option that the mount should reside only on the cache (which if you don't at some point the files / configuration gets moved and the container loses that data and you have to find it - copy it back).

 

I did something much nicer while I was playing around with its first installation. I mounted the container volume to the docker.img itself, and not in a share on a disk as the guide says:

var/games/minecraft <> mnt/appdata/minecraftos

 

I am a Windows user and haven't used Linux at all, so I am struggling a bit now on the OS level to find out where the files went after the server power failuere, as the WebGUI isn't for this type of work.

 

As it seemed the container was mounting a specific folder from the docker.img, I proceeded mounting the whole docker.img in /mnt/minetest (with mount -o loop docker.img /mnt/minitest , something I googled) so I could browse all of its contents. Later I found out that the mount command would show that docker.img was already mounted somewhere. I browsed most of the (relative) subfolders in the whole docker.img but I can't find the data I am looking for.

 

/mnt/minetest/containers/ had a folder with an id /key in it (I 'm guessing the container in question), but the data I 'm looking for is not there.

 

/mnt/minetest/btrfs/subvolumes/ has 22 id / key folders (I have only one container installed + the 2 that were present with the initial unRaid installaiton), including the game container and one that is the game container id + "-init" at the end, but none of those subfolders seem to have the related data.

 

Data usually doesn't "disappear" in systems without some error indication, and I would rather hope that the data was moved to some other location due to some system mechanism rather than the container for some reason re-installing it self and deleting stuff - or worse, data loss due to the power loss. The docker.img it self has increased from 10GB to 10.7GB so there is some "data" in there, the required files should also be somewhere in there.

 

No other data (on the disk / shares) was affected, the disk is running fine and the SMART details give a big thumbs up, and as only the container user data and config was affected, it 's only logical that they now reside somewhere else.

 

If my daughters hadn't spend some time building stuff in their own private Minecraft server I wouldn't bother so much with this, but as it is now I 'm really looking for a way to restore the files if possible.

 

I would greatly appreciate any help you could give me as to where the data could reside, or any log locations that could help out. Please keep in mind that I am a recent user to unRaid and don't know much about linux systems, so any detailed commands or paths will be really useful.

 

Thank you in advance,

 

 

Christos.

Link to comment

There shouldn't be any reason to mount the docker.img file. Let unRaid handle writing to that file, just set it and forget it.

 

Did you create a mount point on the hard drive to store the files? If not then I'd guess when you mapped the volume to mnt/appdata/minecraftos the system created a directory in RAM instead. When the power went out you would then loose whatever was in RAM.

 

Link to comment

I only mounted docker.img as a way to search through its contents, believing that the needed data could be somewhere else in there.

 

Yes, I installed the Community Application plugin and downloaded the container from there.

 

I probably set the host mapping to /mnt/appdata/minecraftos/ , the behavior (data loss after server power down) matches what you are saying.

 

Which is also "confusing", as "mount --help" says at some point "Note that one does not really mount a device, one mounts a filesystem (of the given type) found on the device.", which should mean an actual file somewhere, which means that data should be written somewhere. But that 's my limitation to linux, somehow it ended up in a RAM disk.

 

Suites me for not following the guidelines I guess (which so happens if you don't you do get into trouble, not "if you don't it should be ok" ;))

 

Thanks for helping me out, I can now drop chasing shadows and start from scratch doing it the right way.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.