use a zVol inside container/app

pabloalcantara

Dabbler
Joined
Feb 21, 2022
Messages
29
Hi,
I´d like to know if it´s possible to use an zVol inside an docker container?
I know that inside the container i´ll probanly have to mount it.
My problem is that I need an block device inside the container, to my backuppc. Before migrate it to truenas scale, I used docker in windows, I create an vmdk and mount it.
One options is to mount this zVol on /mnt/backuppc and present this folder on the container.
Any ideias?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You want the container to have access to a raw block device? That sounds primarily like a question to be directed at the container framework, because as far as ZFS is concerned, the container is going to be irrelevant.

I'm skeptical of the concept because it's a weird combination of abstractions that don't mesh very well and because you can't even mount a filesystem on Linux without being a superuser, so any security benefits you might have very looking for are right out...
 

efalsken

Cadet
Joined
Feb 17, 2023
Messages
8
In my case, its because I'm running Plex and it's got THOUSANDS of tiny files. Backing it up, or moving it to a new server or location is just toooooooo slow dealing with it on a file system level. I'd rather deal with a single block device.
 
Top