Mounting raw disk file from zfs

narodigg

New Member
Feb 21, 2025
4
0
1
Hi all, I seem to be in a pickle. I lost my proxmox install. No backup, I know. What is backed up was my media though via ZFS.

So I thought just install prox and I am recreate the one container, import the ZFS pool and I am good. In Proxmox I had a ZFS to store my media. One ubuntu container to run samba share of my media on my ZFS pool named tank. However, I have discovered now my mistake when I set up my media storage on ZFS i did it as a directory. So the media on my ZFS, is just stored in the raw file of the containers virtual disk. In my ZFS is this only directory and file /tank/data/images/100/vm-100-disk-0.raw'
I hope I explained myself well enough.

Code:
root@pve:/tank/data/images/100# ls -al
total 33965182040
drwxrwx--x 3 root root              4 Oct 21 18:34 .
drwxr-xr-x 3 root root              3 Mar  2  2025 ..
drwx------ 2 3000 root              2 Oct 21 18:34 images
-rw-r----- 1 root root 64424509440000 Oct 21 14:06 vm-100-disk-0.raw


I try to use qm importdisk but I get an error out of space. Yeah, I don't have another 64T to replicate it on.
How can I mount vm-100-disk-0.raw to a container or vm to get access to the files inside again? Or any other way to access the files in the raw?
 
Last edited:
Please check the loop device and then Mount this device to a mountpoint on your system.
 
Last edited:
I was able to mount the raw file and have access to the data inside again.

Code:
For those find this through a search. 
     '' On the pxe environment terminal
    mkdir /mnt/rawdata
    mount /path/to/your/rawfile.raw /mnt/rawdata
    
    ''Edit lxc conf
    mp0: /mnt/rawdata,mp=/mnt/containerdata
 
Last edited: