How to segregate Docker container storage from VM storage.


Recommended Posts

Situation:

 

New install, unRAID 6

 

I'd like to have docker containers run my media server needs and then be able to create VM's as needed with completely segregated storage, so that the paths never cross.

 

Is this possible?

Not sure what you wanting to accomplish, but a VM only has access to it's own vdisk, exactly like any other computer can only access its own hard drive. Any "path crossing" can only occur if you connect the VM to your shares using a network connection, again, just like any other computer.

 

There are ways to map folders in linux VM's, but that option (9p) is not easy to use, and doesn't work well AFAIK.

 

I suppose a docker container could be mapped to access and possibly mount a VM's vdisk, but that would be pretty pointless.

 

Can you ask your question a different way? I feel like I'm not getting your point at all.

 

A VM is just like any other computer on your network, either as isolated or connected as you make it.

Link to comment

Situation:

 

New install, unRAID 6

 

I'd like to have docker containers run my media server needs and then be able to create VM's as needed with completely segregated storage, so that the paths never cross.

 

Is this possible?

Not sure what you wanting to accomplish, but a VM only has access to it's own vdisk, exactly like any other computer can only access its own hard drive. Any "path crossing" can only occur if you connect the VM to your shares using a network connection, again, just like any other computer.

 

There are ways to map folders in linux VM's, but that option (9p) is not easy to use, and doesn't work well AFAIK.

 

I suppose a docker container could be mapped to access and possibly mount a VM's vdisk, but that would be pretty pointless.

 

Can you ask your question a different way? I feel like I'm not getting your point at all.

 

A VM is just like any other computer on your network, either as isolated or connected as you make it.

 

Jonathanm - thanks for the quick reply. I guess it's just my lack of understanding on the unRAID side of things - that, and perhaps looking for some affirmation.

 

Just to clarify - as long as I have a "vdisk" share and set the share size of the vm to whatever I want, say 100gb, that 100gb will never be over-written by anything? To be clear, I have my containers saving to a "media" share.

 

Please let me know if this clears things up for you.

 

Thanks.

Link to comment

For the purpose of this discussion, a vdisk is only a file, never a share. I suppose you could make a vdisk share to hold your vdisk files, but that isn't necessary. That vdisk file takes up to as much space as you tell it to. When you first create a 100GB vdisk file for your VM, it may only consume a few KB on the disk, because it's a sparse file and hasn't had anything written to it. Once you install an OS and software, it will consume more space, up to the 100GB you allocated, at which point the VM will show its hard drive as being full.

 

If you wish to force the vdisk file to use the entire 100GB from the beginning instead of growing as needed, you can do that.

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.