Data recovery from old VM

Hi all.

I had a Minecraft server on my old TrueNAS box.
It was running in a VM under Ubuntu and Crafty.
The OS was installed on a single, 120GB sATA SSD, the game data was stored on 2x500GB sATA SSD mirrored.
My question is, that is there a way to get back the Game data without replicating the whole system?

I’m a bit confused by your description.

Were you running the VM on TrueNAS? Did you zvols setup for the VM?

1 Like

Yes, the VM was running under TrueNAS.
As I remember, the mirror was created under TN and was assigned to the VM later.

Your description is relatively vague.
I suppose you mean, that you had a TrueNAS system that bootet from the 120GB SATA SSD, created a ZFS mirror on the 500GB SSDs and then created a VM in TrueNAS which would have created a zvol on the mirror containing the virtual OS including the game data.

If that is the case:
You can just plug the 500GB SSDs into any device that supports at least the ZFS version you used back then and import the pool (if the SSDs are not corrupted).
Using a TrueNAS would be easy of course as this would also allow you to attach the zvol on the mirror to a new VM and just boot into the old OS.
You could of course also attach the zvol to an existing vm, mount it there and extract the data or mount the partitions on the zvol directly on the host that you imported the pool on.

If I misinterpreted this may not apply of course.

2 Likes

OK, I am sorry, if it seems vague.
The TN system was on a separate SSD (Lets call it “System”). The Ubuntu, that had the Crafty server running was installed on the above mentioned, separate, 120GB SSD (Lets call it Ubuntu system), which was fully passed through to the Ubuntu VM from TN.
As I can recall the 2x mirror however was a storage pool in TN itself and only the VDEDV or ZVOL was attached (so, not the individual disks were passed through) to the Ubuntu system.
I hope, this makes it clear.
(And I am really sorry about the vague text, but this was made like 3 years ago, so I cannot really recall what and how I did exactly… Lessons learned: I MUST better document the structure of my IT system for future me… And backup-bacjkup-backup, because of I did a proper backup, I would have avoided all this problem. BUt We learn something all the time :smiley: )

That still doesn’t clear it up. It sounds as if you installed an Ubuntu VM on the same SSD that the boot-pool lives on. We know this can’t be true, unless you did it manually with the command-line.


Does your layout look like this?

flowchart TD

style vol1 stroke:green,stroke-width:4px

nas1{"TrueNAS Server"}
ssdboot(("SSD<br>(120GB)"))
ssd1(("SSD (500GB)"))
ssd2(("SSD (500GB)"))
vdevboot["stripe"]
vdevmirror["mirror vdev"]
poolboot("boot-pool")
poolstorage("storage-pool")
ds1[("some<br>dataset")]
ds2[("another<br>dataset")]
vol1[("zvol")]
vm{"Ubuntu (VM)"}

nas1 --- ssdboot
ssdboot --- vdevboot
vdevboot --- poolboot

nas1 --- ssd1
nas1 --- ssd2
ssd1 --- vdevmirror
ssd2 --- vdevmirror
vdevmirror --- poolstorage
poolstorage --- ds1
poolstorage --- ds2
poolstorage --> vol1
vm -.- vol1

The files you want to recover are in the zvol that you supplied to the Ubuntu VM which you formatted as Ext4, XFS, or some other Linux filesystem?

2 Likes

What you describe sounds like a more plausible setup but if I understand @Gyula_Masa right, he has had 4 SSDs in total:

  • TrueNAS OS
  • Ubuntu OS (120GB, passed through to the vm in some way)
  • 2x 500GB ZFS mirror

Idon’t know how he would have passed a whole SATA SSD to a vm but that’s how I understand him.

@Gyula_Masa please clarify further - if possible using a diagram.

The OP’s post was ambiguous. I read it as the “separate” 120GB SSD is “separate” from his main storage pool, but it is in fact the same drive in question.

I can see where I might have been confused.

Because I’m unaware of “passing an entire drive” to a VM inside TrueNAS, I thought he made a mistake in describing the setup. I thought that was the whole point of creating zvols in a pool, to provide to a VM.

Can you actually pass an entire physical drive to TrueNAS VMs? Does the GUI support doing that?

I am pretty sure that’s impossible for SATA or SCSI disks but I don’t know if the GUI would prevent you from passing an NVMe (PCIe) device. Not applicable here though.

1 Like

You can pass PCIe NVMe drives into VMs… is this the case with OP?

He explicitly said SATA SSD so most probably not.
Maybe he created a stripe out of that and used it for a single zvol… no idea what he meant.

Greetings Sir!
This representation is really close!

  • I have 3 SSDs put aside, one for the Ubuntu OS, and the 2x500 GB SSDs for the storage.
  • There are no other datasets on the mirrored drives, it was fully handed over to the VM.
  • most likely the 120 GB SSD was not “handed over” to the VM, but it was dedicated to the VMs home directory.
    (I think, I got confused by the method how Proxmox handles this hand over, which I use since I realised how broken the VM part of TN.)

I am not interested in any other data (like the VM or the Crafty install, or anything else, only the Minecraft world maps on the zvol.).
I plan to create a new setup for the server on my new server.

I apologise everybody for my not clear description of the problem, I am really sorry!

Connect the drives to a computer running a current version of FreeBSD or Ubuntu. You should be able to import the pool and access the data.

Proxmox? You never mentioned Proxmox before.

You need to describe the entire setup as clearly as possible. It’s still unclear what this “VM” is and what you mean by “fully handed over”.

What do you want to recover exactly?

Are these files that exist inside a filesystem (Ext4, XFS) via a zvol, which is accessed by a VM managed in TrueNAS?

Is this a VM outside of TrueNAS that is managed by Proxmox and you provided this VM an entire 120GB SSD to install Ubuntu on?

Is ZFS in TrueNAS any part of this at all?

2 Likes

Until the OP describes it more clearly, I don’t even think ZFS is involved at all.

It sounds like they handed a 120GB to a VM (managed by Proxmox) to install Ubuntu and the Minecraft software. Proxmox just so happens to also manage a TrueNAS VM that he provided with 3 drives. Another 120GB SSD and a pair of 500GB SSDs.

This tells me that he doesn’t have the Ubuntu VM running under TrueNAS but rather under Proxmox. I highlight it in bold:

He’s not managing VMs under TrueNAS, so he does it under Proxmox instead. It is this 120GB SSD that he supplied to the Ubuntu VM (managed under Proxmox) that he wants to recover from.

2 Likes

@Gyula_Masa is this more accurate of your setup?

flowchart TD

style ssd3 stroke:green,stroke-width:4px

hyper1{"Proxmox<br>Hypervisor"}
nas1{"TrueNAS"}
ssdboot(("SSD<br>(120GB)"))
ssd1(("SSD (500GB)"))
ssd2(("SSD (500GB)"))
ssd3(("SSD<br>(120GB)"))
vdevboot["stripe"]
vdevmirror["mirror vdev"]
poolboot("boot-pool")
poolstorage("storage-pool")
vm{"Ubuntu"}

hyper1 -.- nas1
hyper1 -.- vm
nas1 --- ssdboot
ssdboot --- vdevboot
vdevboot --- poolboot

nas1 --- ssd1
nas1 --- ssd2
ssd1 --- vdevmirror
ssd2 --- vdevmirror
vdevmirror --- poolstorage
vm --- ssd3

It’s implied that all the SSD drives are passed through to the VM’s that are using them.

If that is the case:

  • connect drives
  • lsblk
  • mount

done.

1 Like